Age | Commit message (Collapse) | Author |
|
Callers only ever pass in nullptr for the bitmap parameter.
Change-Id: Iefeb72a1268521a38b3d5ab4b03163b67bf35796
Reviewed-on: https://pdfium-review.googlesource.com/43210
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
BUG=chromium:890322
Change-Id: I11050b84cf440f8d6bb00c661360de4e389dc031
Reviewed-on: https://pdfium-review.googlesource.com/c/43290
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
CPDFXFA_Context should always have a valid doc.
Change-Id: Ifb547281f1e4f2741e2d741438b9a3ece71f9e99
Reviewed-on: https://pdfium-review.googlesource.com/43212
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@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>
|
|
Use std::vector<float> for dash array.
Use compiler-generated default operations.
Squeeze some enums.
Fix obvious logic botch in DashChanged().
Change-Id: If1d809cc46a3cf2db98a09a3f5a49d22138c0640
Reviewed-on: https://pdfium-review.googlesource.com/42613
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
This reverts commit 9d784c291714b703b16185e69860a3797de85b6c.
Reason for revert: Roll into chromium is stuck, this is a potential
culprit.
Original change's description:
> Make potentially dangerous Actions require a user click.
>
> URI and SubmitForm actions are only handled if the event was
> ButtonUp or ButtonDown.
>
> Bug: 851821
> Change-Id: If6eb0ff44f6d62ac6df50b552c0bdc582885ab5d
> Reviewed-on: https://pdfium-review.googlesource.com/42731
> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
> Reviewed-by: Tom Sepez <tsepez@chromium.org>
> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
TBR=tsepez@chromium.org,hnakashima@chromium.org,rharrison@chromium.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: 851821
Change-Id: I6f1bc0a02f65a24fbd49d53526b985f8a4ea0b4f
Reviewed-on: https://pdfium-review.googlesource.com/42990
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Commit d39389f6 changed CPDF_StreamAcc to use MaybeOwned, so now callers
have to destroy it more carefully, so CPDF_StreamAcc does not end up
with a dangling pointer.
BUG=chromium:887626
Change-Id: Id5e7af96aad6270c444485c1574182da5dbd9ebf
Reviewed-on: https://pdfium-review.googlesource.com/42893
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
URI and SubmitForm actions are only handled if the event was
ButtonUp or ButtonDown.
Bug: 851821
Change-Id: If6eb0ff44f6d62ac6df50b552c0bdc582885ab5d
Reviewed-on: https://pdfium-review.googlesource.com/42731
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Also rename it to DoDocSave(), since it is not a public API.
Change-Id: I88992d12d1b7826c621de0b88692ab33f6d83a06
Reviewed-on: https://pdfium-review.googlesource.com/42815
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@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>
|
|
Change-Id: Iba886e51cf34ea01ed0d93afc93c8ec0ffed4f52
Reviewed-on: https://pdfium-review.googlesource.com/42594
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
These methods used to return the size of the buffer to contain the
value to be returned. Now they will return an FPDF_BOOL to make it
consistent with the other mark APIs and more intuitive to
differentiate a success from a failure. The size will be returned
through an out param.
This CL also adds more focused testing for these API methods and
similar ones.
Change-Id: I6f9837f99d955aaba2c49a259ed7805a286e091d
Reviewed-on: https://pdfium-review.googlesource.com/42411
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Bug: pdfium:1150
Change-Id: I7e589fb3d164dfc9b39a7a3f6e782c09331cc32d
Reviewed-on: https://pdfium-review.googlesource.com/42630
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@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>
|
|
FPDFPage_CountObjects() is the straight-forward replacement that has
been available for a year.
Change-Id: I64cd379f81234d8295bfcaf9b6effe3467f100d6
Reviewed-on: https://pdfium-review.googlesource.com/42451
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: Ia457942238ca2a9f48210c080a93412c09ae932c
Reviewed-on: https://pdfium-review.googlesource.com/42570
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Remove more bare |new|s.
Change-Id: Ia26bb8150d5bb0004c6a8e6ff89b4694b9ef2865
Reviewed-on: https://pdfium-review.googlesource.com/42552
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
This reverts commit 725f544776a6ee96a514a91dffd39aa32ecca3e6.
Reason for revert: <INSERT REASONING HERE>
Original change's description:
> Disable FPDFEditEmbeddertest.AddCIDFontText
>
> Bug: pdfium:1151
> Change-Id: Ib8b0f8165389ce1a1aa96652685dab14eac6bdfd
> Reviewed-on: https://pdfium-review.googlesource.com/42412
> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
> Commit-Queue: Tom Sepez <tsepez@chromium.org>
TBR=tsepez@chromium.org,hnakashima@chromium.org,rharrison@chromium.org
Change-Id: I8a27fe9c5d678f6a041542f3be3a3bade857753a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: pdfium:1151
Reviewed-on: https://pdfium-review.googlesource.com/42530
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Because bytestring supports standard iterators.
Change-Id: Iaa33d79dbbf07d660eee1dd95d9f5f15547fb57c
Reviewed-on: https://pdfium-review.googlesource.com/42511
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Removing the FPDF_ prefix also makes it more obvious that this is
not a public/ entry point. No functional changes.
Bug: pdfium:1149
Change-Id: I6d68d7951cbfc65128339e237017e7b4bc965635
Reviewed-on: https://pdfium-review.googlesource.com/42490
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Make sure they can handle obviously bad input. These cases lack test
coverage.
Change-Id: I32d3345faebe566e5346750f622f6be9409f30e4
Reviewed-on: https://pdfium-review.googlesource.com/42450
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Bug: pdfium:1151
Change-Id: Ib8b0f8165389ce1a1aa96652685dab14eac6bdfd
Reviewed-on: https://pdfium-review.googlesource.com/42412
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
When parsing happens in several steps (in pages with > 100 page
objects), the position is reset to 0 and the start pointer is
advanced. This breaks the calculation of which stream an object
belongs to.
Passing in the base pointer separately from the start offset allows
the correct position to be calculated and the correct stream to be
identified.
Change-Id: Ic0d5f59f437609158aa97b3c8a18dbd48cd3b0d4
Reviewed-on: https://pdfium-review.googlesource.com/42270
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Do the same for A85Decode().
Change-Id: Ic6a0e5e8a63defa104e35e97eb9ce4223aac23a7
Reviewed-on: https://pdfium-review.googlesource.com/41851
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I3a09188e5d63906c92718ae7568659d2f3ec75a5
Reviewed-on: https://pdfium-review.googlesource.com/42210
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Change-Id: I2c52828c25b4941669503328517c12a0a1dd770e
Reviewed-on: https://pdfium-review.googlesource.com/41850
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@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>
|
|
Second CL for naming consistency.
Bug: pdfium:1141
Change-Id: Idf0a0da52abd68648ab709997e0523ee3240c247
Reviewed-on: https://pdfium-review.googlesource.com/41531
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: Ib0a2bd21fe4304163cf9c080e07475e7c033c299
Reviewed-on: https://pdfium-review.googlesource.com/41570
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Currently if a text extraction region begins on a non-printing
character then "" will be returned. This is the incorrect behaviour,
instead the call should scan ahead until a printing character is
found and start extracting from there. Also proactively adds a
similar check and scan for the end of the extraction region.
BUG=pdfium:1139
Change-Id: Ia2001ac89740f3d31d2bb69e8000773f8b01091b
Reviewed-on: https://pdfium-review.googlesource.com/41532
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@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>
|
|
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>
|
|
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>
|
|
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>
|
|
Use FPDFDest_GetDestPageIndex() instead.
BUG=pdfium:1041
Change-Id: I8e91ef46456a60ebd873068765b7c3ff1a991fa4
Reviewed-on: https://pdfium-review.googlesource.com/41230
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
In text like document title 0x001B is used as a marker for the
beginning/end of a language metadata section. Currently PDFium does
nothing with this data, but when returning the 'decoded' text it needs
to be stripped out.
The existing code assumed that the two bytes following a marker would
be the data to be removed and did nothing to track if it was in/out of
one of these regions. This led to a situation where it would always
strip the two bytes following the region, since it assumed the end
marker was the beginning of a new region.
This CL corrects the detection and handling of these regions, and adds
a regression test for the reported bug.
BUG=pdfium:182
Change-Id: I92ddba5666274a8986fed03f502a0331f150f7ac
Reviewed-on: https://pdfium-review.googlesource.com/41070
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Make member naming match chromium conventions.
Change-Id: Iaa88d1446d445da3a059a339b35a5ef2152811ff
Reviewed-on: https://pdfium-review.googlesource.com/40952
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Re-arrange order of some variables so that the lifetime
constraints are not violated, even temporarilly.
Change-Id: I859f1217d5af0f4c703a3d8ed742c1f144cc1c61
Reviewed-on: https://pdfium-review.googlesource.com/40950
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Move some initialization/accessors to header while at it.
Remove unused GetRootWnd().
Change-Id: Icd4c77ebad0c1edf8a8443f86581e7724aa1b93b
Reviewed-on: https://pdfium-review.googlesource.com/40670
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@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>
|
|
There's only one caller. Rename to match its new behaviour.
Change-Id: I2d5ac2017316fdf6e9533fe506f2dab14205043a
Reviewed-on: https://pdfium-review.googlesource.com/40410
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: Ide4a972337afaf346e46edc4ede48140cd4544c1
Reviewed-on: https://pdfium-review.googlesource.com/40390
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>
|
|
Change-Id: I13f53f581487f643acf160f53d02e9af7d54cfd1
Reviewed-on: https://pdfium-review.googlesource.com/40151
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I64b34da202a0f1c30a38cba2f24490aad4063828
Reviewed-on: https://pdfium-review.googlesource.com/40150
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This is similar to FPDFText_GetMatrix() (wrapping
CPDF_TextObject::GetTextMatrix()) and FPDFPath_GetMatrix() (wrapping
CPDF_PathObject::m_Matrix), but wraps the matrix of form objects:
CPDF_FormObject::form_matrix().
Change-Id: Ic4ce7ad8050012f54de356bb936263d3e4f097ca
Reviewed-on: https://pdfium-review.googlesource.com/39930
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|