Age | Commit message (Collapse) | Author |
|
Shorten some names to try to avoid
CPDF_InteractiveForm* pInteractiveForm = GetInteractiveForm();
Change-Id: I77fafd6c4cce20aa46908830afde12f87784680e
Reviewed-on: https://pdfium-review.googlesource.com/c/43815
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This was meant to be part of a mechanism to alert users that entered
data into a PDF form was not going to actually be saved how they would
expect. The UI for this is blocked on a bug in V8, and is now being
superseded by work to correctly implement saving.
BUG=pdfium:953
Change-Id: Id9c85c109a3f6a6b4ee69d35f366006be4dc9c32
Reviewed-on: https://pdfium-review.googlesource.com/c/43552
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Then revert the ones that break compilation.
Fix one IWYU noticed during presubmit.
Change-Id: I881a8a72818e55dbc4816247e35ff5e3015194e7
Reviewed-on: https://pdfium-review.googlesource.com/41470
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Also initialize members in the header when possible.
Change-Id: I458bc433f79ac2f6c04d645f44db6f460fd0bdc1
Reviewed-on: https://pdfium-review.googlesource.com/39330
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This CL adds an experimental callback to the form fill API that
allows PDFium to signal to the embedder that an attempt call save
occurred. The embedder is responsible for showing an appropriate
UI when this occurs. When PDF saving is implemented the API can
be removed.
BUG=pdfium:953
Change-Id: Iba30f4d0547fe773b793e499995be426626092a0
Reviewed-on: https://pdfium-review.googlesource.com/35870
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Getters should nearly always be const when they return a
non-const pointer to an unowned object. Saves a bit of
code along the way.
Grep for similar occurrences and add "const".
Change-Id: I492bf962a7d62452fa40310146226dc0c8ebb753
Reviewed-on: https://pdfium-review.googlesource.com/35890
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Define constant values in the public API for the valid values of alert
button type, alert icon type, and beep type. Replace various magic
numbers through out the code base using these values. Also replace the
XFA specific versions with an enum class that is guaranteed to have the
same values, instead of #defines that just happen to.
This CL does not attempt to add error checking on these values, since
it currently doesn't exist so adding it may cause regressions.
Change-Id: Ief3aee2a4ad419691c18fc1dba8b984ad222141b
Reviewed-on: https://pdfium-review.googlesource.com/35730
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
XFA has its own method for generating alerts in the embedder,
CPDFSDK_FormFillEnvironment::Alert, which is a slight variation of the
non-XFA CPDFSDK_FormFillEnvironment::JS_appAlert. Converting the two
instances of calls to the XFA only method to use the non-XFA method
and removing the XFA only method.
Change-Id: I60ea92b2ae69ea96ce4c216ef6d9029d79580b05
Reviewed-on: https://pdfium-review.googlesource.com/35690
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@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 reverts commit d06cc38b76685b002c51b227ae43b8314d926ad8.
Reason for revert: blocking previous revert
Change-Id: I74f8b80852c671440cca5fabef30e69cde9e2063
Reviewed-on: https://pdfium-review.googlesource.com/33713
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Now that both are ref-counted, we can replace ifdef's with some
polymorphism.
Bug: pdfium:760
Change-Id: Ie22ea259c9af56fa569f0af268b8e7065789a3f2
Reviewed-on: https://pdfium-review.googlesource.com/32892
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@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>
|
|
Small tidying.
The form fill environment is 1:1 with documents, and already knows
its underlying document. The callers all first obtain this from the
FFE and then pass it back into it.
Change-Id: I33835c1dc847ca67f2cc633c87af2f6e003ef58a
Reviewed-on: https://pdfium-review.googlesource.com/31591
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>
|
|
Change-Id: I4bd89b64cd77a4e2fe0ffc2dcc415cc8fe34667a
Reviewed-on: https://pdfium-review.googlesource.com/30871
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@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>
|
|
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>
|
|
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 moves CFX_UnownedPtr to UnownedPtr and places in the fxcrt
namespace.
Bug: pdfium:898
Change-Id: I6d1fa463f365e5cb3aafa8c8a7a5f7eff62ed8e0
Reviewed-on: https://pdfium-review.googlesource.com/14620
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL renames CFX_RetainPtr to RetainPtr and places in the fxcrt
namespace.
Bug: pdfium:898
Change-Id: I8798a9f79cb0840d3f037e8d04937cedd742914e
Reviewed-on: https://pdfium-review.googlesource.com/14616
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL renames CFX_Observable to Observable and moves into the fxcrt
namespace.
The test suite names were updated to ObservedPtr from fxcrt.
Bug: pdfium:898
Change-Id: Ia507482bc0a1d6d8bbf12c0c55c4a88f6c8910e2
Reviewed-on: https://pdfium-review.googlesource.com/14615
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@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>
|
|
This makes various IsFooKeyDown() methods static.
Transitively apply that to callers too.
Change-Id: Ia43b1fd62889c1943e0d8407e9696225b05125a8
Reviewed-on: https://pdfium-review.googlesource.com/7190
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I60f556f107f740b854237bc89184b09e4f1d2585
Reviewed-on: https://pdfium-review.googlesource.com/6790
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: Ie7bd4ec567ce932c8010bae744ba42cf40706b79
Reviewed-on: https://pdfium-review.googlesource.com/6678
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
Fix type mismatches.
Change-Id: Id475f927d0919f60a84f17bd9545ec67d569ff64
Reviewed-on: https://pdfium-review.googlesource.com/5740
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
See the explanation in CPDFSDK_FormFillEnvironment.h
Change-Id: I52feb25fb358831233a636e3ead5aa70e98c5baa
Reviewed-on: https://pdfium-review.googlesource.com/5658
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I96e0a20d66b9184d22f64d8e4ce0dadd5a78c1e8
Reviewed-on: https://pdfium-review.googlesource.com/2967
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This updates the CPDFSDK_FormFillEnvironment::OutputSelectedRect to match to
CFX_SystemHandler::OutputSelectedRect method.
Change-Id: Ia07c408533a4423cf81095c5467c9ee82a25988c
Reviewed-on: https://pdfium-review.googlesource.com/2815
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This Cl updates the various Invalidate methods to take a rect when possible.
Change-Id: I5359f4d8118f822347414ccb8d261aeef2ac35e0
Reviewed-on: https://pdfium-review.googlesource.com/2814
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
We can remove a lot of "bOwnsStream" logic in the process.
Always pass these by const reference, in case the called method
wants to hang on to the stream (one exception is where we stick
a raw pointer into a void* slot in a context from another layer).
Review-Url: https://codereview.chromium.org/2451493002
|
|
The -build/include setting was masking out build/include_what_you_use. This CL
restores them, fixes any build errors, and adds NOLINT as needed. As well,
the runtime/explicit and runtime/printf flags are aslo enabled and NOLINT'd.
lint cleanups
Change-Id: Ib013b3eb29c8d0e48cad74c5df9028684130719f
Reviewed-on: https://pdfium-review.googlesource.com/2030
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This was broken in 6c659ab2. Also fix m_PageMap naming while
we're at it to match conventions.
TEST=covered by forthcoming bug 662698 CL.
Review-Url: https://codereview.chromium.org/2489663002
|
|
Review-Url: https://codereview.chromium.org/2453683011
|
|
The CPDFXFA_Document class isn't a document, it contains documents. Renamed
to make the purpose a bit clearer.
Review-Url: https://codereview.chromium.org/2469813004
|
|
It's been troubling for some time that an IFX_FileStream might
actually be an in-memory buffer with no backing file.
Review-Url: https://codereview.chromium.org/2443723002
|
|
This CL cleans up the nits from https://codereview.chromium.org/2410893002/.
Review-Url: https://codereview.chromium.org/2417633002
|
|
This CL merges the CPDFSDK_Document and CPDFSDK_FormFillEnvironment classes
as they always existed and always pointed at each other.
Review-Url: https://codereview.chromium.org/2410893002
|
|
This CL changes Field from using a CPDFSDK_Document to using a
CPDFSDK_FormFillEnvironment.
Review-Url: https://codereview.chromium.org/2400443005
|
|
Rename CPDFSDK_Environment to make it explicit that this is part of the formfill
system.
Review-Url: https://codereview.chromium.org/2391313002
|