Age | Commit message (Collapse) | Author |
|
Applies std::remove_ptr to the public API types so that we can
deduce a correct unique ptr type no matter how that API might
change away from void* usage.
Creates shorter names for std::unique_ptr<std::remove_pointer<>, ...>
Change-Id: I04a0ff43cb7d5a4d3867939a53a54c9cef00db86
Reviewed-on: https://pdfium-review.googlesource.com/31292
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
BUG=pdfium:41
Change-Id: I98070a5a6c88a0769f2b571eae4fe62092f7dfcd
Reviewed-on: https://pdfium-review.googlesource.com/31232
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Move WindowsPrintMode assertion into CPSPrinterDriver.
Change-Id: I570076b43751e052c5396e89a6674b83a4ad1a1e
Reviewed-on: https://pdfium-review.googlesource.com/31298
Reviewed-by: Rebekah Potter <rbpotter@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Moved to an independent CL from
https://pdfium-review.googlesource.com/c/pdfium/+/31296
Change-Id: Ia76e5609dc09bb7b483e092b10d9f8522e2dc175
Reviewed-on: https://pdfium-review.googlesource.com/31297
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
It is never used.
Change-Id: I09220eb16a4679c8499079c3c1375574f6fc0450
Reviewed-on: https://pdfium-review.googlesource.com/31300
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This CL removes the m_NodeStack member from the CFX_XMLParser. Instead
of using the node stack we retrieve the parent by getting the current
childs parent.
Change-Id: I0c4c220d14e35c5b6edc5c9c6a3008368f2d550a
Reviewed-on: https://pdfium-review.googlesource.com/31290
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL removes the m_CurNodeType member from CFX_XMLParser. This was,
essentially, duplicating the m_XMLNodeTypeStack. We now use the top() of
the stack element to find the same information.
Change-Id: I26507d2eee954837210aa42919ff061cfc8e85d8
Reviewed-on: https://pdfium-review.googlesource.com/31277
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
This CL removes the usage of CFX_BlockBuffer from CFX_XMLParser. The
block buffer has been replaced by a vector which is emptied out after
the characters are removed. This should use less memory when parsing XML
as the block buffer was previously storing all text characters seen in
the file.
Change-Id: I89568c664c762bb9feb034348524e5e86c2d9078
Reviewed-on: https://pdfium-review.googlesource.com/31275
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
This CL converts the CFX_XMLParser to use the FXSYS methods to convert
decimal and hex chars during entity conversion.
Change-Id: I7f6c83fc528e95c9f4c2bcdb04f0066da2c15c09
Reviewed-on: https://pdfium-review.googlesource.com/31274
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
The methods to get a piece of data from the text buffer are all
identical. This CL collapses them all into a single GetTextData method.
Change-Id: Ibd2ace9023a3707505c4c80c6aeb01af666445d9
Reviewed-on: https://pdfium-review.googlesource.com/31273
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
This CL moves most initialization of CFX_XMLParser into the header file
and re-organizes the members to group members together better.
Change-Id: I49031ea65dc0d68c9b47cffe942c65f488bbaf20
Reviewed-on: https://pdfium-review.googlesource.com/31250
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL changes CFX_SeekableStreamProxy to be an IFX_SeekableReadStream
subclass.
This is a reland of https://pdfium-review.googlesource.com/c/pdfium/+/30879
after fix bad merge.
Change-Id: Iad58abe7e065541867f202059a944e9be4da5713
Reviewed-on: https://pdfium-review.googlesource.com/31195
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL changes CFX_XML to use an IFX_SeekableWriteStream instead of
the more generic IFX_SeekableStream.
This is a reland of https://pdfium-review.googlesource.com/c/pdfium/+/30877
without pulling in the XML lifetime changes.
Change-Id: I5091da6ad37715fff77f3f22d35ab0105f2bc3d0
Reviewed-on: https://pdfium-review.googlesource.com/31194
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
It is required to be an array of positive integers. The existing
implementation seems to accommodate non-compliant PDFs where the Size
entry is an integer.
Change-Id: I58faa3f84ca627f189c67bab5884d4b1f9b105ca
Reviewed-on: https://pdfium-review.googlesource.com/31151
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
This reverts commit 9a3a7709103a872037dcea1f3cf0b7785a3da191.
Reason for revert: Gerrit did not do what I expected....
Original change's description:
> Change CFX_XML Save to take a write stream
>
> This CL changes CFX_XML to use an IFX_SeekableWriteStream instead of the more
> generic IFX_SeekableStream.
>
> Change-Id: I6e4def380c43eca755d91ad5cb6146c2dfdaee10
> Reviewed-on: https://pdfium-review.googlesource.com/30877
> Commit-Queue: dsinclair <dsinclair@chromium.org>
> Reviewed-by: Tom Sepez <tsepez@chromium.org>
TBR=tsepez@chromium.org,dsinclair@chromium.org,hnakashima@chromium.org
Change-Id: I137e53bf93285b88ade6832dedefca66e3b61e13
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://pdfium-review.googlesource.com/31211
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This reverts commit c6077a0164340fa084be03eb059d608bc2675b2b.
Reason for revert: Gerrit did not do what i expected.
Original change's description:
> Make CFX_SeekableStreamProxy a subclass of IFX_SeekableReadStream
>
> This CL changes CFX_SeekableStreamProxy to be an IFX_SeekableReadStream
> subclass.
>
> Change-Id: I28ccb4771606fd6c9cc60e57297ae2e776fc5a9f
> Reviewed-on: https://pdfium-review.googlesource.com/30879
> Commit-Queue: dsinclair <dsinclair@chromium.org>
> Reviewed-by: Tom Sepez <tsepez@chromium.org>
TBR=tsepez@chromium.org,dsinclair@chromium.org,hnakashima@chromium.org
Change-Id: I65e7647221e9bad2c0db7d068638178996972437
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://pdfium-review.googlesource.com/31210
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL changes CFX_SeekableStreamProxy to be an IFX_SeekableReadStream
subclass.
Change-Id: I28ccb4771606fd6c9cc60e57297ae2e776fc5a9f
Reviewed-on: https://pdfium-review.googlesource.com/30879
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL changes CFX_XML to use an IFX_SeekableWriteStream instead of the more
generic IFX_SeekableStream.
Change-Id: I6e4def380c43eca755d91ad5cb6146c2dfdaee10
Reviewed-on: https://pdfium-review.googlesource.com/30877
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: 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>
|
|
When parsing UTF16-LE, the default trailing "\0" from a single-byte
character literal isn't suffucient.
Bug: 835184
Change-Id: Ie7db53262adbec0ebccb5d0b22752b8c9f5e6229
Reviewed-on: https://pdfium-review.googlesource.com/31191
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I54aae3c65ded779f1421b8f971a187979e5a204b
Reviewed-on: https://pdfium-review.googlesource.com/31150
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
BUG=chromium:834557
Change-Id: I8fb8d74f87097b39608c3f83f2fa1c4e49e69980
Reviewed-on: https://pdfium-review.googlesource.com/31170
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Currently, one gets data from CPDF_PatternCS via its parent class's
GetRGB(const float* pBuf) method. To squeeze through this interface, the
caller has to pass in a float*, and CPDF_PatternCS::GetRGB() has to cast
it to PatternValue*.
Instead of doing casting, add a specialized GetPatternRGB() method to
CPDF_PatternCS. In its parent class, CPDF_ColorSpace, add AsPatternCS()
so callers can get a CPDF_PatternCS* from a CPDF_ColorSpace*. Change
existing callers to use these new methods.
Change-Id: Id476c9ece7ce8d3499a718acc682bc25036a5407
Reviewed-on: https://pdfium-review.googlesource.com/31030
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This reverts commit 54e6da1ee793f436341dfcdc4e0c26b0658d1928.
Reason for revert: Checks not ordered correctly.
Original change's description:
> Do validation earlier in CPDF_SampledFunc::v_Init().
>
> Change-Id: Ib44b39aea419230f73583caf69313a2f92557397
> Reviewed-on: https://pdfium-review.googlesource.com/30932
> Commit-Queue: Lei Zhang <thestig@chromium.org>
> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
TBR=thestig@chromium.org,hnakashima@chromium.org
Change-Id: I133ca5add12c173dd05ef995b5834c3058d814cd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://pdfium-review.googlesource.com/31050
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I06eab59d7944309d6fe99b97956e8ffb11d64088
Reviewed-on: https://pdfium-review.googlesource.com/30991
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: Iaa3988cea5cdc6ce723c59ad051800925216d81b
Reviewed-on: https://pdfium-review.googlesource.com/30990
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Change-Id: I8eeaf62947960d8774cb129be145fae157feb70e
Reviewed-on: https://pdfium-review.googlesource.com/30970
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Also do some cleanup and use FX_SAFE_UINT32.
Change-Id: I8e9fc49fb768cfc4b13b164c1dcf51b8ca99ec0b
Reviewed-on: https://pdfium-review.googlesource.com/30934
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Change-Id: Ib44b39aea419230f73583caf69313a2f92557397
Reviewed-on: https://pdfium-review.googlesource.com/30932
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
They are required for type 0 and type 4 functions. The number of outputs
should not be 0.
Change-Id: I4cb1fa14a32ef0a1c92230d83461c697f389106f
Reviewed-on: https://pdfium-review.googlesource.com/30931
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Use a ByteString object to store the returned value of
WideString.UTF8Encode() instead of using a ByteStringView object
to store the returned value of WideString.UTF8Encode().AsStringView().
Bug: chromium:834149
Change-Id: I8fa8dd7920140730c0417c188572d7b53e4ffb48
Reviewed-on: https://pdfium-review.googlesource.com/30890
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
BUG=chromium:833721
Change-Id: I3ca878760c12144ef27a71dcbbfd7c18d12a5f3b
Reviewed-on: https://pdfium-review.googlesource.com/30992
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Also tidy AsSpan() for Byte/Wide strings.
Change-Id: I1853d31a59bc7f46de81295cde2e1062b91badec
Reviewed-on: https://pdfium-review.googlesource.com/30911
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Get bounds checking "for free".
Change-Id: Ic60d63836f6c223e2ee1262649d47da54bb30ecc
Reviewed-on: https://pdfium-review.googlesource.com/30876
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Cleanup formatting and unused variables in the CFX_XML classes.
Change-Id: I1aff6317a3da38a141a071ba69c7893d0f669732
Reviewed-on: https://pdfium-review.googlesource.com/30730
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
This CL sets the CFX_XML tree ownership. The pointers set into the tree
must be unique_ptrs and the CFX_XMLNode children are set to be either
unique_ptrs or UnownedPtrs.
Change-Id: Ib0db495c81471e40f5b4533503f7bbe5a784fd77
Reviewed-on: https://pdfium-review.googlesource.com/30711
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL removes the CFX_SeekableStreamProxy constructor which accepts a data
pointer as it is unused.
Change-Id: I1340ebdf1f85ab1dd6c7cd1b5fdebe796c07115e
Reviewed-on: https://pdfium-review.googlesource.com/30858
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL changes the CFX_XMLParser to accept an IFX_SeekableStream intead of a
CFX_SeekableStreamProxy.
Change-Id: I3534288a8a00095acd78a60bf6b925c6a0357892
Reviewed-on: https://pdfium-review.googlesource.com/30856
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL fixes up some cfx_seekablestreamproxy includes and adds a helper to the
xmlparser tests.
Change-Id: If1b67dee51b49fa39527274f6c68da5ec673704f
Reviewed-on: https://pdfium-review.googlesource.com/30854
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL removes the abliity to write to the seekable stream proxy class.
Change-Id: I0eda2619714df190d326c23dfdcd4527d4312779
Reviewed-on: https://pdfium-review.googlesource.com/30853
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL converts the CFX_XML Save methods to take an IFX_SeekableStream instead
of a CFX_SeekableStreamProxy.
Change-Id: I6b3f6acc9f51e73b3c863b965b4dcdcbd25ba949
Reviewed-on: https://pdfium-review.googlesource.com/30850
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This reverts commit 3d523e3cf89440e2ffc6571b1c687ad5e3f0318f.
Fixes bounding errors now caught by tests.
Change-Id: I4d0f1791bdcc45a10615a62abf7a4d20e7e538f2
Reviewed-on: https://pdfium-review.googlesource.com/30799
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Add constants/stream_dict_common.h. The header lists all the constants
in the table in the same order. Constants that are not used at all are
commented out.
BUG=pdfium:1049
Change-Id: I6539090e0ad56319ea628883e388aeacef044e52
Reviewed-on: https://pdfium-review.googlesource.com/29090
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This reverts commit 0d32b8fda53e02c1036d39f7290d4f59f2b58ca4.
Restore behaviour on trunk.
TBR: dsinclair@chromium.org
Change-Id: Ia867f09ae9d2885595c4d9b300a058431dfd84f2
Reviewed-on: https://pdfium-review.googlesource.com/30811
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
- Switch away from FX_Alloc2D() when it is safe to do so.
- Use FX_SAFE_SIZE_T to avoid a potential underflow with FX_Realloc().
- Mark the v_Call() input as const.
- Check Call() and v_Call() return results.
Change-Id: I6ec3122b23e0f137f88aa8d85a9675154a1b1706
Reviewed-on: https://pdfium-review.googlesource.com/30802
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This makes it easier to control modifications to the page object
list.
Bug: pdfium:1051
Change-Id: Ia85c597fa6d39e89041b990b4b6c91e327ef811d
Reviewed-on: https://pdfium-review.googlesource.com/30803
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
CFX_XMLElement is the only subclass of CFX_XMLAttributeNode. This CL
merges the two classes together. The {Set|Get}String method has been
renamed to {Set|Get}Attribute to make it clearer what you're retrieving.
Change-Id: I158c961d4d8c5f563d937a3e7a35321a33622562
Reviewed-on: https://pdfium-review.googlesource.com/30710
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Avoids some weirdness in mac toolchain with external templates
and Operator() = default; instantiation.
Change-Id: Ieec5dc08ad559752278a6f1de8fc69aad2b4e30c
Reviewed-on: https://pdfium-review.googlesource.com/30810
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
This reverts commit 154e18f9a862975abecebe77b8f5fb418418d14c.
Reason for revert: Generate CL to merge to beta branch
Original change's description:
> Return pdfium::span<wchar_t> from WideString::GetBuffer().
>
> Adds bounds checking "for free", but beware of span outliving
> a ReleaseBuffer() call. Scoping as such avoids the possibility
> of using an invalid span (and it is flagged as a lifetime issue).
>
> Change-Id: Ica63f4b1429823d0254ec6951aeaeb08160cb93c
> Reviewed-on: https://pdfium-review.googlesource.com/30310
> Reviewed-by: dsinclair <dsinclair@chromium.org>
> Commit-Queue: Tom Sepez <tsepez@chromium.org>
TBR=tsepez@chromium.org,dsinclair@chromium.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: Ie1ec9434215584a024538ca8edeb59dea555af48
Reviewed-on: https://pdfium-review.googlesource.com/30830
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
This CL removes the GetNumbericSymbol method and adds individual methods
for each symbol we retrieve.
Change-Id: Id14108e5ea43a76250e18a1aa13bdbb05e928cdc
Reviewed-on: https://pdfium-review.googlesource.com/30695
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|