Age | Commit message (Collapse) | Author |
|
Change-Id: Ib96a66eb47bea791f061e1d6da8aadad8037a99d
Reviewed-on: https://pdfium-review.googlesource.com/c/43609
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Move some method implementations out of headers in the process.
Change-Id: I8701e360d4addd9aec39fe887d932209985d2443
Reviewed-on: https://pdfium-review.googlesource.com/c/43608
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Add GetCoreInterForm() and GetSDKInterForm(), because otherwise there
are too many GetInterForm() calls.
Change-Id: Ibf910a51e477787c2b04b28bb359933b55dac34b
Reviewed-on: https://pdfium-review.googlesource.com/c/43597
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Move code into an anonymous namespace when possible. Remove dead code.
Change-Id: I7e523f110f281476e7654a56fb3a28a3d21d9c29
Reviewed-on: https://pdfium-review.googlesource.com/c/43596
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>
|
|
Otherwise code coverage flags the empty body as unreachable.
Change-Id: Iee1d9a876d68276529c70d9b8c7a28276f271767
Reviewed-on: https://pdfium-review.googlesource.com/c/43514
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
SmartPtr<T> const m_Ptr, instead of const SmartPtr<T> m_Ptr.
Change-Id: I8001b0334543f49d138a24438def62088a15c6e4
Reviewed-on: https://pdfium-review.googlesource.com/c/43512
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This path has only been present under XFA, and has resulted in
several bugs, including the referenced one. There is a breakage in some
XFA functionality, but I'm not confident we can do this without
re-engineering all of fpdfsdk widget ownership.
Bug: 891210
Change-Id: I5aa158fa5359b1c8338046eefb25fb25df9ace48
Reviewed-on: https://pdfium-review.googlesource.com/c/43311
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Remove some variables named "string" to avoid false positives from the
linter.
Change-Id: I00a53e6970451fd0cea8ab2f8178183650ca00d2
Reviewed-on: https://pdfium-review.googlesource.com/42810
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I7010cedee8d17d05b2c37a94d767e6f3a9c48f7d
Reviewed-on: https://pdfium-review.googlesource.com/42790
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
For XFA, XML nodes are owned by the XML doc that they were created by,
but references to them are stored elsewhere. For a PDF document there
is one top-level XML document created and retained when the initial
XFA XML is parsed. Another can be created if loadXML is called by
JS. In the existing code the XML doc that owns the newly created nodes
is local to loadXML. So the nodes are destroyed right after putting
refernces to them into the main XFA data structures.
This CL adds in a method to transfer ownership of the XML nodes from
one doc to another, and uses it to correctly retain the newly created
nodes, by having them owned by the top-level XML doc.
BUG=chromium:884664
Change-Id: Id29b4edbfe44aefb9713328e4e217e830f7e9e14
Reviewed-on: https://pdfium-review.googlesource.com/42690
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Change-Id: I71794f87a99f9dcbb04296f42e8a5cd55656bd90
Reviewed-on: https://pdfium-review.googlesource.com/42615
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Classes marked |final| should not have |protected| members. In turn,
"private field m_dwEncryptObjNum is not used" warning is produced.
Change-Id: I51a96aca5a5f499381a6764d892962f7f2dc0327
Reviewed-on: https://pdfium-review.googlesource.com/42611
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Clean up another ten bare |new|s or so.
Change-Id: If32b307e5edd844488dfb2020e710214bb6f75a0
Reviewed-on: https://pdfium-review.googlesource.com/42550
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: If577500905f5bc5bb631718e9c87aa03ee6bee5a
Reviewed-on: https://pdfium-review.googlesource.com/41571
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I11772d2826ca23e8a07fef43a4fa50ead83292be
Reviewed-on: https://pdfium-review.googlesource.com/41430
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: Ib93972d3162c37995dfc215d1043e0e1b4220610
Reviewed-on: https://pdfium-review.googlesource.com/41410
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I15b191114a0c464264deccf60f3ae5da287e5a0b
Reviewed-on: https://pdfium-review.googlesource.com/41390
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Also for CFXJSE_Arguments.
Change-Id: I15bfa4e09675bb48aecfa0c55539bf8dc50675e6
Reviewed-on: https://pdfium-review.googlesource.com/41370
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I7ed3037d8d8862787ad7364eb5f55cd22eb879ad
Reviewed-on: https://pdfium-review.googlesource.com/41357
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
In CFXJSE_Engine::ResolveObjects(), all the calls are to the same
object. Just grab a pointer and reuse that. Also make GetNodeHelper()
non-const.
Change-Id: I92a0bb1577a11d4d067e6d9beed27fcadeb694dc
Reviewed-on: https://pdfium-review.googlesource.com/41573
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I600013bcbf44661fd132ce786bcd08980a7ecd4e
Reviewed-on: https://pdfium-review.googlesource.com/41572
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Also merge Initial() into the ctor.
Change-Id: Ib3cb9619a65a5c33d7c739051c13dfcd7f2324d7
Reviewed-on: https://pdfium-review.googlesource.com/41356
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Fix nits in affected files.
Change-Id: I3a0363c9b7c28359fd1c7cea305e4f7705a228c2
Reviewed-on: https://pdfium-review.googlesource.com/41355
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I6fd6004cb6c2e5a801fce0fbb43a6f7d65f560dd
Reviewed-on: https://pdfium-review.googlesource.com/41354
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
console.show() and console.println() are calls commonly found in XFA
scripts. This CL adds methods to the built-in V8 console so these calls
do not stop the rest of script from running.
Bug: chromium:872893
Change-Id: I661f505176884558ae2d658312d561a28767ae25
Reviewed-on: https://pdfium-review.googlesource.com/41533
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@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>
|
|
Rename GetObject() to GetArray() and remove more ToArray() calls.
Change-Id: I754ca72b32c085e1801d3cedcd291ce4d2682359
Reviewed-on: https://pdfium-review.googlesource.com/41353
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL fixes instances of variable shadowing that are
discovered by turning on -Wshadow.
BUG=pdfium:1137
Change-Id: I418d50de89ecbeb12e85b23a358bc61e8f16e888
Reviewed-on: https://pdfium-review.googlesource.com/41150
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Change-Id: I9f5f3c54144163b5ac188e38fcb8d8fa93d4bd7a
Reviewed-on: https://pdfium-review.googlesource.com/40951
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I4420fbf7402a8b08e33ca525e98690643d59efdf
Reviewed-on: https://pdfium-review.googlesource.com/40930
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
These parameterless methods are deprecated since the Isolate is
inferred from the memory address of the object being converted to a
string which will soon not be reliable. As such these method will be
removed in the very near future.
Bug: v8:7786
Change-Id: Idbcd56a633c3b0b06ba8e60909fc0fb9c80f3410
Reviewed-on: https://pdfium-review.googlesource.com/40310
Commit-Queue: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
|
|
"Return" is a verb, and "return" is a reserved-word at that,
so avoid using it as part of a class name.
Fully mechanical change apart from rename.
Change-Id: I120e453e8ba001c4ab74a39e2da6aa6eb590835f
Reviewed-on: https://pdfium-review.googlesource.com/40532
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Avoid the possibility of ever re-introducing the issue noticed
last week.
Remove some redundant JSGetStringFromID() calls.
Change-Id: I56687c2191bd72e378f747083f34080e50cbe490
Reviewed-on: https://pdfium-review.googlesource.com/40490
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Conformity with standards.
Change-Id: Ia718700526477fd1826eb4900ab333ebf4c8a517
Reviewed-on: https://pdfium-review.googlesource.com/40353
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Adds clarity to the call sites.
Change-Id: Id4deed9adda2ad79f0847d618792429044d4f7d6
Reviewed-on: https://pdfium-review.googlesource.com/40351
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Non-consecutive mode has questionable correctness and is not an obvious
performance win.
Change-Id: Idaa66e5ee5c4604628a0f55b67d5a04ab47ea5ec
Reviewed-on: https://pdfium-review.googlesource.com/40050
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Additionally, we have a pre-existing enum type that is more
meaningful than just a boolean.
Change-Id: Ie6ad13a3c9b22e34dedf7a5a9b5b9cc2a49b1f03
Reviewed-on: https://pdfium-review.googlesource.com/40190
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: Ie0e8e83e0380c323d8d12e82e50126b85d34405c
Reviewed-on: https://pdfium-review.googlesource.com/40191
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Bring in line with standards.
Remove argument entirely for mac code that is always nullptr.
Change-Id: I0710bdbd51fc0bc2e1d428ef44976be39a631147
Reviewed-on: https://pdfium-review.googlesource.com/40091
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Replaces them with calles to the proxy function, FXSYS_time, so that
tests may use a stable time value instead of the wall clock value.
BUG=pdfium:1104
Change-Id: I4743c4634f56d4a6cba1f1130c4562a35cee1887
Reviewed-on: https://pdfium-review.googlesource.com/39853
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
This CL adds a proxy, FXSYS_time, for the time syscall, so that a
testing mechanism can be implemented. Specically there is now a flag
for pdfium_test, --time=, that allows setting the time since the epoch
that will be returned. This plumbed all the way down into the proxy
and allows for stable results for tests that depend on getting the
current time.
There are other places in the code base that will need to be patched
like this, that will be dealt with in follow on CLs.
BUG=pdfium:1104
Change-Id: I2de185f8d47abe46704dd579c13a54948b7f81e0
Reviewed-on: https://pdfium-review.googlesource.com/39750
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Turns out that "FromUnicode" is misleading in that, on linux, it simply
removes any characters beyond 0xFF and passes the rest unchanged, so
no unicode decoding actually takes place. On Windows, it passes it into
the system function specifying FX_CODEPAGE_DefANSI, converting it into
the so-called "default ANSI code plane", passing some characters,
converting others to '?' and still others to 'A'. Either way, nothing
resembling UTF8 comes out of this, so pick a better name.
These now immediately look suspicious, so a follow-up CL will see
which ones should really be WideString::UTF8Encode() instead.
Making this a normal method on a widestring rather than a static
method on a bytestring feels more natural; this is parallel to
the UTF8Encode and UTF16LE_Encode functions.
Add a test that shows these conversions.
Change-Id: Ia7551b47199eba61b5c328a97bfe9176ac8e583c
Reviewed-on: https://pdfium-review.googlesource.com/39690
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
No need for variadic printf-like functions, since callers can cobble
arguments into a string much more simply.
Change-Id: I0e8d6f6a55a3715ef9d5c6940b73ce8bb2220a1a
Reviewed-on: https://pdfium-review.googlesource.com/39611
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Avoid possibility of an unterminated string or nullptr by avoiding
stringviews, since the non-view classes copy and always provide
a suitable result. Always use %ls and widestrings in wprintf()
variants, since that combination is consistent across our platforms
(%s, %S, etc. have idiosyncracies).
Bug: 870952
Change-Id: Ief62a42c3486e8298f9583b56e9333db1a74972a
Reviewed-on: https://pdfium-review.googlesource.com/39551
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Fix some nits as well.
Change-Id: Iaef79056b68ea0dae7f76c09e7a133cc545896fd
Reviewed-on: https://pdfium-review.googlesource.com/39353
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Return results instead of writing them to an out parameter. Remove start
index which is always 1.
Change-Id: I4b969a1e27679fca56b2cde1a901a8967c7fa8ce
Reviewed-on: https://pdfium-review.googlesource.com/39092
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Also remove a check that is always false, and simplify another check.
Change-Id: I89193eebc84a6fd139b34b890a8c3003a635851b
Reviewed-on: https://pdfium-review.googlesource.com/39091
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Make consistent with other public API types.
Introduce CPDFSDKFormFillEnvironmentFromFPDFFormHandle() and
FPDFFormHandleFromCPDFSDKFormFillEnvironment() helper functions.
Use these to kill off some casts in the process.
Change-Id: I6230ecdb4cecd03076f5e24c8cc49c45ad694da7
Reviewed-on: https://pdfium-review.googlesource.com/39250
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
They are only used inside CFXJSE_FormCalcContext. Move into an anonymous
namespace.
Change-Id: Ib8a0ff9b90cf951459c04655bedada3bdb1979a4
Reviewed-on: https://pdfium-review.googlesource.com/39090
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|