summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-03-25Remove FX_DWORD from XFA, part 2tsepez
Some headers were missed in the previous CL. Review URL: https://codereview.chromium.org/1835703002
2016-03-25Remove FX_DWORD from XFA.tsepez
Review URL: https://codereview.chromium.org/1830323006
2016-03-25support gradients and stroke+fillcaryclark
To draw paths that are stroked and filled with a pair of colors, reduce the fill by the width of the stroke. This is implemented with path ops subtracting the resolved stroke shape from the fill shape. This permits rendering the result without requiring an offscreen bitmap. The implementation for stroke+fill requires a new entry into the graphics engine, so a bit was added to device caps for that. Extract the gradient information out of the axial gradient function descriptions, and when possible, use Skia to draw the linear gradient directly. This requires making the function descriptions non-opaque, and adding a bit to device caps for another entry into the graphics engine. BUG= Review URL: https://codereview.chromium.org/1828283002
2016-03-25Replace CFX_DWordArray with CFX_ArrayTemplate<FX_DWORD>.Tom Sepez
First step to getting rid of FX_DWORD. R=ochang@chromium.org Review URL: https://codereview.chromium.org/1832113003 .
2016-03-25util.printd() replaces specified date with current date.tsepez
Added test case. Several bugs going on here: JS_LocalTime() ignoring argument and returning current time and not factoring in the time zone adjustment. Use of FXSYS_floor() silently casts result to float, losing precision required to extract minutes and seconds. Pre-existing wcsftime escapes not stripped. BUG=pdfium:413 Review URL: https://codereview.chromium.org/1833053002
2016-03-25Remove unused params of CPDF_Image::SetImage.dsinclair
The last 3 params of CPDF_Image::SetImage are unused, remove and cleanup logic. BUG=pdfium:194 Review URL: https://codereview.chromium.org/1831263002
2016-03-25Cleanup fpdf_edit.h and fpdf_doc.h documentation.dsinclair
This CL cleans up the documentation in public/fpdf_doc.h and public/fpdf_edit.h. Review URL: https://codereview.chromium.org/1826113003
2016-03-25Cleanup some extern method declarations.dsinclair
This CL removes _FPDFAPI_GetInternalFontData which is not implemented, FWL_PostMessageToMainRoop which has no body and the PostMessage which was the only caller. FWL_ShowCaret is moved to the only place where it's used. BUG=pdfium:112 Review URL: https://codereview.chromium.org/1827343003
2016-03-24Update Readme as there is now CQ.chromium/2691chromium/2690tandrii
R=dsinclair@chromium.org,tsepez@chromium.org NOTRY=True BUG=596524 Review URL: https://codereview.chromium.org/1831813004
2016-03-24Re-land "Preserve m_pDynamicObjsMap until FXJS_PerIsolateData is destroyed.""Tom Sepez
Fix the destruction order. This reverts commit 129a60ec2d4d98ed953beaca629c99a52fb7e9b0. BUG=594120 TBR=jochen@chromium.org Review URL: https://codereview.chromium.org/1831723004 .
2016-03-24Added bounds checking to GetNameFromTT to handle corrupt files.Tom Sepez
Patch by forshaw. This patch adds bounds checking to the names buffer passed to GetNameFromTT. There are observed crashes in this function where data is read outside of the bounds allocated and passed to GetNameFromTT. There's no reason that this function should ever try and read outside of the allocated bounds. BUG=583037 TBR=forshaw@chromium.org patch from issue 1829013002 at patchset 40001 (http://crrev.com/1829013002#ps40001) Review URL: https://codereview.chromium.org/1830243003 .
2016-03-24Remove strange integral constants for "true", "false", "%PDF".Tom Sepez
Compilers have good inline memcmp nowadays, so we don't have to resort to old tricks. Remove FXDWORD_FROM_LSBFIRST and FXDWORD_FROM_MSBFIRST while we're at it. MSBFIRST was technically wrong due to promotion to int. R=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1834553002 .
2016-03-24Fix typos in .gyp filesdan sinclair
These are found by the Windows version of GYP. Not sure how to turn the warnings on for other platforms. R=caryclark@google.com Review URL: https://codereview.chromium.org/1830913003 .
2016-03-24Revert "Preserve m_pDynamicObjsMap until FXJS_PerIsolateData is destroyed."Tom Sepez
This reverts commit e432675850161570a8562f8c617da039f51f706d. Reson for revert - broke tests. TBR=jochen@chromium.org Review URL: https://codereview.chromium.org/1826223002 .
2016-03-24Preserve m_pDynamicObjsMap until FXJS_PerIsolateData is destroyed.Tom Sepez
BUG=594120 R=jochen@chromium.org Review URL: https://codereview.chromium.org/1822423002 .
2016-03-24Add missing comma.dan sinclair
We'd skip a test as the two strings would get joined, add the missing comma so all tests are run correctly. Found by: etienneb@ R=etienneb@chromium.org Review URL: https://codereview.chromium.org/1826193002 .
2016-03-24fix windows build; add blend modesCary Clark
Use FreeType instead of Direct Write on Windows. Since PDFium currently uses the graphics engine to draw but not to measure, the graphics engine needs to always use FreeType to get consistent metrics. Add a translation from PDF's blend modes to Skia's xfer modes. Turn on subpixel positioning for text to get more precise glyph placement. Pass the alpha through to get proper bitmap transparency. Address earlier nits. R=dsinclair@chromium.org, tsepez@chromium.org, dsinclair Review URL: https://codereview.chromium.org/1812263002 .
2016-03-23Cleanup public/fpdf_dataavail.h documentation.dan sinclair
This CL re-writes the documentation in the public/fpdf_dataavail.h to clean up spelling, grammar and formatting. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1825433002 .
2016-03-23Move the fpdfsdk/include/pdfwindow/ headers into fpdfsdk/pdfwindow.dan sinclair
This CL moves all of the pdfwindow headers to live beside their source files. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1823153002 .
2016-03-23Split core/include/fpdfapi/fpdf_resource.hdan sinclair
This CL splits apart the core/include/fpdfapi/fpdf_resource.h file and places the classes into individual files. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1824033002 .
2016-03-23Remove bad third_party/skia file.Dan Sinclair
This file should not exist and causes issues with gclient.
2016-03-23Move xfa/include/fwl/{core,basewidget} to xfa/fwl/{core,basewidget}.Dan Sinclair
This CL moves and splits the FWL files from the core and basewidget directories into the non-include folders. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1827923002 .
2016-03-23Move core/include/fxcrt to core/fxcrt/include.Dan Sinclair
This CL moves the fxcrt code into the core/fxcrt directory. The only exception was fx_bidi.h which was moved into core/fxcrt as it is not used outside of core/. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1825953002 .
2016-03-23update skia depsCary Clark
Update Skia to a version that supports building Windows with FreeType as a font backend. This also breaks the current version of PDFium when pdf_use_skia=1 ; the SkDashPathEffect interface is different. Staging the DEPS change separate from the changes that use it will help me keep my sanity. R=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1832483002 .
2016-03-23Fix win/clang part 2.Dan Sinclair
After moving EmbeddedUnicodeFromCharcode the IsValidEmbeddedCharcodeFromUnicodeCharset method is no longer used on windows. TBR=weili@chromium.org Review URL: https://codereview.chromium.org/1827823002 .
2016-03-23Fix build on win/clangDan Sinclair
EmbeddedCharcodeFromUnicode is not used on windows anymore and clang complains. TBR=weili@chromium.org Review URL: https://codereview.chromium.org/1828673002 .
2016-03-22Re-enable MSVC warning 4702Wei Li
BUG=pdfium:29 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1821423002 .
2016-03-22Add gn to DEPS filedan sinclair
Pull the gn binary from google source. This is needed inorder to get git cl format to work correctly on mac. Added other platforms for completness. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1826663002 .
2016-03-22Fix parsing of double dot operators for FormCalcTom Sepez
Patch by cherycherian. patch from issue 1810153003 at patchset 1 (http://crrev.com/1810153003#ps1) FormCalc expressions containing double-dot operators in SOM expressions were failing since XFA_ResolveNodes_AnyChild was always stripping the leading character. Roll testing/corpus to d671154 to pick up the test. BUG=pdfium:434 TBR=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1821413002 .
2016-03-22Fix blank xfa rendering broken at f89acbc.Tom Sepez
One initializer was lost in that conversion. R=weili@chromium.org Review URL: https://codereview.chromium.org/1824173002 .
2016-03-22Fix CPDFSDK_Widget::OnXFAAAction()Wei Li
Fix a couple issues with OnXFAAAction(): -- radio button widget should not call ProcessEvent() twice; -- UpdateDocView should be called before returning; R=jun_fang@foxitsoftware.com Review URL: https://codereview.chromium.org/1809073004 .
2016-03-21Make predefined character table slightly smaller.Tom Sepez
Add a few missing consts and remove a few extra externs. R=ochang@chromium.org Review URL: https://codereview.chromium.org/1817283002 .
2016-03-21Remove FX_WORD in favor of uint16_t.Tom Sepez
It isn't buying us anthing, and it looks strange in a struct when other uint types are already present. R=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1821043003 .
2016-03-21Make a few more const tables smaller.chromium/2689chromium/2688Tom Sepez
Remove some tables from .h file (risk of duplication). R=ochang@chromium.org Review URL: https://codereview.chromium.org/1814233005 .
2016-03-21Move xfa/include/fxbarcode/BC_Barcode.h to xfa/fxbarcode.Dan Sinclair
This CL splits apart the larger header into individual class headers in the xfa/fxbarcode directory. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1816133002 .
2016-03-21Remove unused FXDIB_PALETTE_ optionsTom Sepez
The only one that is ever used is FXDIB_PALETTE_loc, so remove the option entirely. In turn, this allows deleting about 2KB of unused constant tables. R=ochang@chromium.org Review URL: https://codereview.chromium.org/1809943007 .
2016-03-21Re-enable several MSVC warningsWei Li
Re-enable the following warnings: 4245: signed/unsigned conversion mismatch; 4310: cast may truncate data; 4389: operator on signed/unsigned mismatch; 4701: use potentially uninitialized local variable; 4706: assignment within conditional expression Clean up the code to avoid those warnings. BUG=pdfium:29 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1801383002 .
2016-03-21Handle empty objects in IsSameTextObject() and free from warningWei Li
When both text objects have no items, directly return TRUE; The last if statement moved inside loop to make the intent more obvious and free from warning (msvc warns using potentially uninitialized var itemPer) R=jun_fang@foxitsoftware.com Review URL: https://codereview.chromium.org/1815453002 .
2016-03-21Fix BUILD.gn for pdf_jpx_fuzzer.Oliver Chang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1824643002 .
2016-03-21Move core/include/fpdfapi/fpdf_pageobj.h into core/fpdfapi.Dan Sinclair
This CL splits the file into individual classes and moves them into core/fpdfapi/fpdf_page as needed. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1811053002 .
2016-03-21Move fpdfsdk/include/formfiller to fpdfsdk/formfiller.Dan Sinclair
This CL moves the .h files and renames the .cpp files to match. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1809193002 .
2016-03-18Set the project in codereview settingsdan sinclair
R=nodir@chromium.org Review URL: https://codereview.chromium.org/1817683002 .
2016-03-18Add an openjpeg libfuzzer.Oliver Chang
BUG=591789 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1814223003 .
2016-03-18Remove dead code from xfa_objectacc.Oliver Chang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1820573002 .
2016-03-18Add cq.cfgdan sinclair
Add CQ configuration file to infra/config directory. R=tandrii@chromium.org Review URL: https://codereview.chromium.org/1819513002 .
2016-03-18Fix a typoWei Li
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1808853007 .
2016-03-18Replace additional FX_WCHAR tables with uint16_t.Tom Sepez
Saves a few bytes here and there because the tables need only 16 bits but wchar is 32 bits (except on windows). R=ochang@chromium.org Review URL: https://codereview.chromium.org/1815313003 .
2016-03-18openjpeg: Remove unneeded non-standard code.Nico Weber
When building with clang-cl and not passing /FIintrin.h, the __attribute__ defined to nothing, which confuses the compiler (see bug). Since nothing seems to require the __attribute__ redefinition, just remove it. Reported upstream here: https://github.com/uclouvain/openjpeg/issues/727 BUG=592745 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1810373002 .
2016-03-18Reduce size of several PDFium constant tables.Tom Sepez
Either by using the smallest possible data type, or By accurately calcuating the bounds, or Moving to array of pointers for varying length rows. Notes: The 929 is reassuring since PDF417 barcode uses GF(929). FX_WCHAR is 4 bytes on unix (2 on windows). Binary looks to be about 240k smaller on linux/64 R=ochang@chromium.org Review URL: https://codereview.chromium.org/1807373002 .
2016-03-18Fix GCC buildTom Sepez
-Wno-sign-compare also for GCC. -Wno-error=strict-overflow to ignore the following warning. In file included from ../../third_party/pdfium/core/include/fpdfapi/cpdf_object.h:10:0, from ../../third_party/pdfium/core/include/fpdfapi/cpdf_stream.h:10, from ../../third_party/pdfium/core/include/fpdfapi/fpdf_resource.h:12, from ../../third_party/pdfium/core/fpdfapi/fpdf_font/font_int.h:13, from ../../third_party/pdfium/core/fpdfapi/fpdf_font/fpdf_font_cid.cpp:7: ../../third_party/pdfium/core/include/fxcrt/fx_string.h: In function 'CFX_ByteString {anonymous}::CMap_GetString(const CFX_ByteStringC&)': ../../third_party/pdfium/core/include/fxcrt/fx_string.h:111:19: warning: assuming signed overflow does not occur when assuming that (X - c) > X is always false [-Wstrict-overflow] if (count < 0 || count > m_Length - index) { BUG=589724 TEST=build with GCC R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1785943002 .