summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-03-31Revert "Use CFX_RetainPtr to ref count CFX_ByteString"chromium/2700chromium/2699chromium/2698chromium/2697tsepez
This reverts commit ac88953dfa7c1a68c69989d61d7bc03c0595064b. Reason for revert: Strings borked. TBR=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1852453004
2016-03-31Fix BUILD.gn file name.avallee
Typo in 'cfwl_widgetproperties.cpp'. BUG=599526 Review URL: https://codereview.chromium.org/1851543002
2016-03-31Fix CData parsing in CFDE_XMLSyntaxParser.dsinclair
This CL splits the handling of CData sections out to an individual phase of the parser. This fixes the issue with the CData parser getting confused by < characters inside the data section. BUG=pdfium:90 Review URL: https://codereview.chromium.org/1842633004
2016-03-30Fix C4434 warning about 32-bit shift assigned to 64-bitsBruce Dawson
VS 2015 has a new or louder warning about 32-bit shifts that are then assigned to a 64-bit target. This type of code triggers it: int64_t size = 1 << shift_amount; Because the '1' being shifted is a 32-bit int the result of the shift will be a 32-bit result, so assigning it to a 64-bit variable is just misleading. In this case the code that triggers it is this: m_IAID.resize(1 << SBSYMCODELEN); The destination is a size_t so the warning only shows up on 64-bit builds and doesn't indicate a real bug. But, casting the '1' constant to size_t makes the behavior/intent more obvious and consistent and allows enabling C4334 in Chromium. BUG=593448 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1843253002 .
2016-03-30Use CFX_RetainPtr to ref count CFX_ByteStringchromium/2696tsepez
This moves the reference counts from an ad-hoc mechanism to being automatically tracked. Also: Make StringData::Create() always return non-null. Add better ctors for StringData itself. Consolidate copies into StringData methods. Simplify the concat() code. Rename/reorder some parameter names to be simpler. Review URL: https://codereview.chromium.org/1810823002
2016-03-30Move mac_find_sdk out of gyp directoryweili
Gyp directory is used by a separate repository. Files in that directory may be ignored by some commands. Move it back into pdfium repository. BUG=pdfium:442 Review URL: https://codereview.chromium.org/1835943005
2016-03-30Rename _CPDF_UniqueKeyGen to CPDF_UniqueKeyGendsinclair
Review URL: https://codereview.chromium.org/1841313004
2016-03-30Replace FXJSE_DOUBLE with doubledsinclair
FXJSE_DOUBLE was just defined as double. Replace with actual type to make things clearer. BUG=pdfium:81 Review URL: https://codereview.chromium.org/1842013003
2016-03-29Re-enable warning 4005 and remove _CRT_SECURE_NO_WARNINGSWei Li
The macro _CRT_SECURE_NO_WARNINGS is no longer needed for chromium code as pdfium code itself is warning free; For standalone build, the macro may suppress warnings from third party code. But it has no use now as it is shadowed by disabled 4996 warnings. This is one of the efforts to re-enable warnings for pdfium code. BUG=pdfium:29 R=brucedawson@chromium.org Review URL: https://codereview.chromium.org/1836443002 .
2016-03-29Remove IFDE_XML* classes.dsinclair
The CFDE_XML* classes did not inhert from the IFDE_XML variants but we casted to them anyway. This CL removes the IFDE_XML* variants and we just use the CPDF_XML* classes directly. BUG=pdfium:357 Review URL: https://codereview.chromium.org/1836353002
2016-03-29Code change to avoid signed/unsigned mismatch warnings.Wei Li
This makes pdfium code on Linux and Mac sign-compare warning free. The warning flag will be re-enabled after checking on windows clang build. BUG=pdfium:29 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1841643002 .
2016-03-29Add a Retained Pointer smart class.tsepez
It's going to be hard to fix some XFA object leaks without this. Put this in fxcrt/ as we should be able to make the FX strings take advantage of this. BUG=pdfium:55 Review URL: https://codereview.chromium.org/1805683002
2016-03-29Rename GetElementValue() to GetDirectObject{By,At}().tsepez
Every time I read this code, I have to make the mental substituion that "Element value" means "de-ref indirect object", so it might as well just say so. BUG= Review URL: https://codereview.chromium.org/1841173002
2016-03-29Move xfa/include/fwl/{theme,lightwidget} to xfa/fwldsinclair
This CL moves and splits the remaining FWL files out of xfa/include and into their proper locations. Review URL: https://codereview.chromium.org/1834323003
2016-03-29Add test for util.byteToChar() and fix error msg.tsepez
Review URL: https://codereview.chromium.org/1838543002
2016-03-28use std::vector in more places in JavaScript bindings code.tsepez
use unique_ptrs for app:m_Timers. BUG= Review URL: https://codereview.chromium.org/1834203002
2016-03-28Added test for util.printx() and make it match spec.tsepez
R=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1837543002
2016-03-28Cleanup one mac headerWei Li
Remove unimplemented/unused class, and other cleanup R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1834063002 .
2016-03-28Reduce signed/unsigned comparison warningsWei Li
The warnings generated by Clang. This is part 1 for some simple cases. BUG=pdfium:29 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1840483003 .
2016-03-25Remove FX_DWORD from core/ and delete definitionchromium/2695chromium/2694chromium/2693chromium/2692tsepez
Review URL: https://codereview.chromium.org/1832173003
2016-03-25Fix FXSYS_StrToInt()Wei Li
Correctly handle sign and out of range values. R=dsinclair@chromium.org, tsepez@chromium.org Review URL: https://codereview.chromium.org/1828873002 .
2016-03-25Remove FX_DWORD from fpdfsdk/ and testingtsepez
BUG= Review URL: https://codereview.chromium.org/1835693002
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 .