summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-11-16Merge to XFA: Reland "Cleanup some numeric code.""Dan Sinclair
This reverts commit 0569ab0b11b723d9bca4ddd642b0cf8828c4bdd1. This changes the various comparisons of char >= '0' && char <= '9' and char < '0' || char > '9' to use std::isdigit checks. It also cleans up a handful of hex to digit conversions to call one common method. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1449873003 . (cherry picked from commit 3f148915d12f54a946a0c0bf526162b79c39d650) Review URL: https://codereview.chromium.org/1452673002 .
2015-11-13Add AsLayoutItem()/ToLayoutItem() functions.Tom Sepez
Also protect the LayoutItem constructor, as !m_bIsContent implies the object can be cast to the container class, so ensure we don't make any of parent class. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1441243005 .
2015-11-13XFA: Remove empty files in xfa/src/fgas/src/crt/codepage.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1443563002 .
2015-11-13Rename LayoutItemImpl classes to LayoutItem.Tom Sepez
There is no longer a LayoutItem/LayoutItemImpl distinction. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1441423002 .
2015-11-13Make CFWL_WidgetMgr{Delegate} inherit from IFWL_WidgetMgr{Delegate}.Tom Sepez
C-style casting masked a fairly serious botch, where an CFWL_ type would get cast to an IFWL_ type, and later we'd invoke virtual methods against the IFWL_ type. Without the proper inheritance, there's no reason to believe that the vtables for each of these would line up with each other. Fixing the inheritence allows us to remove the c-style casts. I'm guessing these were added to make this compile without having to understand the true nature of the flaw. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1439093003 .
2015-11-13Fold CXFA_LayoutItem into CXFA_LayoutItemImpl.Tom Sepez
Fixes illegal casting between unrelated types, and removes about 30 explicit casts that are no longer required. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1441183002 .
2015-11-12Merge to XFA: Fix another typo in BUILD.gnOliver Chang
TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1438253004 . (cherry picked from commit 8bfd2fbe8a95f0b7a43f1bd29e70f61bd73e499c) Review URL: https://codereview.chromium.org/1441963002 .
2015-11-12Merge to XFA: Remove relative includes.Lei Zhang
That refer to parent directories. TBR=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1434223002 . (cherry picked from commit 22bc4227fbbda5a5e9abad2a2c0a98c04fe7f228) Review URL: https://codereview.chromium.org/1439223003 .
2015-11-12Merge to XFA: Fix typos in BUILD.gn.Oliver Chang
Accidentally reverted this while rebasing another CL. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1441473004 . (cherry picked from commit 4274ea205ca2219f6a4cfc54025284c1aa3b14b8) Review URL: https://codereview.chromium.org/1438173003 .
2015-11-12Remove two unused IXFA interfaces.Tom Sepez
R=thestig@chromium.org Review URL: https://codereview.chromium.org/1439083002 .
2015-11-12Merge to XFA: Clear decoders after the image decoder in the /Filter array.Oliver Chang
During decoding, when an image decoder is encountered, any subsequent decoders are ignored, but remain in the array. However, later on CPDF_DIBSource::ValidateDictParam expects the image decoder to be the last in the array, causing issues. A check is also added in CPDF_DIBSource::GetScanline to ensure that the calculated pitch value is <= the (4-aligned) pitch value in the cached bitmap to prevent future issues. Also cleans up some NULL usages. BUG=552046 TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1406943005 . (cherry picked from commit 182d129bcee8f7731b9bbfde0064295ad3b37271) Review URL: https://codereview.chromium.org/1436153003 .
2015-11-11Revert "Merge to XFA: Roll DEPS for v8 to ab1165f. Regular weekly roll."Lei Zhang
This reverts commit 034477eb3a56690d339776d900100794a0f37853. TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1432213005 .
2015-11-11Merge to XFA: Roll DEPS for v8 to ab1165f. Regular weekly roll.Lei Zhang
TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1437043002 . (cherry picked from commit 44a4de0b4bd5148396b2b0de1353dafee6a4c418) Review URL: https://codereview.chromium.org/1433303003 .
2015-11-11Merge to XFA: Fix / simplify CFX_FolderFontInfo::GetFontData() behavior.Lei Zhang
The GetFontData() behavior in FPDF_SYSFONTINFO seems reasonable. Also do some code cleanup. TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1425023003 . (cherry picked from commit e0c16d7461ca8317433d93835e4c36a84157cbef) Review URL: https://codereview.chromium.org/1438943002 .
2015-11-11Merge to XFA: Fix extraction of colour components in ↵Oliver Chang
CPDF_DIBSource::DownSampleScanline32Bit Previously, if |m_bpc| was < 8 (e.g. 4), this function may still try to access the source components as if |m_bpc| == 8. Even when it fell into the codepath that tried to do the right thing in this case, it was wrong. BUG=554151 TBR=tsepez@chromium.org Committed: https://pdfium.googlesource.com/pdfium/+/9b99615806e358fdb396d1cb162ee2e69c2a20ec Review URL: https://codereview.chromium.org/1433423002 . (cherry picked from commit e21fe98d5b5da7da01503b985b07b90c8e811689) Review URL: https://codereview.chromium.org/1441563002 .
2015-11-11Merge to XFA: Replace CJS_Parameters with std::vector<CJS_Value>.Lei Zhang
TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1437713003 . (cherry picked from commit f20a34c0f2dfca49f735a0f11147254c26831e7c) Review URL: https://codereview.chromium.org/1437863005 .
2015-11-11Merge to XFA: Cleanup CPDF_ApSettings and CJS_Parameters.Lei Zhang
TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1432863004 . (cherry picked from commit 56e3da27d8bed8a6c03274b7b946e3f6d6ac11f4) Review URL: https://codereview.chromium.org/1436843003 .
2015-11-11XFA: Use c++ style casts elsewhere in xfa_ffnotify.cppTom Sepez
Added FIXMEs to the spots where danger lurks. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1438553003 .
2015-11-10Merge to XFA: Fix typos in BUILD.gn.Lei Zhang
TBR=weili@chromium.org Review URL: https://codereview.chromium.org/1419763005 . (cherry picked from commit 211cab5b58151f09fbeafe2b18da77b63664c39d) Review URL: https://codereview.chromium.org/1407413016 .
2015-11-10Merge to XFA: Keep "static" objects per-context rather than per isolate.Tom Sepez
Original Review URL: https://codereview.chromium.org/1424933013 . (cherry picked from commit 7d4c74d1b96d82681d49519c129262a1568e87d4) TBR=jochen@chromium.org Review URL: https://codereview.chromium.org/1407063012 .
2015-11-10Segv when PDF-side JS object property getter invoked from XFA.Tom Sepez
The PDF-side native objects require that the current v8 context has been set-up to point at the state (via CJS_Runtime) for the getters, setters, and methods to operate against. XFA doesn't supply a context with that state, so at the first opportunity for a PDF-side object to be leaked to XFA, set up the context to mimic the PDF side. Changed FXJS_GetRuntimeFromIsolate() to FXJS_GetRuntimeFromV8Context() for consistency with the newly added method. BUG=pdfium:266 R=jochen@chromium.org Review URL: https://codereview.chromium.org/1412103010 .
2015-11-10Merge to XFA: Fix CalculatePitch32() issues.Tom Sepez
Original Review URL: https://codereview.chromium.org/1432073003 . (cherry picked from commit 46960a43145ab978ca3c90cb6133bb3d5600ad1d) BUG=pdfium:273 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1424473008 .
2015-11-10Fix invalid cast in CXFA_FFNotify::OnLayoutItemRemoving().Tom Sepez
There's a re-interpretation followed by a pointer-adjusting static cast required here, not just a blatant re-interpretation. BUG=pdfium:271 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1431313005 .
2015-11-10Merge to XFA: Prevent buffer underflow in CPDF_TextObject::CalcPositionDataOliver Chang
R=tsepez@chromium.org TBR=tsepez@chromium.org BUG=554115 Review URL: https://codereview.chromium.org/1435473004 . (cherry picked from commit 46d2e278f62454ed2392630b6d18d33d380a20eb) Review URL: https://codereview.chromium.org/1436673003 .
2015-11-10Merge to XFA: Get rid of _FX_JPEG_TURBO_Lei Zhang
Instead, set the libjpeg to use via GYP/GN. TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1433803002 . (cherry picked from commit 16f26fb7621c8ee554f4d7c5b4c1972eb0ed7065) Review URL: https://codereview.chromium.org/1409323010 .
2015-11-10XFA: Fix libjpeg header includes.Lei Zhang
BUG=pdfium:272 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1414043014 .
2015-11-10Merge to XFA: Cleanup CPDF_Stream:Lei Zhang
- Remove CPDF_Stream::Create() and checks that it might fail. - Remove m_pCryptoHandler that's always a nullptr. - Remove m_FileOffset that's always 0. - Rename file version of InitStream() to InitStreamFromFile(). - Use IsMemoryBased() in more places. TBR=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1415163009 . (cherry picked from commit e6e16954f0cdc324849fca9da883be8f131b3834) Review URL: https://codereview.chromium.org/1418493006 .
2015-11-10Merge to XFA: Use unique_ptr and initializer lists in various render files.Lei Zhang
TBR=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1436573003 . (cherry picked from commit c813e21d261c24867234107f2e2ca72e15cb2534) Review URL: https://codereview.chromium.org/1406933007 .
2015-11-10Merge to XFA: Remove core/src/fpdfapi/fpdf_font/common.h and use stdint types.Lei Zhang
TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1437603002 . (cherry picked from commit 21e079dd982f57daa9d5af0d9e48d58189ce35da) Review URL: https://codereview.chromium.org/1421303006 .
2015-11-10Merge to XFA: Make SDP_Table an array of int16_t.Lei Zhang
Move some functions into an anonymous namespace. TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1431253002 . (cherry picked from commit b5d6497946c1117e6f54506eb85b47e0a7e0234c) Review URL: https://codereview.chromium.org/1416113011 .
2015-11-10Merge to XFA: Fix relative includes within core/Lei Zhang
TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1427633010 . (cherry picked from commit 9fb27cb9797937499c9678bc74cf7846cbf5d2b8) Review URL: https://codereview.chromium.org/1438573002 .
2015-11-10Merge to XFA: Remove CFX_PtrArray usage in fpdfsdk.Lei Zhang
TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1430213002 . (cherry picked from commit 8deeacd23872ecc132a0a678e344a018b5114a3a) Review URL: https://codereview.chromium.org/1416113010 .
2015-11-10Merge to XFA: Use standard true and false to replace 'TRUE' and 'FALSE' in ↵Jun Fang
pdfium_test BUG=446715 TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1410073009 . Review URL: https://codereview.chromium.org/1413103007 .
2015-11-10Merge to XFA: Support linearized loadingJun Fang
BUG=446715 R=thestig@chromium.org, tsepez@chromium.org Review URL: https://codereview.chromium.org/1353093003 . Conflicts: core/include/fpdfapi/fpdf_parser.h core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp core/src/fpdfapi/fpdf_parser/fpdf_parser_parser_embeddertest.cpp samples/pdfium_test.cc testing/embedder_test.cpp testing/embedder_test.h Review URL: https://codereview.chromium.org/1412083010 .
2015-11-09Merge to XFA: Fix a leak in CPDF_Type3Font::LoadChar().Lei Zhang
TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1408063016 . (cherry picked from commit 6d9979dc685e3b67b0a6d9946376e026d75d3e47) Review URL: https://codereview.chromium.org/1418503020 .
2015-11-09Merge to XFA: Remove a couple of unused variables.Lei Zhang
-Wunused-variable triggers for PODs, but not for CFX_WideString. R=thakis@chromium.org TBR=thakis@chromium.org Review URL: https://codereview.chromium.org/1412423013 . (cherry picked from commit 3388f907ecac9e7662bca3bbfdf35721ded19f26) Review URL: https://codereview.chromium.org/1433703003 .
2015-11-09Merge to XFA: Fix all relative includes to core.Lei Zhang
Do some IWYU to fix build errors due to files that have no #includes but just happened to work previously because the #includes were in the right order. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1407423004 . (cherry picked from commit 9e7cd8ffb81c564e1102f6c6459ec0942a0b11ea) Review URL: https://codereview.chromium.org/1425163004 .
2015-11-09Merge to XFA: Remove dead code in fx_codec_jbig_enc.cpp.Lei Zhang
TBR=weili@chromium.org Review URL: https://codereview.chromium.org/1420693004 . (cherry picked from commit 37e4a11e58257b757bec2700bc53facc59d0b845) Review URL: https://codereview.chromium.org/1423583005 .
2015-11-09fix an embedder test in XFA branch.Wei Li
The merge https://codereview.chromium.org/1411403012/ broken build since there are one more embedder test in XFA branch. Fix this test in this CL. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1415163008 .
2015-11-09Merge to XFA: Add path service to retrieve test data directory at run time ↵Wei Li
so tests can be run from any directory. Previously the tests which read test files assume the current directory is under pdfium. Running from any other directory will break the build. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1408003014 . (cherry picked from commit c0e93a9a942fe7d99800502a61d2fbb58cf9276f) Conflicts: core/src/fpdfapi/fpdf_parser/fpdf_parser_parser_embeddertest.cpp fpdfsdk/src/fpdfdoc_embeddertest.cpp testing/embedder_test.cpp testing/embedder_test.h Review URL: https://codereview.chromium.org/1411403012 .
2015-11-09Merge to XFA: Cleanup some fxge font code.Lei Zhang
TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1426403008 . (cherry picked from commit 94a4956f7aadc10fe6dd8451e965bd7447985b76) Review URL: https://codereview.chromium.org/1410683013 .
2015-11-09Merge to XFA: Add some nullptr checks that were missing from commit f7992b39.Lei Zhang
BUG=pdfium:268 TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1425293010 . (cherry picked from commit a8f5b7b5e7501bdcfba585fc8af76c4a0fab22cb) Review URL: https://codereview.chromium.org/1418823008 .
2015-11-09Merge to XFA: Fix leaks in CPDF_SyntaxParser::ReadStream.Lei Zhang
TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1419533016 . (cherry picked from commit 2ce28d26ad16e11828b19f602fcc0ff625a23345) Review URL: https://codereview.chromium.org/1414963007 .
2015-11-06XFA: Actually fix all relative includes to third_party.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1413253003 .
2015-11-06Merge to XFA: Fix all relative includes to public.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1415803007 . (cherry picked from commit 5899671184d01b74989d181363066379ef3e4051) Review URL: https://codereview.chromium.org/1431593007 .
2015-11-06Merge to XFA: Rename CFXJS_PrivateData to CFXJS_PerObjectData.Tom Sepez
Original Review URL: https://codereview.chromium.org/1424933012 . (cherry picked from commit b2dd2c96f6271a1520c36d707b626a34c72f7fb6) R=thestig@chromium.org TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1411333006 .
2015-11-06Merge to XFA: Fix all relative includes to third_party.Lei Zhang
- In non-standalone builds, use the provided jpeg library. - Run gn format over all the GN files. - Also roll DEPS for buildtools to c2f2598. - And fix XFA's lack of #includes. BUG=541704 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1425153006 . (cherry picked from commit 34bb6c58fe60206a08dc0a1f37b7cfe83e8c762c) Review URL: https://codereview.chromium.org/1434543003 .
2015-11-06XFA: Suppress remaining failing corpus tests on Linux.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1417703011 .
2015-11-06XFA: Rename freetype to fx_freetype in pdfium.gyp.Lei Zhang
Forgot to do so in commit 461b634b8b45bf022412b364fac37f6ad3cafb69. TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1431073003 .
2015-11-06XFA: Sync samples/ build files with master.Lei Zhang
This makes pdfium_test always link with the bundled freetype, which will fix many failing corpus tests. This merges snippets of 34bb6c58fe60206a08dc0a1f37b7cfe83e8c762c R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1423063006 .