Age | Commit message (Collapse) | Author |
|
Improve CPDF_Document interface.
Fix relationship between CPDF_Document and CPDF_Parser.
This CL changes CPDF_Document to internally create the CPDF_Parser
and removes the need for the CPDF_Parser to know about the CPDF_Document.
Change-Id: Iec7aef19575c90f30b9a6c919dfd4f4417e4caf2
Reviewed-on: https://pdfium-review.googlesource.com/35630
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I1c9f8221ce7a0e42407e93deec481be2e941cfde
Reviewed-on: https://pdfium-review.googlesource.com/36210
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
It is only called during the destructor, and does things that
the destructor would automatically do, like calling into the
superclass. So just use destructors.
Change-Id: I1196817798eeca99914b44ddee1f75781e682211
Reviewed-on: https://pdfium-review.googlesource.com/36231
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I5ac61ab323adb5eec2de8660064fff95ee877b5e
Reviewed-on: https://pdfium-review.googlesource.com/35432
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
|
|
Change-Id: I1e9059242dad254394b73c6fddb010b182e969f0
Reviewed-on: https://pdfium-review.googlesource.com/36230
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I558ac625d842d1b3d9dfdaf4d7661d4c02c6244a
Reviewed-on: https://pdfium-review.googlesource.com/36133
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I5dc72c48ffd50836dd8c6a21e23568bc8703ee5a
Reviewed-on: https://pdfium-review.googlesource.com/36132
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: Id6551957405605cf273d5d100b6db9c27ecc6e7c
Reviewed-on: https://pdfium-review.googlesource.com/36131
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Required moving some sizes to .h file for default construction
of spans from c-style arrays.
Change-Id: I45c42103f3575bc83e57a085ad4e8f16698468d3
Reviewed-on: https://pdfium-review.googlesource.com/36190
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Bug: chromium:844367
Change-Id: I3cbe5d97a913c734c3d54657a2fb47b30cc362fe
Reviewed-on: https://pdfium-review.googlesource.com/36191
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Ideally, unowned ptrs might well be const, as updating something
through an unowned reference is best avoided.
Change-Id: Ida8111ffe0ee1e30bbf6b7718b0929dfb5cafdff
Reviewed-on: https://pdfium-review.googlesource.com/36050
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: Ie63f622674d9085fa45642c15e7ee8b22ca98555
Reviewed-on: https://pdfium-review.googlesource.com/36130
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Bug: chromium:844367
Change-Id: Id8185ea0219c03b4f8683362a3c2a45d481a5cfb
Reviewed-on: https://pdfium-review.googlesource.com/36170
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Use CPDF_SyntaxParser to read data, instead manual cache.
Simplify merging trailers logic.
Change-Id: Icaa569f1082cde6dc9437a375c5c27e187fd6c79
Reviewed-on: https://pdfium-review.googlesource.com/35431
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: Ibf7aee942027adace7ec0831aefe0fe8c28e41cc
Reviewed-on: https://pdfium-review.googlesource.com/35610
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: Ib0ee1c2b0a2def650711c87b4eb04a9f88470944
Reviewed-on: https://pdfium-review.googlesource.com/35550
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
It is allow do not store raw objects streams within CPDF_Document
for reduce memory usage.
Change-Id: I4377bd5119d87314e76f14255171618cf6ee533d
Reviewed-on: https://pdfium-review.googlesource.com/35430
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
|
|
Improve the .evt mechanism to accept mouse clicks with modifiers
(such as shift).
Bug: pdfium:1105
Change-Id: I6e9c2c1f66b7fde250b55b41ccdf115a311f44f7
Reviewed-on: https://pdfium-review.googlesource.com/36091
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
In turn, this requires making some of the tests use an indirect
root dictionary so as to satisfy the lifetime requirements.
Change-Id: Ibdbe294a76200d4486134e5848c169a6c2d802bf
Reviewed-on: https://pdfium-review.googlesource.com/36110
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
In contrast with FPDFText_GetFontSize(), this exposes the font size of
the text object according to the text state, rather than the font size
of a particular character.
Change-Id: Iac88d1aea8fb6bb5522bdaf01363aa6d32025b8f
Reviewed-on: https://pdfium-review.googlesource.com/35931
Reviewed-by: Nicolás Peña Moreno <npm@chromium.org>
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
|
|
Bug: 856354
Change-Id: Ic0ac4d189dff6f4688a6c5feb745fe8c5a5ed4bb
Reviewed-on: https://pdfium-review.googlesource.com/36150
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
BUG=chromium:856054
Change-Id: Ieacb7be324f290c91623ed1bd97744150fbfa6e7
Reviewed-on: https://pdfium-review.googlesource.com/36090
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I1794848607f2db3f1ef39dbd221b7219feb9254c
Reviewed-on: https://pdfium-review.googlesource.com/35990
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I53ce4ee699644b0a30132e642b8f466cd9b6e7b1
Reviewed-on: https://pdfium-review.googlesource.com/35972
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: Ic0e528d01338a349deb1ee5a91372b132959e4ae
Reviewed-on: https://pdfium-review.googlesource.com/35971
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
BUG=pdfium:1117
Change-Id: I7b2cccf187dbc1ec3a6bfc36a12973a13e4ab0d0
Reviewed-on: https://pdfium-review.googlesource.com/36010
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I52d7b9692c19af1aafab7d572d0a274726bd37f5
Reviewed-on: https://pdfium-review.googlesource.com/35911
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Change-Id: Idfc1c2282cc9318d1135f360ff03d99e27105127
Reviewed-on: https://pdfium-review.googlesource.com/35910
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Cleanup CL to address some comments on
https://pdfium-review.googlesource.com/c/pdfium/+/35730 that appeared
after I sent it to the CQ.
Change-Id: I7d5539101547a79d6fc3edf45720b60a1112e2e5
Reviewed-on: https://pdfium-review.googlesource.com/35951
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@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>
|
|
Bug: chromium:853430
Change-Id: I1c42de1e3db10dfb6399cd8abdd13c56addc8827
Reviewed-on: https://pdfium-review.googlesource.com/35850
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
This is safer since a ref cannot be deleted.
Change-Id: Ib8d76ae2adb7c59e6955881eee0d2bd4db448b68
Reviewed-on: https://pdfium-review.googlesource.com/35950
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Move receiving "Info" dictionary form API implementation to CPDF_Document.
Also added test.
Bug: pdfium:664
Change-Id: I273980750fbdd4d20711f651245780fc9ba02789
Reviewed-on: https://pdfium-review.googlesource.com/35490
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
Reviewed-by: Henrique Nakashima <hnakashima@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>
|
|
Change-Id: Ic750e04a24524d47ba77b9b7cd5a29605965f68b
Reviewed-on: https://pdfium-review.googlesource.com/35390
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Bug: pdfium:1051
Change-Id: Ia990a47eeceb47fd2b15fe4ea7226861507484db
Reviewed-on: https://pdfium-review.googlesource.com/35115
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
In this function a string is converted to UTF8, if there are
non-printing characters in the original string, the generated string
will be shorter. Thus using the original string length for iteration
range will cause an OOB read.
BUG=chromium:854623
Change-Id: I338005476c3de529709f3eae6892d27a6c7f2263
Reviewed-on: https://pdfium-review.googlesource.com/35810
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
It is hard to tell if there is some unsavory stuff going on with
references otherwise. Avoids some const_casts in the process.
Add some UnownedPtrs along the way to check caller's storage duration.
Change-Id: Ic8d85802083f0b27e07993ea25f8f1c15fca1712
Reviewed-on: https://pdfium-review.googlesource.com/35750
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Many of these cause a string duplication as we go from
Widestring => c_str => Widestring
Change-Id: I0dfa952e66f89138e719ff9200db3d9397839e28
Reviewed-on: https://pdfium-review.googlesource.com/35790
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Because the invisible temporary goes out of scope at the next
semicolon.
Also avoid returning const string references since the cost is
low to properly keep the string alive.
Change-Id: Id283e4fd99f79a02d79d739a533a4ce05e831e2a
Reviewed-on: https://pdfium-review.googlesource.com/35710
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
- Changes the URL to retrieve baselines which returns the
baselines based on the issue number (if available)
- Compare against a single baseline (instead of multiple)
- Writes the results of comparing to the baselines to a
separate output file that can then be parsed by the
recipe code.
See complementary CLs:
https://skia-review.googlesource.com/c/buildbot/+/131923
https://chromium-review.googlesource.com/c/chromium/tools/build/+/1085853
Change-Id: I90cdd77d0d26e63a5e686f4862fc68dc9c4429d3
Reviewed-on: https://pdfium-review.googlesource.com/33772
Commit-Queue: Stephan Altmueller <stephana@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@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>
|
|
Bug: 853238
Change-Id: I133be340fd877e9acd2733845d454924dc86d295
Reviewed-on: https://pdfium-review.googlesource.com/35711
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
|
|
Change-Id: I5dfadcb68e640235be6e3eb7c8d57ae3b8013d26
Reviewed-on: https://pdfium-review.googlesource.com/35691
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Many of these are converting ByteString => c_str => ByteStringView, since
the ByteStringView ctor is implicit. This is unfortunate, since that
involves a strlen() which the ByteString already knows if we use
AsStringView() instead.
This changed one test result where we can now return the string
"\0" instead of "" -- since strlen no longer eats the NUL. This
seems consistent, say, with String.fromCharCode().
Change-Id: I17f68d1a1f4b352960208f9148e68ab4c4d78bd2
Reviewed-on: https://pdfium-review.googlesource.com/35590
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Skia is moving to normalize on std::swap instead of its own SkTSwap.
This removes the use of SkTSwap from PDFium so that Skia can remove it.
Change-Id: If77708c1f363f4fd82a4c7905c7fbb2060900532
Reviewed-on: https://pdfium-review.googlesource.com/35470
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
c_str() is a bit of a code smell, esp. since Byte/Wide strings
know how to do this all by themselves.
Change-Id: I9c86cee42c12a3f72ddb1d410a91cf25647d0ce6
Reviewed-on: https://pdfium-review.googlesource.com/35530
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Setting an upper limit to the size of images being processed in the
JPX fuzzer to reduce timeouts due to images just being really big.
Also cleaned the types for passing pitch down to reduce the signedness
conversions.
BUG=chromium:834561
Change-Id: I28b7a2537a922ed7a9ca2f8ed049ae78dd471f49
Reviewed-on: https://pdfium-review.googlesource.com/35570
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Remove some string copies in barcode that were noticed whilst
looking for moves.
Change-Id: Ieda34d00f633576ba1f0dca283dcdabfb36f236c
Reviewed-on: https://pdfium-review.googlesource.com/35410
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
We speculate that the bug that makes the comparison operator irreflexive
might be the cause of the segv on windows production code, should a
NaN sneak into the GraphicsData struct. In any event, should this
happen, the tree won't be correct with some nodes erroneously replaced.
Add a test which fails prior to the patch, but alas does not elicit
the segv.
Also move operator<() methods to .cpp file corresponding to .h file
in which they are delcared.
Bug: 852273
Change-Id: Ib7929881e7ffbed8b09f6e2c9fb7898cbde58946
Reviewed-on: https://pdfium-review.googlesource.com/35171
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|