Age | Commit message (Collapse) | Author |
|
So remove it and combine the XFA/non-XFA cases.
Change-Id: I13d718de13ec31bf4f5c045164ea5791bf22f92d
Reviewed-on: https://pdfium-review.googlesource.com/35050
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This is a pure refactor, there should be no change in behavior. It
prepares for the next CL, which will allow modification of content
streams.
Bug: pdfium:1051
Change-Id: I01ca3e897efe423e89df75e1f31cd67539cc3d08
Reviewed-on: https://pdfium-review.googlesource.com/34470
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This is an anti-pattern when XFA can be configured at runtime.
Make it easier to find some more remaining cases.
Change-Id: I1ee8d95b2fd52be5e37ef4e859e3e9179ea25975
Reviewed-on: https://pdfium-review.googlesource.com/34990
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
From the comment of CPDF_PageObject::GetContentStream():
"""
Get what content stream the object was parsed from in its page.
This number is the index of the content stream in the "Contents" array,
or 0 if there is a single content stream. If the object is newly
created, -1 is returned.
If the object is spread among more than one content stream, this is
the index of the last one.
"""
Bug: pdfium:1051
Change-Id: I9f7804af4f263dda0422e9542e025e3320ff7c31
Reviewed-on: https://pdfium-review.googlesource.com/34250
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Now that there is a consistent underlying page type, we can unify these
actions.
Change-Id: I13fdfe775c540baaa0cd8085f8a7999fa6a3d276
Reviewed-on: https://pdfium-review.googlesource.com/34970
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
So remove the argument, and the logic dependent upon it being otherwise.
Rename function to more accurately reflect its purpose. Remove needless
null check while we're at it.
Change-Id: I7e119429fd159334eabcc250b5dac215580882ea
Reviewed-on: https://pdfium-review.googlesource.com/34950
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Make LoadDocumentImpl() logic match FPDFAvail_GetDocument() logic, so
that the XFA extension is loaded before checking unsupported features.
Add some comments along the way.
Change-Id: I040e40fcca872f7c0a46e921bce1146f0fe42588
Reviewed-on: https://pdfium-review.googlesource.com/34931
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
This landed earlier as part of a larger change that got reverted for
unrelated reasons. Now re-land it by itself. See
https://pdfium-review.googlesource.com/c/pdfium/+/33370
If we don't have a document, then we can't dynamically tell if it is
an XFA doc, so there's no reason to believe it should have all permissions.
If there is an XFA doc under the covers, then the extension will give
us the value.
Change-Id: I6e007ab659914c39d2e5f3fe7a25d9d13439d358
Reviewed-on: https://pdfium-review.googlesource.com/34932
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This landed earlier as part of a larger change that got reverted for
unrelated reasons. Now re-land it by itself. See
https://pdfium-review.googlesource.com/c/pdfium/+/33370
The current code could cause FT to try to free memory allocated by the
caller, with potentially a different allocator. It appears that this may
have been added ages ago as a way to kludge around a leak. If we're
leaking, msan will find it, and we can deal with it properly rather
than trying to force FT to tidy after us.
Change-Id: I20abf4cd35d465de1f435ebe6d94b10c3ff74002
Reviewed-on: https://pdfium-review.googlesource.com/34930
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Re-landing of https://pdfium-review.googlesource.com/c/pdfium/+/32892
This time, however, we do not build on the previous CL which cached
pages. This CL by itself should be OK but was reverted only because
it was blocking earlier reverts.
Change-Id: I067d5f07373eeac6cced5d0c113ea40e5f8dcd15
Reviewed-on: https://pdfium-review.googlesource.com/34910
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This CL updates some of the formcal tests to use raw literals instead of
escaping lots of things.
Change-Id: I539063b6c98aae318147b7103a0fd84e6b76054f
Reviewed-on: https://pdfium-review.googlesource.com/34190
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I153747ef587a184eaef58ff09dbf8f214c9ddfb3
Reviewed-on: https://pdfium-review.googlesource.com/17230
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
|
|
Partial move, we'll clean up the engine side later.
Change-Id: I07fdae150de9e834d11ed242a7f9a007aae266ac
Reviewed-on: https://pdfium-review.googlesource.com/34810
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This more clearly shows how information is flowing out of V8
and into our C++ callbacks.
Change-Id: I5c37d2c28c166443eb9983076fbb0e944bebbf47
Reviewed-on: https://pdfium-review.googlesource.com/34790
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Because its a code smell of a sort.
Change-Id: Id1c1b124f539e31a929701fb9486da9d396d3563
Reviewed-on: https://pdfium-review.googlesource.com/34695
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Also avoids confusion with unrelated FPDF_PAGE API type.
Bug: pdfium:1085
Change-Id: I36569573f020f0b87f13630bbab91caf351e4994
Reviewed-on: https://pdfium-review.googlesource.com/34830
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Avoid explicitly finding array sizes.
Change-Id: Id51e3d10ea4db0a6375807a53309ce8d68b3b413
Reviewed-on: https://pdfium-review.googlesource.com/34750
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Avoid explicitly having to count items in arrays.
Change-Id: I24a91db45e8a8530f38afcc273e824ffb70a6cb9
Reviewed-on: https://pdfium-review.googlesource.com/34710
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Move all the checks into the shared helper functions for getting/setting
bounding boxes.
Change-Id: I6f597f478fd3510e0528d20a0a7820949600fd2a
Reviewed-on: https://pdfium-review.googlesource.com/34692
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
BUG=chromium:664730
Change-Id: Ie46221382ffed7a16366c484c249d2571c7be5c4
Reviewed-on: https://pdfium-review.googlesource.com/34696
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Because constructors can do all this.
Change-Id: I4f7ff6c26b17d9bddd326333a66e1bd38b2ea377
Reviewed-on: https://pdfium-review.googlesource.com/34693
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
BUG=pdfium:1049
Change-Id: Ie8bdb893d2af8d63420027a7ef95baf58cd97aa6
Reviewed-on: https://pdfium-review.googlesource.com/34691
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
No reason to get it outside and pass it in.
Change-Id: I75e3bbd361c04e195004d7c538145dfd56294816
Reviewed-on: https://pdfium-review.googlesource.com/34731
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: If19338b63b09ca79aa07c6fbb8eb7e42a689360e
Reviewed-on: https://pdfium-review.googlesource.com/34730
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
m_IsIncremental and m_IsOriginal are extracted as soon as the flags
are set, so there is no more need for getters.
Change-Id: I34331a33d83c1fcbdea6ea1f3e39dfc58d6f85ea
Reviewed-on: https://pdfium-review.googlesource.com/34711
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Also remove the member variable m_dwEncryptObjNum which is never read.
Change-Id: Ieb674d6d9783ef298ba3ece1544437b15ad0afe2
Reviewed-on: https://pdfium-review.googlesource.com/34694
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
This method is called, but it returns void and has no side effects:
all called methods are const, and no member or static variable is
modified.
Change-Id: I12084000621728b9994fe7b487852928e7b1180e
Reviewed-on: https://pdfium-review.googlesource.com/34690
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
This changes the check from being for a Full XFA document to any XFA
document. Though the value correctly ends up in Chrome, adjusting the
current page appears to not be working correctly in Chrome, so this
doesn't fully resolve the related bug.
BUG=pdfium:1108
Change-Id: I2a5c37e2c64db96cabe8b5b1c277698ebca21949
Reviewed-on: https://pdfium-review.googlesource.com/34650
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Change the signature of the constructors to make it impossible to
do this otherwise.
Change-Id: I14e88d98a1128f2d599459ce9337cd6d079469fe
Reviewed-on: https://pdfium-review.googlesource.com/34531
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
We used to assume that a global proxy object could be distinguished
by it not having two internal fields, but that invariant isn't
correct. Instead, flag it as such so the block of code at line 126
will check the prototype to find an actual object.
Squeeze some bytes out of the tags while were at it, no reason for
them to be wide. Also remove GetGlobalObjectFromContext() helper, for
transparency into what's really going on in v8. This then shows a
needless retrieval of an object we already have in one case.
Bug: pdfium:1097
Change-Id: Iafc356373166fe5fda76ea7d64193826ee69a6c3
Reviewed-on: https://pdfium-review.googlesource.com/34630
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I4b61d4c7239caaf6081bcba80cc0d8ad61569474
Reviewed-on: https://pdfium-review.googlesource.com/34590
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Test FPDFPage_GetMediaBox() and FPDFPage_GetCropBox().
Change-Id: Ia5ba3d95c0c859acb5c2576781cca90d3e60b40e
Reviewed-on: https://pdfium-review.googlesource.com/34570
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
It is poorly formatted and some of the comments are wrong.
Change-Id: I7bfd3013223bff1ab8e943d33aa367cebcdc684b
Reviewed-on: https://pdfium-review.googlesource.com/34532
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
TBR=dsinclair@chromium.org
Change-Id: I2665f616d451ff7075b63457a91ef264bbde84c9
Reviewed-on: https://pdfium-review.googlesource.com/34610
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Add a test PDF with multiple pages, each with a different media box and
crop box. Demonstrate how FPDFText_GetText() gets all the text on the
page, and how FPDFText_GetBoundedText() with the right bounding boxes
gets only the visible text on the page.
Also fix a small nit in CPDF_TextPage::GetTextByRect() found while
writing this CL.
BUG=pdfium:387
Change-Id: I9ce4bb181e2ba5b454ea1341bbccef9ba94c9cd8
Reviewed-on: https://pdfium-review.googlesource.com/34550
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Change-Id: Icc705c23420cfbd927767013d2ba871b73ea713e
Reviewed-on: https://pdfium-review.googlesource.com/34530
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
This adds comments for the specific bug associated with each
suppression, and a comment to remove the suppression line once the bug
is fixed.
BUG=pdfium:1020
Change-Id: I8002fe1711c55e39b2ef79c395980c89f6440853
Reviewed-on: https://pdfium-review.googlesource.com/34510
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
This is a reland of d89f1bf48f017ab9f56df13299f75a906ed33cd0
Original change's description:
> Reland "Simplify CPDF_HintsTable."
>
> This is a reland of 33591752d2cb14f2e07726ca52afce6efbdc07c9
>
> Original change's description:
> > Simplify CPDF_HintsTable.
> >
> > Use CPDF_LinearizedHeader directly.
> >
> > Change-Id: Id12402ef6e6f92fef68d0932df2e1ccb2dcf06aa
> > Reviewed-on: https://pdfium-review.googlesource.com/15770
> > Reviewed-by: Lei Zhang <thestig@chromium.org>
> > Commit-Queue: Lei Zhang <thestig@chromium.org>
>
> Change-Id: I2b5425a6533f4ce237f9ae6c483caa517105a5f7
> Reviewed-on: https://pdfium-review.googlesource.com/34130
> Reviewed-by: Lei Zhang <thestig@chromium.org>
> Commit-Queue: Art Snake <art-snake@yandex-team.ru>
Change-Id: If34c4ea05db7c9abaf2ba75ebe1abaabb962dd88
Reviewed-on: https://pdfium-review.googlesource.com/34410
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
|
|
This test appears to just be confirming that caption layout and
content can be controlled via JS. Specifically there is a bunch of
listeners for the initialize event that run and setup the page by
inspecting and changing values. Clicking and such does nothing
interesting, so there is no .evt.
BUG=pdfium:1020
Change-Id: I1a24dc6fab058c17362506cce1f184e62dd82500
Reviewed-on: https://pdfium-review.googlesource.com/34491
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
There are 3 elements in the PDF that can be interacted with that cause
testable output. This CL creates test cases for each of these
elements. 2 of them work correctly, and a new bug, pdfium:1106, has
been filed for the third.
BUG=pdfium:1020
Change-Id: I524911d03927a0eeeee1d1479e1a855f90269e8e
Reviewed-on: https://pdfium-review.googlesource.com/34370
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Renamed the underlying member m_pFormDict as well.
These names are misleading, as a page also uses the same field as
the page dict.
Change-Id: I52e0f1864a917a1e1b863725cb0d4f22faecacb3
Reviewed-on: https://pdfium-review.googlesource.com/34450
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Change-Id: I6a634cb3fb9acdd78ae29017987e5e41865a0d4b
Reviewed-on: https://pdfium-review.googlesource.com/34490
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Currently this case will lead to a crash, as pContent will be null
and pPageDict will be dereferenced.
This is a theoritical case, there is no concrete test case.
Change-Id: Ieedab26cd9f419ab49aa2cde15f1b8e3c230b61d
Reviewed-on: https://pdfium-review.googlesource.com/34430
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Bug=chromium:850407,chromium:850440
Change-Id: I0115f75677db618b0de5e1e78b13da80b1da9559
Reviewed-on: https://pdfium-review.googlesource.com/34390
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
This reverts commit d89f1bf48f017ab9f56df13299f75a906ed33cd0.
Reason for revert:
This CL has introduced at least two CF issues chromium:850407,chromium:850440. Additionally there is a number of changes that remove bounds checks, which I think are suspect.
BUG=chromium:850407,chromium:850440
Original change's description:
> Reland "Simplify CPDF_HintsTable."
>
> This is a reland of 33591752d2cb14f2e07726ca52afce6efbdc07c9
>
> Original change's description:
> > Simplify CPDF_HintsTable.
> >
> > Use CPDF_LinearizedHeader directly.
> >
> > Change-Id: Id12402ef6e6f92fef68d0932df2e1ccb2dcf06aa
> > Reviewed-on: https://pdfium-review.googlesource.com/15770
> > Reviewed-by: Lei Zhang <thestig@chromium.org>
> > Commit-Queue: Lei Zhang <thestig@chromium.org>
>
> Change-Id: I2b5425a6533f4ce237f9ae6c483caa517105a5f7
> Reviewed-on: https://pdfium-review.googlesource.com/34130
> Reviewed-by: Lei Zhang <thestig@chromium.org>
> Commit-Queue: Art Snake <art-snake@yandex-team.ru>
TBR=thestig@chromium.org,tsepez@chromium.org,art-snake@yandex-team.ru
Change-Id: I463b5b1330f809c2cb508cbf46a804b7a11526e4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://pdfium-review.googlesource.com/34350
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
It is disabled since pdfium:1051 currently causes it to fail.
Bug: pdfium:1051
Change-Id: I99a12db0ae4a58eab46e365f2f618fc98aee363f
Reviewed-on: https://pdfium-review.googlesource.com/34210
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Its no longer required.
Change-Id: I180ca99817352a91b6d9d7c9b45985cd96dc730e
Reviewed-on: https://pdfium-review.googlesource.com/34290
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
In a world without context slots, we don't need to test getting an
engine from a content slot.
Change-Id: If572c364d663d1f20af659392bda3b96348fd4d4
Reviewed-on: https://pdfium-review.googlesource.com/34270
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Removes CJS_Runtime::RuntimeFromIsolateCurrentContext()
Change-Id: I51abcf32aaafac522e1595edf663507c26781357
Reviewed-on: https://pdfium-review.googlesource.com/34230
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This CL creates a .evt and expectation image for this test.
This test has a variety of password entry fields with different
backgrounds and enters text into them.
BUG=pdfium:1020
Change-Id: Icaa695670e8a773e066aec2251658a11c3e8ca3b
Reviewed-on: https://pdfium-review.googlesource.com/34214
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|