Age | Commit message (Collapse) | Author |
|
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
|
|
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
|
|
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
|
|
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
|
|
Review-Url: https://codereview.chromium.org/1924093003
|
|
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
|
|
Capitalize m_bindItems while we're at it.
Review-Url: https://codereview.chromium.org/1932513002
|
|
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
|
|
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
|
|
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
|
|
Update the default goma directory to the current one.
Review-Url: https://codereview.chromium.org/1924903002
|
|
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
|
|
Remove IFX_FontProvider, IFX_FontSourceEnum, IFX_SAXReader and
IFX_SAXReaderHandler.
Review-Url: https://codereview.chromium.org/1930533002
|
|
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
|
|
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
|
|
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
|
|
So pass by const-ref instead of by pointer.
Review URL: https://codereview.chromium.org/1923153002
|
|
Review URL: https://codereview.chromium.org/1925453002
|
|
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
|
|
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
|
|
- 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
|
|
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
|
|
Two different versions, one in xfa and one in fpdfsdk,
both do nothing.
Review URL: https://codereview.chromium.org/1915323002
|
|
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
|
|
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
|
|
Contents:
https://chromium.googlesource.com/v8/v8/+log/47bcec78..0ff89ea75
BUG=chromium:606547
Review URL: https://codereview.chromium.org/1920863003
|
|
Reformat some more public/ header documentation.
Review URL: https://codereview.chromium.org/1917103002
|
|
Currently when you call DelegePage on a CPDFXFA_Document the page will not be
correctly removed. The page is left in the underlying document and, if
GetPage was never called for that page index nothing will happen.
This CL updates the code to always remove the page_index from the underlying
CPDF_Document then, if needed, the original code runs to clear out the
XFA page list for that page.
BUG=chromium:596373
Review URL: https://codereview.chromium.org/1921033003
|
|
Review URL: https://codereview.chromium.org/1917493002
|
|
This issue was found by clang-tidy linter.
BUG=589955
Review URL: https://codereview.chromium.org/1921713003
|
|
Too many calls were of the form fn(x.c_str(), x.GetLength())
which is an anti-pattern given the StringC classes which tie
these together.
There are a few places where explicit CFX_*StringCs are
constructed, but this can be avoided by changing the args
to these functions in the same manner.
Removed String_ from name of functions since it added
little value. Also removed default argument.
Review URL: https://codereview.chromium.org/1919563002
|
|
These runners are very similar in their implementation. Combine them into
a single test runner.
Corpus will, hopefully, be combined into this test runner in the future.
Review URL: https://codereview.chromium.org/1906803005
|
|
Without the mac_deployment_target_build_override variable in build.gni
the following error is produced.
ERROR at //build/config/mac/mac_sdk.gni:17:27: Undefined identifier
mac_deployment_target = mac_deployment_target_build_override
^-----------------------------------
Added needed gtest/gtest_mac.* files.
BUG=pdfium:106
Review URL: https://codereview.chromium.org/1907193002
|
|
We have three failed unit tests -- FX_AllocOverflow(),
FX_AllocOverflow2D(), and FX_TryAllocOverflow() on Linux and Mac
release builds, because Clang aggressively optimizes the code.
Adding some usage of the return value of a function can avoid the function
being optimized away by Clang.
Review URL: https://codereview.chromium.org/1915693002
|
|
Some unknown software generates cross reference table with the
claimed object numbers are all off by one. Add a simple verification
function to detect this scenario, thus have a chance to rebuild
the correct cross reference table.
To avoid unnecessary checks and potiential performance hit, we only
check for the very first non free entry.
BUG=602650
Review URL: https://codereview.chromium.org/1910063004
|
|
Replace one instance with std::map.
Remove another instance that is never inserted into.
Review URL: https://codereview.chromium.org/1919433002
|
|
Missing default statement in the switch. Duplicated the method signature
on both sides of the #ifdef to make it clearer what was going on.
Review URL: https://codereview.chromium.org/1905303003
|
|
fx_system.h errors out during compile if _FXM_PLATFORM_ is not
one of the four values tested in the ifdef.
Remove duplicated code, and use unique_ptr for cleanup.
Review URL: https://codereview.chromium.org/1912023002
|
|
Review URL: https://codereview.chromium.org/1904303002
|
|
Review URL: https://codereview.chromium.org/1909213002
|
|
The original code caused an optimization warning when
gcc tries to get rid of 'count > m_Length - index'
in CFX_ByteStringC::Mid() while assuming there is no signed
integer overflow.
This could also be avoided once FX_STRSIZE is no longer a
signed integer type.
Review URL: https://codereview.chromium.org/1906213002
|
|
Replace two parallel arrays with an array of pairs.
Several methods always returned same value, make void instead.
Review URL: https://codereview.chromium.org/1908153002
|
|
The only place its used, elements are added to it but the
array is not used otherwise.
Review URL: https://codereview.chromium.org/1906133002
|
|
There is only one subsclass, use that instead. Remove the use of WideStringC
in the API.
BUG=pdfium:468
Review URL: https://codereview.chromium.org/1911843002
|
|
This CL removes the CFWL_Note class. The two subclasses, CFWL_Event and
CFWL_Message are distinct types and should not be related by the subclass. The
code has been updated to pass the correct types as needed.
The various FWL_EVTHASH and FWL_MSGHASH defines have all been removed and turned
into an FWL_EventType and FWL_MessageType enum classes.
BUG=pdfium:474
Review URL: https://codereview.chromium.org/1901183002
|
|
R=dsinclair@chromium.org
BUG=chromium:605491
Review URL: https://codereview.chromium.org/1910143002
|
|
Use RVO now that we use an array type compatible with it.
Review URL: https://codereview.chromium.org/1906903002
|
|
Its implicit copy constructor is unsafe, since it ends up
sharing the underlying data. Fix one place where it was
being unintentionally invoked.
Review URL: https://codereview.chromium.org/1908073003
|
|
Replace two parallel arrays with single array of pairs.
Review URL: https://codereview.chromium.org/1911673002
|
|
The principle has been implicit in the implementation, but
make it obvious for future generations.
Review URL: https://codereview.chromium.org/1904143002
|