Age | Commit message (Collapse) | Author |
|
This reverts commit 7cc97521db1e52d5927f5605de5f9a7102f8af40.
|
|
Driven by CS search for
pcre:yes file:third_party/pdfium/ -file:pdfium/third_party/
\breturn\b[^;]*;\s*\n*\s*\}*\s*\n*\r*else
Note: Care is required to ensure the preceding block is not an else-if.
As usual, removed any tabs I saw.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1243883003 .
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1249643003 .
|
|
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1233453014 .
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1195363002 .
|
|
- untabify as encountered.
- Only put single-statement method in .h file, move more
complex methods to .cpp (counting an if without braces as
a single statement, killing braces as needed).
- Move invariant arguments to constructor and make
corresponding members const.
- Make all members private and add accessor methods.
- Make existing accessor methods const where possible.
- Kill meaningless asserts.
- Add helper functions in place of duplicate code.
- Rename GetCurrentDoc() to GetSDKDocument(), since the class
has two document members, one of CPDF_Document and one of
CPDFSDK_Document, making it clear which one you get.
- Simplify some logic with early returns.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1235393002 .
|
|
Chrome already uses 0 and 1.
BUG=none
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1235303003 .
|
|
Kill some unused macros along the way, and put prototypes
in header files.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1233203004 .
|
|
BUG=none
TBR=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1241863003 .
|
|
In Chrome, all Isolates must be created by gin
R=tsepez@chromium.org, ulan@chromium.org
BUG=
Review URL: https://codereview.chromium.org/1234053003 .
|
|
Allows the following command to return only legitimate
warnings:
buildtools/checkdeps/checkdeps.py --resolve-dotdot
The remaining warnings consist of:
- fx_parser_filters.cpp, due to inclusion of
third_party/zlib_v128/zlib.h, showing the lack
of a header and some prototypes in that .cpp file.
- third_party/*, due to inclusion of fx_system.h and
the like, indicating adulterated libraries that should
be restored to their pristine state.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1233583004 .
|
|
Clang warns if there are missing braces around a subobject
initializer. The most common idiom that triggers this is:
STRUCT s = {0};
if the first field of STRUCT is itself a struct. This can
be more simply written as:
STRUCT s = {};
which also prevents the warning from firing.
Other instances of the warning have been fixed by adding
braces where appropriate.
R=brucedawson@chromium.org
Review URL: https://codereview.chromium.org/1213523004.
|
|
This reverts commit 74742a75ac7a07c08cf36fe6f4eaa91bed8236a3.
|
|
The current |bitpos1| calculation protects the passed argument to
_GetBits32(): |bitpos.ValueOrDie() + j * m_nBitsPerSample|, but doesn't
account for adding in the sample length in that routine.
Also bound bits per sample to something reasonable to avoid undefined
behaviour on the shift to compute the max value.
BUG=471990
R=jun_fang@foxitsoftware.com
Review URL: https://codereview.chromium.org/1219663003.
|
|
- Return true instead of false. All the other unsupported JS
functions return true.
- Adjust test expectations accordingly.
TBR=jam@chromium.org
Review URL: https://codereview.chromium.org/1196163006.
|
|
R=jam@chromium.org
Review URL: https://codereview.chromium.org/1198903002.
|
|
R=jam@chromium.org
Review URL: https://codereview.chromium.org/1194153002.
|
|
1) Document::deletePages()
2) CPDFSDK_Document::DeletePages()
3) Document::removeIcon()
4) IconTree::DeleteIconElement()
Originally (1) called (2), but only when FOXIT_CHROME_BUILD was not
defined. Since it was always defined for PDFium, this was effectively
dead code the whole time. Ditto for (3) and (4). The functions were
deemed unsafe in https://crbug.com/67100
R=jam@chromium.org
Review URL: https://codereview.chromium.org/1193323002.
|
|
R=jam@chromium.org
Review URL: https://codereview.chromium.org/1196853002.
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1181593003.
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1192743004.
|
|
A virtual method that does |delete this| is an anti-pattern.
Some classes can be de-virtualized instead.
Throw in some unique_ptrs and delete dead code for good measure.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1192013002.
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1176333002.
|
|
Review URL: https://codereview.chromium.org/1186673005.
|
|
The input cannot be null. Same for CPDF_Document::LoadFontFile().
Also set the contract for CPDF_Document::LoadFont() and adjust callers
accordingly.
Also remove unused CPDF_Document::FindFont().
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1184673002.
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1173343004.
|
|
Also remove commented out code and trailing whitespaces.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1179653005.
|
|
These stand for const CFX_{Byte,Wide}StringC&, which is just
monumentally confusing, since there are so many string types
running around here.
The following had manual changes:
core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp
core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
core/src/fpdfdoc/doc_form.cpp
fpdfsdk/src/fpdf_ext.cpp
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1180593004.
|
|
Remove callers and related code that all just pass zeros around.
Also remove CFFL_IFormFiller::GetKeyDown().
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1149623012.
|
|
This involves fixing some multiple variable per line
declarations, as the textually-substituted "*" applies
only to the first one.
This involves moving some consts around following the
substitution.
This involves replacing some typedefs used as constructors
with better code.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1171733003
|
|
It's redundant nowadays to provide our own equivalents, now
that this is done for us by the system header.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1177483002
|
|
- include system headers first and alphabetize.
- remove unsupported FX_WIN32_MOBILE symbol.
- actually define a FX_WIN64 symbol and make consistent.
- use final/override, not FX_FINAL.
- let stdint.h resolve FX_WORDSIZE concerns.
- unused FX_ERR and FX_SUCCESS() macros.
- unused FX_LSB_FIRST macro.
- outline FX type deprecation plan.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1169963003
|
|
Remove dead code in CPDF_Annot as well.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1157773012
|
|
Caught by checkdeps rules. That this still compiled is probably due to
some stray -I flag somewhere.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1149213008
|
|
Small bit of OCD here, since this file is included cross-library
(i.e. from fpdfsk), it can't be in src/. In other words, the
following should be empty:
grep -R 'include.*core/src/' fpdfsdk
Fix some IWYU in it at the same time.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1147353006
|
|
Reproducing this bug requires the embedder to fire timers, something the
single-pass pdfium-test binary doesn't do properly at the present. So
we modify the embedder test delegate to allow the immediate triggering
of the same.
Perform some cleanup along the way by removing EmbedderTestDefaultDelegate
-- it buys us nothing over the the no-op one.
And, of course, v8 initialization is busted again, and we need v8 here.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1153213004
|
|
This fix removes CJS_DelayData object from m_DelayData array and copies them to
a new array, before processing them. So contents of m_DelayData array cannot be
used after they get freed.
BUG=487928
R=tsepez@chromium.org
TEST= Chrome pdf plugin should not crash when poc_stable,testuafdocument1.pdf
and testuafdocument2.pdf are viewed.
see crbug.com/487928 and crbug.com/487928#c18 for more details.
Review URL: https://codereview.chromium.org/1163823002
|
|
Get rid of leading _CAPITAL identifiers.
A large number of these didn't actually match the filename.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1160443004
|
|
Tiny bit of tidying I noticed while trying to figure out include rules.
In other words,
cd core/include
git grep 'include.*include'
git grep 'include.*src'
Should produce no output, and
cd fpdfsdk/include
git grep 'include.*include' | grep -v ../core/include
git grep 'include.*src'
Should produce no output as well.
Fix some IWYU, header guards, include ordering, whitespace along the way.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1162453003
|
|
Mostly cosmetic; fix a spelling error, make comment style
consistent, remove unnecessary #ifdefs, remove unused globals.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1139993003
|
|
Fixes the ordering of some assignments broken when converting to checked
numerics in CFX_PathData::AddPointCount().
Original Review URL: https://codereview.chromium.org/1142713005
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1135893008
|
|
This reverts commit eb6527763171cdb4b0fbfea5a20d691f4d67b660.
Reason for revert: broke javascript tests.
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1145843005
|
|
This permits some functions to become void's since
they, in turn, can't fail.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1142713005
|
|
those types are just aliases, and we should consistently use the new version
R=tsepez@chromium.org
BUG=
Review URL: https://codereview.chromium.org/1138823004
|
|
In most cases, we just CHECK() that no exception was thrown. Previously,
we'd just crash.
Ideally, this should all be fixed and the system should cope with those
exceptions, but that's beyond this CL.
R=tsepez@chromium.org
BUG=
Review URL: https://codereview.chromium.org/1126203010
|
|
Also change EmbedderTest::TearDown() to match the destruction order in
Chromium's PDF code.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1138143003
|
|
Also fix typos and remove trailing spaces/tabs.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1141123002
|
|
Phantom handles allow for freeing objects with one pass of GC. However,
this means that by the time the callback is invoked, the v8 object already
does no longer exist. To avoid accidential access to the dead object, there
are now two callbacks, where the first must only reset the handle, and the
second does the clean-up work.
R=tsepez@chromium.org
BUG=
Review URL: https://codereview.chromium.org/1129253004
|
|
The internal fields are scanned by the garbage collector, so they can't contain arbitrary data. However, aligned pointers are supported by the V8 GC, so the V8
API allows for setting a pointer directly instead of wrapping it in an External
container.
Not only is this faster, but it's also required for the new v8::Global API which
I'm going to update to in a follow-up patch.
R=tsepez@chromium.org
BUG=
Review URL: https://codereview.chromium.org/1139853003
|
|
This involves adding some missing extern "C" { } declarations,
using FPDF_ types instead of C++ types, and converting pass
by reference arguments into pointers.
Test this using fpdfview_embedertest for simplicity.
BUG=pdfium:158
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1130843003
|