summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-05-03Revert of Relax a couple checks to allow certain non-standard PDF files. ↵weili
(patchset #1 id:1 of https://codereview.chromium.org/1926823002/ ) Reason for revert: Speculatively revert due to high volume of crashes on Chromium. Original issue's description: > Relax a couple checks to allow certain non-standard PDF files. > > Some non-standard PDF files misuse the size of cross reference table, > and reuse some object number which the old one is still in use. PDFium > can relax the reusing of xref objects only since it is not referred in > the pdf document. When the size of cross reference table is larger > than defined, PDFium will try to continue other than abort. > > BUG=chromium:596947 > > Committed: https://pdfium.googlesource.com/pdfium/+/cd1e9ff4f432cbc29ed279e6891fb7ddc2ea3734 TBR=thestig@chromium.org,dsinclair@chromium.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=chromium:596947 Review-Url: https://codereview.chromium.org/1946693002
2016-05-03Reland of Allow overriding GN build flagschromium/2724dsinclair
This reverts commit 038bf0b129e56212a6de0989dca1ae023bb17c5d. In order to enable XFA from GN builds we need to be able to override pdf_enable_xfa. To do this a build_overrides/pdfium.gni file needs to be created in Chrome. To use that, //pdfium.gni reads the override values and sets them into the defined arguments. We have to create a build_overrides/pdfium.gni file in PDFium that sets the default overrides for PDFium builds. BUG=chromium:62400 Review-Url: https://codereview.chromium.org/1936313002
2016-05-02Replace CFX_PtrArray with typesafe CFX_ArrayTemplate, part 11tsepez
Last part. Remove CFX_PtrArray typedef. Review-Url: https://codereview.chromium.org/1941863002
2016-05-02Fix lint bugs.thestig
Also fix typos and overrides. Review-Url: https://codereview.chromium.org/1935793002
2016-05-02Remove unneeded CPVT classes.thestig
- CPVT_Size is the same as CFX_PointF - CPVT_FloatRange is unused. - CPVT_ArrayTemplate is just a wrapper for CFX_ArrayTemplate. Review-Url: https://codereview.chromium.org/1919283008
2016-05-02Replace CFX_PtrArray with typesafe CFX_ArrayTemplate, part 10tsepez
Review-Url: https://codereview.chromium.org/1936733002
2016-05-02Add tree status check to PDFium CQ.chromium/2723dsinclair
This CL adds in the tree status check so the CQ will not commit if the waterfall closes the PDFium tree. BUG=chromium:607625 Review-Url: https://codereview.chromium.org/1937943002
2016-05-02Remove IFDE_TxtEdt interfaces where possible.dsinclair
This CL removes the following and uses the only instance instead. * IFDE_TxtEdtParag * IFDE_TxtEdtEventSink * IFDE_TxtEdtEngine * IFDE_TxtEdtBuf Review-Url: https://codereview.chromium.org/1927973003
2016-04-30Revert of Allow overriding GN build flags (patchset #2 id:20001 of ↵dsinclair
https://codereview.chromium.org/1923333002/ ) Reason for revert: Blocking the roll Original issue's description: > Allow overriding GN build flags > > In order to enable XFA from GN builds we need to be able to override > pdf_enable_xfa. To do this a build_overrides/pdfium.gni file needs to be created > in Chrome. To use that, we have to create a build_overrides/pdfium.gni file > in PDFium that just uses the default values. > > BUG=chromium:62400 > > Committed: https://pdfium.googlesource.com/pdfium/+/1ae572e7e35b52ce4897d1715c005a1b0f79526a TBR=thakis@chromium.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=chromium:62400 Review-Url: https://codereview.chromium.org/1941563002
2016-04-29Use utilities from build directory instead of own copiesweili
GYP and GN builds share some common utilities. GYP has three utilities in its own directory which are also synced in build directory now. We will use utilities from build directory instead of keeping our own copies. Compared to our own copies, utilities in build directory are either same or newer. find_depot_tools.py is identical; vs_toolchain.py and find_sdk.py have some minor updates. Review-Url: https://codereview.chromium.org/1933843002
2016-04-29Subtract instead of adding the negation.thestig
Do more cleanup in modified files. Review-Url: https://codereview.chromium.org/1938613003
2016-04-29Replace CFX_PtrArray with typesafe CFX_ArrayTemplate, part 9tsepez
Converted one place to unique_ptr to avoid redundant cleanup. Review-Url: https://codereview.chromium.org/1937593002
2016-04-29Documentation change for Window toolchain settingweili
Add a section about Windows Visual Studio toolchain setting. Also announce we are using the Visual Studio toolchain from depot_tools as default. Review-Url: https://codereview.chromium.org/1891383002
2016-04-29Replace CFX_PtrArray with typesafe CFX_ArrayTemplate, part 8tsepez
This also removes another hand-written bubblesort in favor of the std::sort() STL function. Review-Url: https://codereview.chromium.org/1937513002
2016-04-29Relax a couple checks to allow certain non-standard PDF files.weili
Some non-standard PDF files misuse the size of cross reference table, and reuse some object number which the old one is still in use. PDFium can relax the reusing of xref objects only since it is not referred in the pdf document. When the size of cross reference table is larger than defined, PDFium will try to continue other than abort. BUG=chromium:596947 Review-Url: https://codereview.chromium.org/1926823002
2016-04-29Replace CFX_PtryArray with typesafe CFX_ArrayTemplate, Part 7tsepez
Remaining uses are all in fxbarcode/. Review-Url: https://codereview.chromium.org/1937453002
2016-04-29Avoid nullptr dereferences in sycc444_to_rgb().thestig
BUG=607739 Review-Url: https://codereview.chromium.org/1934483002
2016-04-28Do not check pointers before deleting them.thestig
XFA edition. Review-Url: https://codereview.chromium.org/1925363002
2016-04-28Convert CFX_PtrArray to typesafe CFX_ArrayTemplate, Part 6tsepez
Review-Url: https://codereview.chromium.org/1926303002
2016-04-28Reland of Use visual studio toolchain from depot_tools for PDFium ↵weili
compilation (patchset #1 id:1 of https://codereview.chromium.org/1922373003/ ) Reason for revert: I fixed Clang build config, and updated drm binary. Should work this time. Original issue's description: > Revert of Use visual studio toolchain from depot_tools for PDFium compilation (patchset #3 id:40001 of https://codereview.chromium.org/1897523002/ ) > > Reason for revert: > Clang build is broken. drm build has some problem. Will revert this change for now. > > Original issue's description: > > Use visual studio toolchain from depot_tools for PDFium compilation > > > > Change to use visual studio toolchain from depot_tools by default. > > Setting DEPOT_TOOLS_WIN_TOOLCHAIN=0 allows compilation using system > > toolchain as before. > > > > Using toolchain from depot_tools unifies the compilation > > environment, and brings the benefits of automated update, bug fixes > > etc. > > > > Committed: https://pdfium.googlesource.com/pdfium/+/590f2d9e057a0d5b17a9706affd3c6115265021b > > TBR=brucedawson@chromium.org,thestig@chromium.org,tsepez@chromium.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Committed: https://pdfium.googlesource.com/pdfium/+/df96690d4e3799536b981e3673d64018fa5fd037 TBR=brucedawson@chromium.org,thestig@chromium.org,tsepez@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review-Url: https://codereview.chromium.org/1927373002
2016-04-28Replace CFX_PtrArray with typesafe CFX_ArrayTemplate, Part 5tsepez
Remove unused m_pdf417byteSegments, which was coped into from an empty array and never again referenced. Review-Url: https://codereview.chromium.org/1927253002
2016-04-28Update Dr. memory tool to version 1.10.16880Wei Li
This version contains fixes that are required for running binaries compiled with Visual Studio 2015. R=zhaoqin@chromium.org Review URL: https://codereview.chromium.org/1933493002 .
2016-04-28Replace CFX_PtrArray with typesafe CFX_ArrayTemplate, part 4tsepez
Review-Url: https://codereview.chromium.org/1932703003
2016-04-28Fix stack overflow from nested arrays.thestig
BUG=pdfium:422 Review-Url: https://codereview.chromium.org/1930743003
2016-04-28Make two compilation flags for Windows Clang build effectiveweili
These two flags are not properly used. Change to the correct configuration to make them effective. Review-Url: https://codereview.chromium.org/1925143002
2016-04-28Change bool type to fix warnings.chromium/2720dsinclair
Switching the Is{SHIFT|CTRL|ALT|}KeyDown methods to bool from FX_BOOL generated cfx_systemhandler.cpp(129): warning C4800: 'FX_BOOL': forcing value to bool 'true' or 'false' (performance warning) on the win_chromium_x64_rel_ng and win8_chromium_ng bots. This CL switches back to FX_BOOL. Attempting to move everything to bool has huge ripple effects. I removed IsINSERTKeyDown as it was always false. Review-Url: https://codereview.chromium.org/1929963002
2016-04-28More FWL interface cleanup.dsinclair
This CL merges the IFWL_Target class into IFWL_Widget and IFWL_Thread into IFWL_App. The IFWL_WidgetMgrDelegate, IFWL_NoteDriver and IFWL_NotThread are removed in favour of their concrete classes. Review-Url: https://codereview.chromium.org/1921853006
2016-04-28Cleanup IFDE_CSS interfaces.dsinclair
This CL removes the follwing in favour of their concrete class. * IFDE_CSSDeclaration * IFDE_CSSSelector * IFDE_CSSSyntaxParser * IFDE_CSSStyleSelector Review-Url: https://codereview.chromium.org/1928763002
2016-04-28Remove output redirect from corpus test runner.dsinclair
The corpus tests redirect output to a string but they just output it later anyway. This CL removes the output redirect and removes the redirect_output flag which will always be False now. Review-Url: https://codereview.chromium.org/1927633002
2016-04-27Replace CFX_PtrArray with typesafe CFX_ArrayTemplate<>, part 3tsepez
Review-Url: https://codereview.chromium.org/1924093003
2016-04-27Revert of Use visual studio toolchain from depot_tools for PDFium ↵weili
compilation (patchset #3 id:40001 of https://codereview.chromium.org/1897523002/ ) Reason for revert: Clang build is broken. drm build has some problem. Will revert this change for now. Original issue's description: > Use visual studio toolchain from depot_tools for PDFium compilation > > Change to use visual studio toolchain from depot_tools by default. > Setting DEPOT_TOOLS_WIN_TOOLCHAIN=0 allows compilation using system > toolchain as before. > > Using toolchain from depot_tools unifies the compilation > environment, and brings the benefits of automated update, bug fixes > etc. > > Committed: https://pdfium.googlesource.com/pdfium/+/590f2d9e057a0d5b17a9706affd3c6115265021b TBR=brucedawson@chromium.org,thestig@chromium.org,tsepez@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review-Url: https://codereview.chromium.org/1922373003
2016-04-27Replace CFX_PtrArray with type-safe CFX_ArrayTemplate, Part 2tsepez
Capitalize m_bindItems while we're at it. Review-Url: https://codereview.chromium.org/1932513002
2016-04-27Adding default_exe_manifest to two binariesbrucedawson
gn builds are missing Windows manifests for pdfium_diff.exe and pdfium_test.exe. These manifests are necessary in order to get predictable behavior on Windows. BUG=602505 Review-Url: https://codereview.chromium.org/1927593003
2016-04-27Replace CFX_PtrArray with type-safe CFX_ArrayTemplate<>, Part 1.tsepez
Ideally, these will become std::vector<>, but in the mean time this is quicker and allow us to remove casts. Doing so has already turned up one place where the wrong type of object was being used. Review-Url: https://codereview.chromium.org/1924073002
2016-04-27Use visual studio toolchain from depot_tools for PDFium compilationweili
Change to use visual studio toolchain from depot_tools by default. Setting DEPOT_TOOLS_WIN_TOOLCHAIN=0 allows compilation using system toolchain as before. Using toolchain from depot_tools unifies the compilation environment, and brings the benefits of automated update, bug fixes etc. Review-Url: https://codereview.chromium.org/1897523002
2016-04-27Use the correct default goma directory on Windowsweili
Update the default goma directory to the current one. Review-Url: https://codereview.chromium.org/1924903002
2016-04-27Allow overriding GN build flagsdsinclair
In order to enable XFA from GN builds we need to be able to override pdf_enable_xfa. To do this a build_overrides/pdfium.gni file needs to be created in Chrome. To use that, we have to create a build_overrides/pdfium.gni file in PDFium that just uses the default values. BUG=chromium:62400 Review-Url: https://codereview.chromium.org/1923333002
2016-04-27More IFX_ interface cleanup.dsinclair
Remove IFX_FontProvider, IFX_FontSourceEnum, IFX_SAXReader and IFX_SAXReaderHandler. Review-Url: https://codereview.chromium.org/1930533002
2016-04-27Standardize on ASSERT.dsinclair
There are currently three ways to assert in the code (ASSERT, FXSYS_assert and assert). This CL standardizes on ASSERT. The benefit of ASSERT is that it can be overridden if the platform requies and we can pickup the Chromium version if it has already been defined in the build. This does change behaviour. Currently FXSYS_assert is always defined but ASSERT is only defined in debug builds. So, the FXSYS_assert's would fire in Release builds. That will no longer happen. BUG=pdfium:219 Review-Url: https://codereview.chromium.org/1914303003
2016-04-27Fix incorrect v8 TryCatch.etienneb
The Try-Catch object must live the whole lexical scope. Without the giving a name to the object, this is equivalent to create a temporary that is destroy at the end of the statement. /src/pdfium/pdfium/out/Debug/../../fpdfsdk/javascript/JS_Value.cpp:154:3: warning: object destroyed immediately after creation; did you mean to name the object? [misc-unused-raii] This issue was found by clang-tidy R=dsinclair BUG=589955 Review-Url: https://codereview.chromium.org/1929513002
2016-04-27Remove IFX_SystemHandler.dsinclair
This CL folds IFX_SystemHandler into CFX_SystemHandler. Methods which either had no implementation, or returned a default value have been removed. Review URL: https://codereview.chromium.org/1923093002
2016-04-26CPDF_Document::LoadPattern() and friends always have a valid matrix.thestig
So pass by const-ref instead of by pointer. Review URL: https://codereview.chromium.org/1923153002
2016-04-26Move CPDF_Document code into cpdf_document.cpp.thestig
Review URL: https://codereview.chromium.org/1925453002
2016-04-26Remove several IPDF_ interfaces and CPDF_RenderModule.dsinclair
This CL removes the interfaces: * IPDF_ObjectRenderer * IPDF_OCContext * IPDF_RenderModule * IPDF_PageModule The CPDF_RenderModule was just wrapping new and delete calls. This Cl moves those up to the callers and removes the CPDF_RenderModule class. Review URL: https://codereview.chromium.org/1918323003
2016-04-26CFX_ByteString::Reserve(), ReleaseBuffer() fixes.tsepez
Also identical fixes for CFX_WideString. Reserve() on an empty string would not actually reserve a buffer. Currently unused, but there are places where this would really help. ReleaseBuffer() would rarely return memory to the system, since it would short-circuit thinking it could operate in place. Tune the algorithm slightly so that we hold on when the savings is small. Bounds check release buffer args rather than just asserting. Add tests for all of these. Review URL: https://codereview.chromium.org/1916303004
2016-04-26Clean up CPDF_Page.thestig
- Merge CPDF_Page::Load() into ctor. - Remove always nullptr param for CPDF_Page::ParseContent(). - Remove unneeded indirection in IPDF_RenderModule. - Delete CPDF_ParseOptions. - Fix up CPDF_Pattern. Review URL: https://codereview.chromium.org/1918113002
2016-04-26Fix Wvarargs warning in XFA error code.chromium/2722chromium/2721chromium/2719chromium/2718dsinclair
Chrome has enabled the -Wvarargs warning that was added to clang, this fails with PDFium XFA builds due to two warnings: ../../xfa/fxfa/fm2js/xfa_lexer.cpp:539:16: error: passing an object that undergoes default argument promotion to 'va_start' has undefined behavior [-Werror,-Wvarargs] va_start(ap, msg); ^ ../../xfa/fxfa/fm2js/xfa_lexer.cpp:535:40: note: parameter of type 'XFA_FM_ERRMSG' is declared here void CXFA_FMLexer::Error(XFA_FM_ERRMSG msg, ...) { The issue is that XFA_FM_ERRMSG is an enum and we violate the promotion rules for passing the value to va_start. I removed the enum and named the flags explicitly then pass in the string as the argument. BUG=chromium:606726 Review URL: https://codereview.chromium.org/1921323002
2016-04-26Remove no-op ShowFileDialog(s).tsepez
Two different versions, one in xfa and one in fpdfsdk, both do nothing. Review URL: https://codereview.chromium.org/1915323002
2016-04-26Skip GYP if GYP_PDFIUM_NO_ACTION set.dsinclair
This CL updates the gyp_pdfium script to early exit if GYP_PDFIUM_NO_ACTION=1 is set in the users environment. This allows using GN to generate the out/Debug directory and not have it clobbered on a gclient sync. Review URL: https://codereview.chromium.org/1915953002
2016-04-26Fix unittest with embedded NUL character.etienneb
There is an embedded NUL character (previously line 40). The test was working because the beginning ot the string is identical. But, the rest of the string wasn't compare at all. TESTED: manually etienneb@burger:~/src/pdfium/pdfium$ out/Debug/pdfium_embeddertests --gtest_filter=*.EmptyCreation Note: Google Test filter = *.EmptyCreation [==========] Running 1 test from 1 test case. [----------] Global test environment set-up. [----------] 1 test from FPDFEditEmbeddertest [ RUN ] FPDFEditEmbeddertest.EmptyCreation [ OK ] FPDFEditEmbeddertest.EmptyCreation (13 ms) [----------] 1 test from FPDFEditEmbeddertest (13 ms total) [----------] Global test environment tear-down [==========] 1 test from 1 test case ran. (13 ms total) [ PASSED ] 1 test. R=dsinclair BUG=589955 Review URL: https://codereview.chromium.org/1916083002