Age | Commit message (Collapse) | Author |
|
Should have been part of commit e421d384.
TBR=tsepez@chromium.org
Change-Id: I042c1c85f915798dd393f5ea136edb86d644ca11
Reviewed-on: https://pdfium-review.googlesource.com/c/43982
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I98e2e913f11ff63e70cb841de00a4f56b06ca03b
Reviewed-on: https://pdfium-review.googlesource.com/c/43974
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Split some XFA-only code into their own targets to avoid circular
dependencies. Make CFX_SeekableMultiStream XFA-only.
Change-Id: I88f49556623d52dddd4d0013cc3308b694c01d42
Reviewed-on: https://pdfium-review.googlesource.com/c/43973
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I9b3608bd76ec4911a4bb820fcda62c5d9533fb4f
Reviewed-on: https://pdfium-review.googlesource.com/c/43947
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Also move some implementations out of headers.
Change-Id: I321fc26970c440d874b135bd28e8bc8156b9afee
Reviewed-on: https://pdfium-review.googlesource.com/c/43890
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
if (pObserved->HasObservable()) is more readable than if (*pObserved).
Change-Id: I61ad3deb8e9f30cdc120a05555c2558f34489681
Reviewed-on: https://pdfium-review.googlesource.com/c/43811
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I735c057d4900bcd58c1041df16b885dc7c9ed27d
Reviewed-on: https://pdfium-review.googlesource.com/c/43793
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I2897feee27f80c85f0328f0b220ae5be93686170
Reviewed-on: https://pdfium-review.googlesource.com/c/43610
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
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>
|
|
Change-Id: I92aa74c86aef890fcb991f039b9707d680fdb83c
Reviewed-on: https://pdfium-review.googlesource.com/c/43652
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Make all the other Inflate() methods to call the 4 parameters version.
Make all the other Deflate() methods to call the 4 parameters version.
Make the 4 parameters version of Deflate() call Inflate().
Change-Id: I1d2702898206bf9845f0bb176c2bf4d5a315cf96
Reviewed-on: https://pdfium-review.googlesource.com/c/43573
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: Ice814a84f699ea32325e98bbcea1a5b7db065fc6
Reviewed-on: https://pdfium-review.googlesource.com/c/43572
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
At the same time, change it from 4 floats to a CFX_FloatRect.
Change-Id: I00ded941723d6a264b7a17c73fd337e66b449308
Reviewed-on: https://pdfium-review.googlesource.com/c/43570
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@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>
|
|
Unused static method in StringDataTemplate<>.
Unused WideString::GetFloat(), which in turn allows us to remove
another custom string to float parser.
Change-Id: If7ae60a0ba90563598232bad229f97cb74d682ba
Reviewed-on: https://pdfium-review.googlesource.com/c/43513
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Remove unused method, make ctor/dtor out-of-line.
Change-Id: I77bb7c1da8e9d369085072639ca388247f2b9225
Reviewed-on: https://pdfium-review.googlesource.com/c/43455
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Use it in a couple of places. Make the similar code in the two places
even more so.
Change-Id: I3fc6a567088217e24506cdf7ab927b94cb5a4d52
Reviewed-on: https://pdfium-review.googlesource.com/43330
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I996c9b32d767960a5388e44e13180e1f6577ce38
Reviewed-on: https://pdfium-review.googlesource.com/43190
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Because I nearly botched this trivial calculation in the previous CL.
Change-Id: I7438f9d3476d93b7899c2d7d761234769f53f9e3
Reviewed-on: https://pdfium-review.googlesource.com/43010
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Thanks to Qihoo 360 Vulcan Team for pointing this out.
Change-Id: Ib6dd77307b3759e54168127dc0e17aa42698d852
Reviewed-on: https://pdfium-review.googlesource.com/42830
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I00ce0109251d1231858e87ffc3889abe6937fa26
Reviewed-on: https://pdfium-review.googlesource.com/42811
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@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>
|
|
Because copying ref-counts from one object to another is a
bad idea and sure to leak.
Change-Id: I5f2c0891d08c893eb1ac8fb8a5908d975295ae2e
Reviewed-on: https://pdfium-review.googlesource.com/42670
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>
|
|
Bug: 882959
Change-Id: I3ce17916da1346158dbf5282be6696879a22567a
Reviewed-on: https://pdfium-review.googlesource.com/42355
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
This reverts commit 29e180342e18873babf1c74f7c5c056f90a191b0.
Reason for revert: probably harmless
Original change's description:
> Revert "Introduce FX_Number class as a replacement for FX_atonum()."
>
> This reverts commit a5d7ad3aa8feb08a14b5cca173d673054c1ade23.
>
> Reason for revert: Speculative revert to get back before flake.
>
> Original change's description:
> > Introduce FX_Number class as a replacement for FX_atonum().
> >
> > The issue with FX_atonum() is that it doesn't return any information
> > about whether it range-checked its integer values as a signed or
> > unsigned type, even though it knows this as part of its processing.
> >
> > Rather than adding another out parameter to that function, create
> > a class to hold all this information together.
> >
> > This is the first place things went astray while diagnosing
> > bug 882959, in that a large positive value was cast to float as a
> > negative value. Unfortunately, this doesn't affect the related bug,
> > but is a step in the right direction.
> >
> > Change-Id: I0977ec8fccf85e2632a962507bdd30a1cbe6d33c
> > Reviewed-on: https://pdfium-review.googlesource.com/42353
> > Reviewed-by: Lei Zhang <thestig@chromium.org>
> > Commit-Queue: Tom Sepez <tsepez@chromium.org>
>
> TBR=thestig@chromium.org,tsepez@chromium.org
>
> Change-Id: Ia56270c3daa80408fc2b23eb4384a77f03f45b82
> Reviewed-on: https://pdfium-review.googlesource.com/42392
> Reviewed-by: Tom Sepez <tsepez@chromium.org>
> Commit-Queue: Tom Sepez <tsepez@chromium.org>
TBR=thestig@chromium.org,tsepez@chromium.org
Change-Id: I83c37aa3040a8890f2117753f19ab1d452d411e7
Reviewed-on: https://pdfium-review.googlesource.com/42410
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This reverts commit a5d7ad3aa8feb08a14b5cca173d673054c1ade23.
Reason for revert: Speculative revert to get back before flake.
Original change's description:
> Introduce FX_Number class as a replacement for FX_atonum().
>
> The issue with FX_atonum() is that it doesn't return any information
> about whether it range-checked its integer values as a signed or
> unsigned type, even though it knows this as part of its processing.
>
> Rather than adding another out parameter to that function, create
> a class to hold all this information together.
>
> This is the first place things went astray while diagnosing
> bug 882959, in that a large positive value was cast to float as a
> negative value. Unfortunately, this doesn't affect the related bug,
> but is a step in the right direction.
>
> Change-Id: I0977ec8fccf85e2632a962507bdd30a1cbe6d33c
> Reviewed-on: https://pdfium-review.googlesource.com/42353
> Reviewed-by: Lei Zhang <thestig@chromium.org>
> Commit-Queue: Tom Sepez <tsepez@chromium.org>
TBR=thestig@chromium.org,tsepez@chromium.org
Change-Id: Ia56270c3daa80408fc2b23eb4384a77f03f45b82
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://pdfium-review.googlesource.com/42392
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I2b1e5cc7a9576b5bb3bf3888225d1f6e54e0c95b
Reviewed-on: https://pdfium-review.googlesource.com/42051
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
The issue with FX_atonum() is that it doesn't return any information
about whether it range-checked its integer values as a signed or
unsigned type, even though it knows this as part of its processing.
Rather than adding another out parameter to that function, create
a class to hold all this information together.
This is the first place things went astray while diagnosing
bug 882959, in that a large positive value was cast to float as a
negative value. Unfortunately, this doesn't affect the related bug,
but is a step in the right direction.
Change-Id: I0977ec8fccf85e2632a962507bdd30a1cbe6d33c
Reviewed-on: https://pdfium-review.googlesource.com/42353
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Use the preferred idiom of creating a subspan, which makes the
proper checks prior to the copy.
Change-Id: Ia7f25b5760dea5707df66cf421195b23a1ce0ad0
Reviewed-on: https://pdfium-review.googlesource.com/41911
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Test UnownedPtr<> and RetainPtr<>. We cannot operate against
std::unique_ptr<> because we need a copyable type. Add test for
self-reassignment on going out of scope. Move one test helper
class to testing/ so it can be shared among unit tests. Allow it
to recognize if it ever gets "destroyed", otherwise we can't be
sure Retain/Release applied in the correct order.
Change-Id: I13056094c70079f7283cbc7600948f81a64874b4
Reviewed-on: https://pdfium-review.googlesource.com/41690
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@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>
|
|
Conversion to span makes this more elegant in a number of places,
owing to std::vector directly converting to span, and the bytestring's
ToRawSpan().
Disambiguate single-argument forms to allow passing {} as
an argument.
Change-Id: Ibd5eaadca8d8cbbd589338f375c7ee8439fd3eb2
Reviewed-on: https://pdfium-review.googlesource.com/41272
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Proves we own the memory that the class will eventually free.
Change-Id: Ie9523da8db738e7478a1c73e3e1a6b24aed38442
Reviewed-on: https://pdfium-review.googlesource.com/41290
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
- Remove set, but otherwise unused variables.
- Mark some pdfium_test code as V8-enabled only.
- Do not build one unit test with GCC.
Change-Id: I3f04273a7731086e08386478a62769bf06f6d8a4
Reviewed-on: https://pdfium-review.googlesource.com/41271
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I86c6f7526e2ef4c3e8de30ebaff223095ee70fc4
Reviewed-on: https://pdfium-review.googlesource.com/40811
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Change-Id: I976a8841f1519310cbf934103336dc050a7c293d
Reviewed-on: https://pdfium-review.googlesource.com/40773
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Small test to show these forms compile and do not transfer ownership.
Change-Id: I1787a57d4d0bf70da7b6101c1f958cfe9a8f9dda
Reviewed-on: https://pdfium-review.googlesource.com/40830
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Disentangle setting an allocation step from estimating size, these
separate concepts can be handled separately.
Change-Id: I27bf3e193018a4377ccf266207b889fdb672826c
Reviewed-on: https://pdfium-review.googlesource.com/40210
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Callers always want one form or the other, so split into separate
methods. This may save some branching.
Remove forms that are not used.
Put more helpful helper function in .cpp file.
Change-Id: I4e025de7f69ce3f323cd290a5dc8202dd4f8ca07
Reviewed-on: https://pdfium-review.googlesource.com/40270
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@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>
|
|
Replace it with CFX_ReadOnlyMemoryStream, which does the same thing.
Take some checks from CFX_BufferSeekableReadStream and add them
CFX_ReadOnlyMemoryStream.
Change-Id: I25554c3aec3ec96967f8df16ca68a64dba121b6f
Reviewed-on: https://pdfium-review.googlesource.com/40070
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
It is always true now.
BUG=pdfium:263
Change-Id: I74fd0091f5815701718e8cd5acc6e7a0de772a85
Reviewed-on: https://pdfium-review.googlesource.com/40031
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: Id097320ab2d9b5d1579582e5797e29c701499501
Reviewed-on: https://pdfium-review.googlesource.com/39991
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This class is much simpler than CFX_MemoryStream and does only what
CFX_BmpDecompressor and CFX_GifContext needs. Swap out CFX_MemoryStream
and remove CFX_MemoryStream::Seek().
BUG=pdfium:263
Change-Id: Ifd8ce4d2b6c9fedd6ec842d46f54fc8e654fbca7
Reviewed-on: https://pdfium-review.googlesource.com/39880
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Rename it CFX_ReadOnlyMemoryStream and swap out one use of CFX_MemoryStream.
BUG=pdfium:263
Change-Id: I15012df156a6a4d7c36f6fd58f32c355eae5fa1a
Reviewed-on: https://pdfium-review.googlesource.com/39878
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Make them const, and remove m_nGrowSize which is always the same value.
Also remove unused method and make GetBuffer() non-const.
Change-Id: I272aa4c268c4a887e155800b7c8c10892b343465
Reviewed-on: https://pdfium-review.googlesource.com/39877
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
No need to even bring any .cpp files in line with these headers.
Change-Id: I934169d77ae09adc11f02e5ea92b1f8b078c9477
Reviewed-on: https://pdfium-review.googlesource.com/39876
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|