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>
|
|
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>
|
|
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>
|
|
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>
|
|
This reverts commit 5700d9e2eea5813861920995815ac092fd7df973.
Reason for revert: Harmless, I think.
Original change's description:
> Revert "Make things more const-y"
>
> This reverts commit 882ed81dec7afc5bc106f965af34f1e59407fd95.
>
> Reason for revert: Rule out that this be making embeddertest flakey.
> Seems improbable, but maybe the const is allowing the compiler to use stale data in a non-logically const operation ???
>
> Original change's description:
> > Make things more const-y
> >
> > Follow up to https://pdfium-review.googlesource.com/c/pdfium/+/42350
> > to use const more in the changed code.
> >
> > BUG=chromium:881678
> >
> > Change-Id: I7a88862952c9ba25ffa89c2827e1de322f3b5c33
> > Reviewed-on: https://pdfium-review.googlesource.com/42370
> > Commit-Queue: Ryan Harrison <rharrison@chromium.org>
> > Reviewed-by: Lei Zhang <thestig@chromium.org>
> > Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
>
> TBR=thestig@chromium.org,hnakashima@chromium.org,rharrison@chromium.org
>
> Change-Id: Ifee656f151d3e6dab6de33c3b96b37b9809004c4
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: chromium:881678
> Reviewed-on: https://pdfium-review.googlesource.com/42372
> Reviewed-by: Tom Sepez <tsepez@chromium.org>
> Commit-Queue: Tom Sepez <tsepez@chromium.org>
TBR=thestig@chromium.org,tsepez@chromium.org,hnakashima@chromium.org,rharrison@chromium.org
Change-Id: I24de62969b039288596aa4d0b268ad49728e4891
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:881678
Reviewed-on: https://pdfium-review.googlesource.com/42393
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
This reverts commit 882ed81dec7afc5bc106f965af34f1e59407fd95.
Reason for revert: Rule out that this be making embeddertest flakey.
Seems improbable, but maybe the const is allowing the compiler to use stale data in a non-logically const operation ???
Original change's description:
> Make things more const-y
>
> Follow up to https://pdfium-review.googlesource.com/c/pdfium/+/42350
> to use const more in the changed code.
>
> BUG=chromium:881678
>
> Change-Id: I7a88862952c9ba25ffa89c2827e1de322f3b5c33
> Reviewed-on: https://pdfium-review.googlesource.com/42370
> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
> Reviewed-by: Lei Zhang <thestig@chromium.org>
> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
TBR=thestig@chromium.org,hnakashima@chromium.org,rharrison@chromium.org
Change-Id: Ifee656f151d3e6dab6de33c3b96b37b9809004c4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:881678
Reviewed-on: https://pdfium-review.googlesource.com/42372
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Follow up to https://pdfium-review.googlesource.com/c/pdfium/+/42350
to use const more in the changed code.
BUG=chromium:881678
Change-Id: I7a88862952c9ba25ffa89c2827e1de322f3b5c33
Reviewed-on: https://pdfium-review.googlesource.com/42370
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
In this parser, a vector of CodeRange values are built up during
operations that need to be sync'd with the CPDF_CMap that is being
initialized. In the existing implementation, the vector being built as
a member var for the parser, and copying the values over to the cmap
whenever there is a change. When profiling, this copy is where the code
spends most of its time.
The code has been rewritten to have the parser reference/modify the
instance of the vector in the cmap instead of having its own copy. This
removes all of the copies and significantly speeds things up.
BUG=chromium:881678
Change-Id: Ib8e75962507ca3d3b1ed066fd1faa4fbb7141122
Reviewed-on: https://pdfium-review.googlesource.com/42350
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Move some platform-specific ifdefs so the come last in each
section as it is easier to read, perhaps.
Change-Id: Ic1c2652c46ecebc63b66213735ed6d94737a7f32
Reviewed-on: https://pdfium-review.googlesource.com/41630
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
These look too much like public/ FPDF functions otherwise and yet
they are not exposed anywhere beyond core/fpdfapi. Disambiguate
one method vs. top-level function usage as a result.
Bug: pdfium:1141
Change-Id: I9cfdfced90386bb9ef6b2b86f568f2e6f8ee6a5a
Reviewed-on: https://pdfium-review.googlesource.com/41530
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@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>
|
|
It is not a source from which you can get CFX_DIBs, but rather a
base class from which all DIBs inherit.
Do the same thing for the CPDF_DIBSource wrapper class.
Mechanical change apart from adding a one-line comment in cfx_dibbase.h
Change-Id: Id2bde87813ca301d9fafc55ce08d703dfc6a7184
Reviewed-on: https://pdfium-review.googlesource.com/41352
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
It gets computed, and passed around, but in the end no decisions
are made because of it.
Change-Id: If67f6f0cd0c37e52993832be1fb83498fd851914
Reviewed-on: https://pdfium-review.googlesource.com/41190
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Bug: chromium:875924
Change-Id: I85c86d3f90ee62b5593b0b20e44283c5056702ff
Reviewed-on: https://pdfium-review.googlesource.com/40730
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
|
|
Bug: pdfium:929
Change-Id: I9da03a1e317cff69ec4c76b69289cfa753b6bb77
Reviewed-on: https://pdfium-review.googlesource.com/40531
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
|
|
IsBase14Font() is what its only caller really needs. Also use it in
Load() which does the same check, and restructure Load() to have an
early return.
Change-Id: I1d051d10b80aa82bcf590c79169ffe29607b3c13
Reviewed-on: https://pdfium-review.googlesource.com/39970
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Nicolás Peña Moreno <npm@chromium.org>
|
|
Change-Id: I4906351a6e21fb8480670a6daf15bd7cb9e441c5
Reviewed-on: https://pdfium-review.googlesource.com/39911
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Nicolás Peña Moreno <npm@chromium.org>
|
|
Do all the parsing inside the constructor. Make GetVerticalGlyph() and
related getters const methods.
Change-Id: I21118cf98048cb6bbfc0999604d2434d4acafef6
Reviewed-on: https://pdfium-review.googlesource.com/39496
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Nicolás Peña Moreno <npm@chromium.org>
|
|
Given POD members default values, rather than hoping Load() will. Also
reorder members to pack better.
Change-Id: I493db11eb3d115e49f4e914e53a1eb55fa2046f0
Reviewed-on: https://pdfium-review.googlesource.com/39495
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Nicolás Peña Moreno <npm@chromium.org>
|
|
Remove parameters that always refer to the same member variables. Also
mark the input object as const since it is only read from.
Change-Id: I136ece1ce5b0c00b02d1a76e1540ff26e6f01858
Reviewed-on: https://pdfium-review.googlesource.com/39494
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Nicolás Peña Moreno <npm@chromium.org>
|
|
There's a missing const in a qualifier in the third party FT library
header, so rather than casting on every invocation, consolidate these
into our wrapper macro. This may be easier to remove should the API
ever get corrected.
Part of the war on const_cast<>.
Change-Id: I80cdb220730f40297e54aee10acc8bbd2c983b6d
Reviewed-on: https://pdfium-review.googlesource.com/39850
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Instead of passing by non-const reference. Adjust the override in
CPDF_CIDFont and CPDF_CMap::GetNextChar() as well.
Change-Id: I0ee6dc21077101cbeeb0e334498075fc463a2d65
Reviewed-on: https://pdfium-review.googlesource.com/39492
Reviewed-by: Nicolás Peña Moreno <npm@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
It is not used in the CPDF_Font base class.
Change-Id: I6033a5dd422179eb95f19a2f2ecf06d007f3223f
Reviewed-on: https://pdfium-review.googlesource.com/39493
Reviewed-by: Nicolás Peña Moreno <npm@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Callers do not actually need the returned handle.
Change-Id: I1b8c0be00809eb7fdae9f6e95b4b325e75f4b847
Reviewed-on: https://pdfium-review.googlesource.com/39491
Reviewed-by: Nicolás Peña Moreno <npm@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Instead of using an out parameter. Fix nits in the only caller as well.
Change-Id: I04eb92705b2fbda001191c36da972eee499acbc7
Reviewed-on: https://pdfium-review.googlesource.com/39490
Reviewed-by: Nicolás Peña Moreno <npm@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Then we can mark the doc pointer as const because it never changes
again. Also move initialization to headers when possible, add missing
dtors, and fix some nits.
Change-Id: I461affc8dce14d805b935fb4d8b5aaafb058a789
Reviewed-on: https://pdfium-review.googlesource.com/39413
Reviewed-by: Nicolás Peña Moreno <npm@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
These appear in compile-time const data. Adding the comment makes
it easier to see what work remains when using grep.
Change-Id: Ibb5fe920dc9fc99dd4c866f9ddf800a58f6a67a8
Reviewed-on: https://pdfium-review.googlesource.com/36690
Reviewed-by: Lei Zhang <thestig@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>
|
|
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>
|
|
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>
|
|
Change-Id: I5dfadcb68e640235be6e3eb7c8d57ae3b8013d26
Reviewed-on: https://pdfium-review.googlesource.com/35691
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@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>
|
|
This reverts commit 80c6ab7b99bcbd7b940f78dc0cac52c30249f59c.
Reason for revert: (void) idiom is prevalent through out C++ code.
Original change's description:
> Convert (void) to static_cast<void> in C++ code
>
> Converting instances of old C-style void casts to suppress return
> values to use C++ style static cases. There are a few examples of
> (void) that remain, since they are in C code, and the third_party/
> instances are not touched at all.
>
> Change-Id: I72b3fc0e1d713db669b76135e03d1cf87873a2fe
> Reviewed-on: https://pdfium-review.googlesource.com/33790
> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
TBR=thestig@chromium.org,tsepez@chromium.org,dsinclair@chromium.org,hnakashima@chromium.org,rharrison@chromium.org
Change-Id: Ib6cc021c97cb1ea7c71b90346fa9b500659f565d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://pdfium-review.googlesource.com/33890
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Converting instances of old C-style void casts to suppress return
values to use C++ style static cases. There are a few examples of
(void) that remain, since they are in C code, and the third_party/
instances are not touched at all.
Change-Id: I72b3fc0e1d713db669b76135e03d1cf87873a2fe
Reviewed-on: https://pdfium-review.googlesource.com/33790
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
GetObjectFor() and GetDirectObjectFor().
Change-Id: I588cd994dfccf0ffd4c8f91362a4806dc109251e
Reviewed-on: https://pdfium-review.googlesource.com/32991
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
BUG=pdfium:234
Change-Id: I6fde00c976ad4bb9cab632f465cf292f5b1da3d2
Reviewed-on: https://pdfium-review.googlesource.com/32914
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: Id37333ba61ad0d395055acffd75d4d8be5eb2b3e
Reviewed-on: https://pdfium-review.googlesource.com/32911
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
BUG=pdfium:234
Change-Id: Ia3e758bbe5c445c3856f5215e900e02a16b4d7d7
Reviewed-on: https://pdfium-review.googlesource.com/32910
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: Id7bf252ebe25c92d26065d1138a445ebb2f78d0b
Reviewed-on: https://pdfium-review.googlesource.com/32187
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
This CL folds the StartParse() method of CPDF_Form into the
ParserContent method. The no arguments ParseContent is removed and
ParseContentWithParams renamed to ParseContent. The callsites are
updated to pass the nullptr's.
Bug: chromium:813349
Change-Id: I304b77aef1de1b9aa20e4a3044db5023f5701584
Reviewed-on: https://pdfium-review.googlesource.com/32511
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Bug: chromium:831583
Change-Id: Idc980ef47cdd942bddc75d9b7fe4a56bdeacdc1a
Reviewed-on: https://pdfium-review.googlesource.com/30670
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
These were kicked loose when we converted to span<>, and there isn't
any reason to believe that the remaining string is long enough to
complete a multibyte sequence.
Bug: 831100
Change-Id: Iae4363f72b4d7ff088a73994d0fe5dab4077ee9e
Reviewed-on: https://pdfium-review.googlesource.com/30291
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
BUG=chromium:813705
Change-Id: I57265aad11d8f717f6ce33cc09241f4bef6381db
Reviewed-on: https://pdfium-review.googlesource.com/29710
Reviewed-by: Nicolás Peña Moreno <npm@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I92c7ba605bf95a9023ad046b8dddebe0a0592802
Reviewed-on: https://pdfium-review.googlesource.com/29992
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Get bounds checks in parsers automatically when using spans.
Change-Id: I71fbe7b838435d455376db2f89817d807a9cdcfd
Reviewed-on: https://pdfium-review.googlesource.com/29830
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|