Age | Commit message (Collapse) | Author |
|
This CL renames CFX_AutoRestorer to just AutoRestorer and places in the
fxcrt namespace.
Bug: pdfium:898
Change-Id: Id9f36df94e95f3b2a55054bc198ca1bfd249ee3d
Reviewed-on: https://pdfium-review.googlesource.com/14450
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
XFA bits passed into the PDFFontMgr are just used to get the
CPDF_Document and the CFGAS_FontMgr. This CL changes the code to pass
those two things into the constructor. Then, the fxfa/cxfa_pdffontmgr.*
code has been moved to fgas/cfgas_pdffontmgr.* to show it doesn't depend
on any of the XFA classes.
Change-Id: I21d791869e2a32ffedfd7c87bb3bbd035232d991
Reviewed-on: https://pdfium-review.googlesource.com/14550
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
I don't think this is valid anymore, removing TODO.
Change-Id: I69cfbf499fe9f259f664d30be850604a246ed6dd
Reviewed-on: https://pdfium-review.googlesource.com/14531
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL adds two mouse selection tests for CFWL_Edit. In order to do so
the needed selection code was added to the XFA widget handler and
plumbed down to the CFWL_Edit field as needed.
Bug: pdfium:840
Change-Id: Ia3b5f5d191494a4579c01524df8fb35b24cc0085
Reviewed-on: https://pdfium-review.googlesource.com/14530
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Combined with the previously added FPDFPath_CountPoint(), this allows
getting the coordinates of all points of a path.
Change-Id: Ic969723d4b01ee427498d38ce323c74147b87a9c
Reviewed-on: https://pdfium-review.googlesource.com/14111
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
When working with LineTo and BezierTo commands, verify we are within the
bounds of the path data before accessing elements.
Bug: pdfium:899
Change-Id: Iae9f9f3d0e5dbaf8d5452b86961ab8c79a6210f1
Reviewed-on: https://pdfium-review.googlesource.com/14490
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Some of the calls in CXFA_FMParser on the prase recursion had been
missed when adding in the parse depth limiting logic. The fuzzers
found them.
BUG=chromium:759295
Change-Id: Iad54beb356c4c555908797d4b58a42549c006e9e
Reviewed-on: https://pdfium-review.googlesource.com/14510
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
This CL adds unittests and implementations for the text edit engine
methods to get various indexes based on cursor position.
The |RebuildPieces| method was fixed to correctly keep track of
character position when dealing with BIDI characters.
Change-Id: Ie3c5ee5d63bfd00f6f0cdcb1c6fcfe6e05bba50e
Reviewed-on: https://pdfium-review.googlesource.com/14430
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
This CL changes FindNextBreakPos to return the found index instead of
requiring a call to GetAt(). This also fixes the issue that we may
return -1 from GetAt which would cause issues in the BoundsForWordAt
method when it gets shoved into a size_t variable.
Change-Id: I29e09de5d0837921a027208fc2471a9b1de287f1
Reviewed-on: https://pdfium-review.googlesource.com/14293
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Add some early returns where possible.
Change-Id: I9c53435e6e927057b085b1ccaa30a1637c185486
Reviewed-on: https://pdfium-review.googlesource.com/14350
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
BUG=chromium:765914
Change-Id: I187507cd87ff5d88be37ce07216ffa3d7ff7bb83
Reviewed-on: https://pdfium-review.googlesource.com/14411
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Then set up the right dependencies for them.
BUG=chromium:765914
Change-Id: I036cd888c741927d5efe0d020c6676f169e7cbb1
Reviewed-on: https://pdfium-review.googlesource.com/14410
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I020b862619f3f93f71dbb027b9e799d78744f686
Reviewed-on: https://pdfium-review.googlesource.com/14391
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: Icacf877e2b66ca7d49637dcf9eaec0f99bcdd8bb
Reviewed-on: https://pdfium-review.googlesource.com/14390
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Bug: chromium:765375
Change-Id: Ifdbd33ca92ec7105778788f891095eaf280c18cf
Reviewed-on: https://pdfium-review.googlesource.com/14370
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I703321108712e8c4a11a8343ecf8b1a8804c1d1a
Reviewed-on: https://pdfium-review.googlesource.com/14352
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
PDFium has users that may not be ready for C++14 yet.
Change-Id: I99de1c8126fd94ac728653262c05e5d26b1734f3
Reviewed-on: https://pdfium-review.googlesource.com/14351
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
When a widget has focus set, this can trigger an Invalidation call which
can trigger a page and annotation reload. This reload can destroy the
current widget we're handling.
This CL adds ObservedPtrs as needed so we can make sure the widgets are
still alive after we've done the Invalidation.
Bug: chromium:765921
Change-Id: I51cd24aa1ebd96abe9478efef5130a4e568dac1a
Reviewed-on: https://pdfium-review.googlesource.com/14290
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: Ice5ef31af6e32b6a02072e2a4445b19d4f801d3c
Reviewed-on: https://pdfium-review.googlesource.com/14330
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Change-Id: Ic7a1f8fd415526d198bc32469e9b191eac6df4bf
Reviewed-on: https://pdfium-review.googlesource.com/14250
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
The ePreType flag is only used if bFirst is true. After the first
iteration of the loop bFirst is always false. This CL removes the
updating of ePreType as it will never be used.
Also bFirst is only set false at the end of the loop and the do {} while is
changed into a while {}
Change-Id: Iaced1b38bddcc6f5483ae20993ac69c93b2e3f97
Reviewed-on: https://pdfium-review.googlesource.com/14292
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL changes the IsEOF flag to match the semantics of the
FindNextBreakPos flag.
Change-Id: I1a8aba91171baeacf80bdea4b9468d6093599c90
Reviewed-on: https://pdfium-review.googlesource.com/14291
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL changes the Text Edit Engine code to use a count instead of an
end index for the selection range. Using count lets us differentiate a
selection at the beginning of 1 character and an empty selection.
A few new tests were added to test unicode word break behaviour, some are not
working yet and are commented out.
Change-Id: Icce8f5003102ef0a850151ccdf16d3c2226d94bf
Reviewed-on: https://pdfium-review.googlesource.com/13491
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
While Chromium's clang and libc++ implicitly end up including that header,
the build can break with other toolchains (e.g. GCC 7 and its libstdc++)
because some headers reference types such as int32_t without including the
header that defines them.
Change-Id: Ibb2aa3d3b432f4b47f1b8635d0196d4f69cb09a0
Reviewed-on: https://pdfium-review.googlesource.com/14270
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I9ecf08c5cabfeb7b354abeb46b94918ae0b4539a
Reviewed-on: https://pdfium-review.googlesource.com/13590
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: Ie1170e71fb2d8f87857e68620f27e478a0801d21
Reviewed-on: https://pdfium-review.googlesource.com/13670
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
|
|
Change-Id: I416e636d90c63679e2dd0b109c6594fc02663c89
Reviewed-on: https://pdfium-review.googlesource.com/13572
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
|
|
Change-Id: Idbde2714eb5a3fd5a76c77ce968f790f3c5dfa07
Reviewed-on: https://pdfium-review.googlesource.com/13571
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
|
|
Change-Id: I5c0fccc74a9f103d91c95fd72dc6683d991eadec
Reviewed-on: https://pdfium-review.googlesource.com/13570
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
|
|
This CL attempts to clarify the contents of the gs_FX_WordBreak_Table
and adds static_asserts that each entry in the WordBreakProperty table
has the value we expect.
Change-Id: I33c1f12a9e18240b01969be9902204eba5074eb7
Reviewed-on: https://pdfium-review.googlesource.com/13430
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
BUG=chromium:760070
Change-Id: Icb2e46da86b6b7e71dae309a015ae1c5301fc931
Reviewed-on: https://pdfium-review.googlesource.com/14230
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Automated using git grep & sed.
Replace StringC classes with StringView classes.
Remove the CFX_ prefix and put string classes in fxcrt namespace.
Change AsStringC() to AsStringView().
Rename tests from TEST(fxcrt, *String*Foo) to TEST(*String*,
Foo).
Couple of tests needed to have their names regularlized.
BUG=pdfium:894
Change-Id: I7ca038685c8d803795f3ed02545124f7a224c83d
Reviewed-on: https://pdfium-review.googlesource.com/14151
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Add third_party/eu-strip, which is now required to build on Android.
Since third_party/eu-strip is small and rarely updated, just check in a
copy.
Change-Id: Iba016d8d69c8426f1dacbeeef36b30ca743c46f0
Reviewed-on: https://pdfium-review.googlesource.com/13411
Commit-Queue: (000 09-08 - 09-18) dsinclair <dsinclair@chromium.org>
Reviewed-by: (000 09-08 - 09-18) dsinclair <dsinclair@chromium.org>
|
|
Then if they roll over, it doesn't matter, since we only check for change.
And then we can pull a silly check. Then remove some no-op calls where we
didn't use the result.
Change-Id: I35ba470b42fb8c32a6984999e0311b21729791ca
Reviewed-on: https://pdfium-review.googlesource.com/14210
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
First step in passing ownership of this memory to the CPWL_Wnd.
In turn, nest two other classes that also require PrivateData to
satisfy nesting rules.
Move one stray #define to the appropriate file while at it.
Change-Id: I565934565421f5843a3b792b3bdc21b5e8839eb8
Reviewed-on: https://pdfium-review.googlesource.com/14170
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
This nesting makes so much more sense when I read the code.
Fix member naming for this in CPWL_Wnd.
Pass in/out CreateParams arg as pointer.
Kill Reset() method, only called during destroy and nothing needs
explicit cleanup.
Change-Id: If50e403e11c131e7656da09c0cb36866223d64c6
Reviewed-on: https://pdfium-review.googlesource.com/14070
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I89c81e18273e929910f083399ed169017a6171f5
Reviewed-on: https://pdfium-review.googlesource.com/14091
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This is to prevent use after free issues due to these calls causing
reloads of content that have the side of effect of destroying windows.
BUG=chromium:760455
Change-Id: I3f3947be8b32964783abf5577a24ba6a713b3476
Reviewed-on: https://pdfium-review.googlesource.com/14150
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
BUG=chromium:763353
Change-Id: I6ee93f769509326d9af5bbfa1450c90747d6a065
Reviewed-on: https://pdfium-review.googlesource.com/14090
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
It was already possible to get the fill color, this exposes the number of
points. Naming attempts to be consistent with existing
FPDFPage_CountObject().
Change-Id: I79e8dd9f0c077de84ce9017a01d239e48e58174a
Reviewed-on: https://pdfium-review.googlesource.com/13592
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I87b5e6cefe973b82b4868e56fc5285c95c53a12b
Reviewed-on: https://pdfium-review.googlesource.com/12550
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
And along with it any data that the window may have been carrying.
Tidy some return codes while we're at it.
Bug: 765384
Change-Id: Id16ec5f82b3d9273ba8f2edb1e4645a9145df4f6
Reviewed-on: https://pdfium-review.googlesource.com/14050
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Now considering anything not representable by a 32-bit signed int
as OOB rather than decoding some arbitrary overflowed value.
Bug: chromium:761666
Change-Id: I00f5a3abadca51f9bedc5e5d78f7f184040c2f33
Reviewed-on: https://pdfium-review.googlesource.com/14010
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
The event was changed to behave in the same way as when reacting to a
mouse click event.
R=thestig@chromium.org
Bug: pdfium:897
Change-Id: I14366d69ad309e00cb1dd78672870d1ee95007a9
Reviewed-on: https://pdfium-review.googlesource.com/13990
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I27d26691a3b7bd8593581483d4a21729040fbe95
Reviewed-on: https://pdfium-review.googlesource.com/13910
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Change-Id: I8d2eaea9696b6ac4ea7ba5cb323bf74546c31d46
Reviewed-on: https://pdfium-review.googlesource.com/13890
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
This is a directory with manual XFA tests from several years ago.
Change-Id: I0c104a99e877ed90095a8a3fa4ad4a9c78323c64
Reviewed-on: https://pdfium-review.googlesource.com/13870
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
AKA roll clang 310694:312679
Fix virtual dtor warning in xfa/fde/cfde_texteditengine.h
Bug: pdfium:896
Change-Id: Ib5fb9433b2c138ca46ccb281b8c0a852daeb623e
Reviewed-on: https://pdfium-review.googlesource.com/13850
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Due to some of the size parameters for allocating space in Decode()
depending on the values produced by opj_decode(), this change was
causing misallocation of space, which in turn was causing illegal
reads/writes.
The issue with excessive memory usage that the original CL was trying
to change is less significant than the above mentioned problems, so
reverting this fix and looking for another solution to the
problem. This will re-open bugs https://crbug.com/754423 and
https://crbug.com/761005.
BUG=chromium:764177,chromium:754423,chromium:761005
Change-Id: I1cafac8a8117ec1e3bc32b31196bdec719d46477
Reviewed-on: https://pdfium-review.googlesource.com/13950
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
It should make sure the FPDF_PAGEOJECT passed in is actually a path.
Change-Id: I89d0626dc350fd2f65b08282b276a4de2c3a7398
Reviewed-on: https://pdfium-review.googlesource.com/13710
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|