Age | Commit message (Collapse) | Author |
|
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>
|
|
CXFA_SubmitData is a thin wrapper around CXFA_Submit. This CL folds the
two classes together.
Change-Id: I867b6db067786d232df2a25c1ba7b29d6d454f8e
Reviewed-on: https://pdfium-review.googlesource.com/21190
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Add LoadAllDataFiltered() and LoadAllDataRaw() and update callers.
Change-Id: I9b80ee34a358db204968acdc8b1adc9db0b6b83f
Reviewed-on: https://pdfium-review.googlesource.com/20810
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Also fixes some usages that were not working as intended after the
conversion to static.
Change-Id: I18c18369754f6ca165f98999b5b80eecf6c76973
Reviewed-on: https://pdfium-review.googlesource.com/20590
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Fix/cleanup ctors/dtors in related classes.
Change-Id: Ia05ec9b6892fd7d19d0a417fc1226a407e3ac260
Reviewed-on: https://pdfium-review.googlesource.com/20216
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This CL changes the enum XFA_ATTRIBUTEENUM to an enum class
XFA_AttributeEnum. Methods expecting an int32 have been updated to take
or return the XFA_AttrbuteEnum type.
Change-Id: I268453949545fe2dd3eae707be4d9cc7edeff763
Reviewed-on: https://pdfium-review.googlesource.com/20070
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL cleans up the CXFA_SubmitData methods by using returns instead
of out-params, sets the correct return types and makes the methods
const.
Change-Id: I41fe8f59e450ca444b64c291ac4a0a199c7ad0cf
Reviewed-on: https://pdfium-review.googlesource.com/19111
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
So callers no longer have to call str.TrimLeft(); str.TrimRight();
Change-Id: If931eaa8d891f487b9618ebbeee5ee294e807846
Reviewed-on: https://pdfium-review.googlesource.com/18990
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This CL moves the Format and FormatV methods of ByteString to be static.
Bug: pdfium:934
Change-Id: I9c30455a789aff9f619b9d5bf89c0712644f2d9a
Reviewed-on: https://pdfium-review.googlesource.com/18650
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL adds helper methods to CXFA_Node to retrieve the default values
for attributes with the correct data types.
Change-Id: I644435b4b430819f1060a95fa4fffe4ba2826cfe
Reviewed-on: https://pdfium-review.googlesource.com/18450
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL converts SavePackage to accept the CXFA_Node to export instead
of the HASHCODE of the object to retrieve. This simplifies the code in
SavePackage as we don't have to detect if this is the Xfa hashcode.
Change-Id: I73ef9c4aa3d16f433e2d4568fab5f6d34c214635
Reviewed-on: https://pdfium-review.googlesource.com/18111
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL renames CXFA_Submit to CXFA_SubmitData to show it's part of the
data hierarchy.
Change-Id: I6f580a28e41e54ffa1f1c7b799d97f079303463f
Reviewed-on: https://pdfium-review.googlesource.com/18014
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
None of the methods on this class are ever called. We check it once
to make sure it exists, but the call to get it will create it so
it will always exist.
Change-Id: I5b53567c4835f4bb4fe52c42baf28d4290ea517f
Reviewed-on: https://pdfium-review.googlesource.com/17852
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|