Age | Commit message (Collapse) | Author |
|
Abstract GetUserPermissions() differences via new virtual method.
Abstract GetPageCount() differences via existing virtual method.
Remove unused ReadHeader() form for non-xfa.
Remove unused FindSubstFontByUnicode() for xfa.
Remove unused FXFONT_EXACTMATCH
Change-Id: I0a3de01a9841db86fcbc96991d3fa2682393b9ad
Reviewed-on: https://pdfium-review.googlesource.com/32831
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Small step to reducing the differences between XFA and non-XFA. We
still use the RetainPtr pretty much as if it were an unique_ptr, in
that we're not yet caching pages and handing out multiple pointers
to the same page in the non-XFA case.
The one change is in page view cleanup, where we no longer need a
boolean and can take (sufficient) page ownership with a RetainPtr.
Tidy up some document.h -> page.h -> document.h circular inclusion
while we're at it.
NOTE: Wait for imminent branch to pass before landing. We'll want
this to bake a while.
Change-Id: I64a2f12ac3424ece1063d40583995b834117cf34
Reviewed-on: https://pdfium-review.googlesource.com/32790
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
BUG=pdfium:234
Change-Id: I6fde00c976ad4bb9cab632f465cf292f5b1da3d2
Reviewed-on: https://pdfium-review.googlesource.com/32914
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
The LayoutProcessor is owned by the CXFA_Document. Make the ownership
explicit with an UnownedPtr.
Change-Id: I100af9e2e029e0a5db4ee365e11977016ffdcd70
Reviewed-on: https://pdfium-review.googlesource.com/32670
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Import Chromium's base/compiler_specific.h from r537069.
Now that FALLTHROUGH is available via compiler_specific.h, remove
FX_FALLTHROUGH.
Change-Id: I8b9631a4f007673e10e0c26951dfd61e9dcada30
Reviewed-on: https://pdfium-review.googlesource.com/32639
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This reverts commit e7207f33f8024b59fc85abb1b4594b0fbab5361b.
Reason for revert: Causes crash in some XFA forms - crbug.com/840922
This is a merge, not a clean revert.
Original change's description:
> Ensure that XFA Pages always have a corresponding PDF page
>
> The PDF page may be blank, un-numbered, or untracked by CPDF, but
> this provides a place for all XFA pages to "extend" from down the
> road.
>
> Change-Id: If1003be0f261154e61e9793ccba7e1f43cd73104
> Reviewed-on: https://pdfium-review.googlesource.com/31771
> Commit-Queue: Tom Sepez <tsepez@chromium.org>
> Reviewed-by: dsinclair <dsinclair@chromium.org>
Change-Id: Ia7f286321552b225a95f461aa8a6aef979f5c991
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:840922
Reviewed-on: https://pdfium-review.googlesource.com/32210
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Avoids a conflict should we wish to have the document actually
track pages, with a GetPage() that returns CPDF_Page.
Do the same thing to CPDF_DataAvail along the way.
Add some missing consts as well.
Change-Id: I2cb2213cc4c0649662fceab80407ee4a3f4cf30e
Reviewed-on: https://pdfium-review.googlesource.com/32158
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
The PDF page may be blank, un-numbered, or untracked by CPDF, but
this provides a place for all XFA pages to "extend" from down the
road.
Change-Id: If1003be0f261154e61e9793ccba7e1f43cd73104
Reviewed-on: https://pdfium-review.googlesource.com/31771
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Rather than messing with actual inheritence, add type-checking wrappers
and just blatantly cast to incomplete types. Along the way, this points
out places where we would downcast without checking, which I fix.
Change-Id: Ieb303eb46ad8522dfe082454f1f10f247ffd52d5
Reviewed-on: https://pdfium-review.googlesource.com/32030
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
In turn, add CPDF_Document::Extension::GetPDFDoc() so that we can
use the abstract return type in more places.
Mark an internal-only cpdfxfa_context method as private while we're
at it.
Change-Id: I08e64f4b9438bf2f731c3a37cf2a41152bbbd8fa
Reviewed-on: https://pdfium-review.googlesource.com/31916
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: Ic19b91f91f08b1867437b22de04a2c54045ce8ae
Reviewed-on: https://pdfium-review.googlesource.com/31992
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Another virtual API at the CPDF layer, to avoid a compile time
ifdef XFA.
Change-Id: Ia95c4d3b3d3b773aaf45c49ebcadff6b16ca18c6
Reviewed-on: https://pdfium-review.googlesource.com/31910
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Replaces one compile-time #ifdef XFA with a dynamic check and
a call through a virtual API that prevents the CPDF code from
knowing anything about the XFA code.
Change-Id: If0ff9b6918b908b3eac824fe1d525c6d4f7316e7
Reviewed-on: https://pdfium-review.googlesource.com/31890
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Similar tp CPDF_Document::Extension, this is a base type for fpdfsdk/
to use to improve layering.
While we're at it, make pages point to documents to prove they don't
outlive them.
Another small step towards not passing XFA objects across FPDF.
Change-Id: Idcee9da3a18c06331fa56f3d6c188e4ce27d34f2
Reviewed-on: https://pdfium-review.googlesource.com/31631
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Small step towards removing UnderlyingDocumentType and making FPDF
documents always be CPDF documents, regardless of XFA. This improves
layering a bit in the process.
Change-Id: Ice5ed7ba1ffdd7edfc9c4719f0e3a9cfb22f5790
Reviewed-on: https://pdfium-review.googlesource.com/31672
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Follow-on from https://pdfium-review.googlesource.com/c/pdfium/+/31591
Under XFA, the Form Fill Environment already has the XFA context, so
there is no need for callers to obtain it and pass it.
Tidy some duplicate string allocations along the way.
Change-Id: Ia7614b200146e7ca1f68a18f9d2ce118946b53e8
Reviewed-on: https://pdfium-review.googlesource.com/31610
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Should FPDFDocumentFromCPDFDocument() be called several times under
XFA, we may WrapUnique() the document several times. So cache a pointer
back from CPDF_Document to CPDFXFA_Context to avoid this.
Because of layering, introduce a placeholder type CPDF_Document::Extension.
This is actually the first step in some larger XFA ownership cleanup, but
makes a nice standalone CL around the one particular issue.
Change-Id: I4be326ddb1a5fae7339e6ed6745dd551b1374b53
Reviewed-on: https://pdfium-review.googlesource.com/31570
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
It should include cpdfsdk_helpers, not the other way around.
Change-Id: Id2cc3018e8c38f82ce8a35b03bb90e936aa1d446
Reviewed-on: https://pdfium-review.googlesource.com/31294
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Allows run-time selection of whether to permit JS inside PDF. Previously,
this was a link-time decision only. This requires a little more caution
before we decide that we have the CJS_Runtime, and not the CJS_RuntimeStub
in a few casts.
Adds a kDisableJavaScript option to the form fill embeddertests.
Adds a --disable-javascript flag to the pdfium_test executable.
Also adds a --disable-xfa flag while we're at it.
Change-Id: I8d8ac95f6474459cadba9a60572fbb342e984646
Reviewed-on: https://pdfium-review.googlesource.com/31090
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
This prevents display of confusing popups during the loading/initialization of
the XFA document. The spec explicitly states that validation should be run at
this point, but other viewers like Acrobat do not fire this spurious pop ups.
BUG=pdfium:975
Change-Id: Ic00d8c767ae94f95c7455a58b77e0b7283e3307c
Reviewed-on: https://pdfium-review.googlesource.com/30930
Commit-Queue: Lei Zhang <thestig@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I4bd89b64cd77a4e2fe0ffc2dcc415cc8fe34667a
Reviewed-on: https://pdfium-review.googlesource.com/30871
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Instead of taking two doubles. The doubles get casted to floats anyway.
Change-Id: Ie16dc60fa5d6412026a5fda08c8c64d4fa2d56c4
Reviewed-on: https://pdfium-review.googlesource.com/30410
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Do the same for FPDF_PageToDevice(). Clean up the internal
implementation as well.
Change-Id: Ia207bfa779d144cb9f0310e768750ab10e603b8f
Reviewed-on: https://pdfium-review.googlesource.com/17370
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Just like CPDFXFA_Page. Also mark the methods const.
Change-Id: I6717b4b61a29663780f45bf872f76fe8e671df75
Reviewed-on: https://pdfium-review.googlesource.com/30132
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Instead of many int in-parameters.
Change-Id: I58b493ac0155f6b45f52963c0f61159633d88e28
Reviewed-on: https://pdfium-review.googlesource.com/30056
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I079bc3bf1242fd28fdd51930d9deb6efa34d7509
Reviewed-on: https://pdfium-review.googlesource.com/30055
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This CL changes CXFA_FFDoc to no longer use the CXFA_FFApp to create the
document, it does it directly. The stream data is not stored in the
FFDoc anymore as it is only used once.
Change-Id: I8247d2fb0324e554250ff0a03c67f067ef46e437
Reviewed-on: https://pdfium-review.googlesource.com/30270
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL changes the document parser to store the parsed XML tree. That
way we no longer need to store the pointer to the CXFA_SimpleParser in
the CXFA_DocumentParser.
Change-Id: I9272150e73613411cb1bb59c3cf77c7af6cc799d
Reviewed-on: https://pdfium-review.googlesource.com/30211
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL removes the code for verifying and creating checksums associated
with form elements in XFA documents. This was the only code requiring
the SAXReader which has also been removed.
According to the XFA spec and application can decide which parts of the
signatures are supported. This feature is being removed until we
determine if/when it is needed.
Bug: pdfium:1063
Change-Id: Iec2261282340f8fc72a1225d2e0d3e6ddf05edcb
Reviewed-on: https://pdfium-review.googlesource.com/30150
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Greatly simplify the code which was neither changing allocations nor
doing any actual work. Eventually GetBuffer() will return a span, and
this makes fewer places to change.
Comment AsFPDFWideString() as a place where we may want a redundant
copy, and make available outside the .cpp file.
Fix one "const" along the way.
Change-Id: I187758b69a0ba3501b3622f6c06280793cd5d464
Reviewed-on: https://pdfium-review.googlesource.com/30011
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
It is rarely used and FX_RECT is the more common integer rect type.
Change-Id: I7c5b875321c2d587becedcd058bb3a57fd1f0b61
Reviewed-on: https://pdfium-review.googlesource.com/30053
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
The StartLoad, DoLoad and StopLoad methods are called in sequence from
the CPDFXFA_Context. This CL merges the three methods into a single Load
method.
Change-Id: I7135502354fb4c64784c89fa39b74fc58c76b683
Reviewed-on: https://pdfium-review.googlesource.com/29990
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL renames fsdk_common and fsdk_define to cpdfsdk_common and
cpdfsdk_helpers respectively.
Change-Id: I8ee7a308561f1ff2f510954444f953b0c8fed788
Reviewed-on: https://pdfium-review.googlesource.com/29371
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
For the cases where we always initialize the font managers, do it in the
constructor instead of as a secondary call.
Change-Id: Ic59b331d1eb357878cd5786b187b5b79bace4498
Reviewed-on: https://pdfium-review.googlesource.com/29291
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This is a step to fix XFA combobox popups being rendered outside the
page.
The rest of the fix is in:
https://chromium-review.googlesource.com/c/chromium/src/+/961249
Bug: chromium:820106
Change-Id: I51e5667bc08cdb2028c0afafa6e29e929e661c94
Reviewed-on: https://pdfium-review.googlesource.com/28371
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Mark the other ArgbEncode() variant as constexpr.
Change-Id: I84207d805766e5efc669638bd8a15cfead356a41
Reviewed-on: https://pdfium-review.googlesource.com/28577
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I1fd4bf85cd709de1c14ed2895d045018f79bc61f
Reviewed-on: https://pdfium-review.googlesource.com/26950
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
This makes the caret appear (again?), blink, and fixes its positioning
to be a little spaced from the last character.
Known issue: when the edit is empty, the caret is not necessarily
aligned with where the text will be.
Bug: chromium:592750
Change-Id: I950b0ea236db8855c6ed50f48ec1935d97e6ccf8
Reviewed-on: https://pdfium-review.googlesource.com/25451
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Also tidy some sub-expressions.
Change-Id: Ieabd5f6cea60e8ec03c8ce5ebe372fc80b05a7bb
Reviewed-on: https://pdfium-review.googlesource.com/25150
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
No change in functionality yet, just passing higher level object.
Precursor to maybe sharing v8 context between fxjs / fxjse.
Mark unimplemented ctors / assignment operator as "delete".
Change-Id: I100de7755909eec2eed96f6f51216d85923ffbb2
Reviewed-on: https://pdfium-review.googlesource.com/25050
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Prior cleanup before making FXJS/FXJSE share one v8 context.
Return CJS object rather than isolate in one place.
Use unique_ptr in one place.
Change-Id: I837ae4880368a6d72e59b38f37e06908e05c34bd
Reviewed-on: https://pdfium-review.googlesource.com/24950
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This CL converts the WidgetAcc iterator to return nodes in which the
OnReady event has been fired.
Change-Id: I5ec6809c1610ac3467019d8492121901d3845a37
Reviewed-on: https://pdfium-review.googlesource.com/23490
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL removes CXFA_WidgetAcc from CXFA_FFWidgetHandler and uses
CXFA_Node directly.
Change-Id: I88cf1edc53f4489aeac018a95e9d5936d85106db
Reviewed-on: https://pdfium-review.googlesource.com/23450
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
This CL removes the unused WidgetAcc param from both methods and updates
callsites as needed. The include for cxfa_widgetacc.h was removed from
fxfa.h and had to be inserted in locations where needed.
Change-Id: I55ae9e935a948dff3b6d906b4567665e60530eba
Reviewed-on: https://pdfium-review.googlesource.com/23391
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Within PDFium use enum class for better type safety when working with
form field types. These values will still be converted to ints as part
of the public API, since that is the existing API.
This work is preperation for extending the number of form field types
to have more specific entries for XFA.
BUG=pdfium:952,chromium:763129,chromium:592758
Change-Id: Ie6c29f02ae22be782ff36eb87d27f1a4bf2c099e
Reviewed-on: https://pdfium-review.googlesource.com/22742
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
This CL moves the CXFA_WidgetAcc::Process* methods to CXFA_Node.
Change-Id: Ic01b62e3786a6666a698f8877a8b7b295714bf79
Reviewed-on: https://pdfium-review.googlesource.com/22472
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL changes the various CXFA_FF* widgets to hold a CXFA_Node instead
of a CXFA_WidgetAcc wrapper.
Change-Id: I7e31633d5ffd3b61abcdcdfeee7822514c5b28da
Reviewed-on: https://pdfium-review.googlesource.com/22410
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL moves methods from WidgetAcc which just proxy to CXFA_Node.
Change-Id: Icf1006b4be3f91077de411ed1a571b1507117602
Reviewed-on: https://pdfium-review.googlesource.com/22391
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL removes the CXFA_FFDocView parameter from CXFA_WidgetAcc and
passes in the document to the methods which require a document.
Change-Id: I7b264caf0ed89d0453ae0b74c27f2ee0f31f61af
Reviewed-on: https://pdfium-review.googlesource.com/22260
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL merges the CXFA_WidgetData class into the only subclass,
CXFA_WidgetAcc. Code has been updated as needed.
Change-Id: I3f5bc83b1422bcbe065276b16bfb91e656f5c174
Reviewed-on: https://pdfium-review.googlesource.com/22252
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|