Age | Commit message (Collapse) | Author |
|
Change-Id: I1104d5c3c63dbf9f2f286797db842d30c75e2718
Reviewed-on: https://pdfium-review.googlesource.com/c/44077
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Move foo_embeddertest.cpp to the same BUILD.gn file as foo.cpp.
Set up dependencies to make pdfium_embeddertests pass gn check.
Change-Id: If1fe67c261960c35c344c1047950cd7fdb32c4a1
Reviewed-on: https://pdfium-review.googlesource.com/c/43997
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Use allow_circular_includes_from as a crutch for now.
Change-Id: Ia7a29a268e67b1fe21bed5cdd629e06fb5cc7bfb
Reviewed-on: https://pdfium-review.googlesource.com/c/43992
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@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>
|
|
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>
|
|
Make them compatible with pdfium::CollectionSize().
Change-Id: Ibef3b182e35a7eca7c656cf590462782de0cc157
Reviewed-on: https://pdfium-review.googlesource.com/c/43937
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>
|
|
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>
|
|
Instead, add GetTransformedBBox() with a required matrix parameter and
use that when the there is a matrix.
Change-Id: I594f3eb6bc7e1bc3eb6aa9f66556ebb1dfdbebe1
Reviewed-on: https://pdfium-review.googlesource.com/c/43553
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Eliminate the possibility of nullptr.
Change-Id: I16c3e442d78e5151330db7227bd1c1630af3d4a3
Reviewed-on: https://pdfium-review.googlesource.com/c/43531
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Remove the member and simplify logic in all the places this
is passed.
Change-Id: I39b979793fe84f0dc460261223655dd7f50555cc
Reviewed-on: https://pdfium-review.googlesource.com/c/43474
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Use std::unique_ptr and MaybeOwned, instead of manual memory management.
Change-Id: I5f08abd869245fb55b7e868621369ff3ea34146f
Reviewed-on: https://pdfium-review.googlesource.com/43211
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
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>
|
|
Change-Id: If13cc70d3d047f255f5d289f35a8533811523146
Reviewed-on: https://pdfium-review.googlesource.com/43110
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
This reverts commit 214982c4d02a720c3b1b3de121cddc62189b8848.
Reason for revert: Turns out it is reachable.
Original change's description:
> Remove unreachable code in CPDF_DIBBase.
>
> The colorspace is always available when creating image decoders that use
> colorspaces.
>
> Change-Id: I20ac75edcd614ccc1e83de262c128776e9d03eed
> Reviewed-on: https://pdfium-review.googlesource.com/42872
> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
TBR=thestig@chromium.org,rharrison@chromium.org
BUG=chromium:888743
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: I45903543f0e4bf2785660fb8c1e45c34febb6ecf
Reviewed-on: https://pdfium-review.googlesource.com/43050
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: Ifcce7b1e513c8859752d5248ae686bbe5349e342
Reviewed-on: https://pdfium-review.googlesource.com/42614
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
The colorspace is always available when creating image decoders that use
colorspaces.
Change-Id: I20ac75edcd614ccc1e83de262c128776e9d03eed
Reviewed-on: https://pdfium-review.googlesource.com/42872
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Change-Id: Ia5f72e6397ee959d897a945c4069f47c494b5511
Reviewed-on: https://pdfium-review.googlesource.com/42870
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@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>
|
|
Also add a GetRenderOptions() helper method.
Change-Id: I47db7a21f55f396e08775575f6b2a48e440c2f91
Reviewed-on: https://pdfium-review.googlesource.com/42750
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Change-Id: Iee7ce04630fed86f651cd382a19e46b2f7ab6d61
Reviewed-on: https://pdfium-review.googlesource.com/42672
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I6761a5f7fc099807c09abacdccbb72d282252551
Reviewed-on: https://pdfium-review.googlesource.com/42604
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Make it a private method, and add public methods so only limited
combinations of LoadAllData() arguments are possible.
Change-Id: I8c2220eb0e95012350858876586f7c470c40a7c3
Reviewed-on: https://pdfium-review.googlesource.com/42590
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I3b6a386cf376a418ad64514313c791437ea54cf6
Reviewed-on: https://pdfium-review.googlesource.com/41610
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
The bug also requires end circle to be tiny (radius of < 0.01).
Bug: pdfium:1140
Change-Id: I2b355f44f0383334b8988fe41f82cb3f587e9909
Reviewed-on: https://pdfium-review.googlesource.com/41672
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Radial shading is done between two circles with their own centers and
radii. When one has a radius of 0 and is located on or very close to
the border of the other circle, a should be 0, but is not due to
rounding errors unless the circles are aligned in x or y.
Bug: pdfium:1140
Change-Id: Ief2efa91f3f16f7bed439aa471b258fa4d680acf
Reviewed-on: https://pdfium-review.googlesource.com/41590
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@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>
|
|
Change-Id: Ie344bb37abf7dde158d03cc2897dca3588f1a5e3
Reviewed-on: https://pdfium-review.googlesource.com/41550
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Also rename .cpp file to match class name and .h file.
Modify some helper functions to operate on spans.
Move some initializations to member declarations.
Change-Id: Ie0889bda91daaef80fae6f5681f8ce068e92453b
Reviewed-on: https://pdfium-review.googlesource.com/41534
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I3dc2dd54d89858722c2aea4b9e694308796b8274
Reviewed-on: https://pdfium-review.googlesource.com/41510
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>
|
|
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>
|
|
- 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>
|
|
This immediately flags a case where a pointer from a heap object to
a caller's stack object is persisted past the caller's lifetime. Fix
it the simplest way via AutoRestorer<> so we'll get a nice safe segv
should it be used.
Change-Id: I554304b235e73c279fa0cd79c9e3ee0138be45f9
Reviewed-on: https://pdfium-review.googlesource.com/40592
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Two variants make the intention much clearer.
Change-Id: Ied0d8e6fa8c5524c19cafe8036d7c1b470fda86d
Reviewed-on: https://pdfium-review.googlesource.com/40352
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I6a2bd03e00ad4e3d57f6931c0c6cf4ae0c760afb
Reviewed-on: https://pdfium-review.googlesource.com/40290
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Move mandatory arguments to ctor.
Replace long list of positional parameters with setter methods.
Make Initialize() return void since it can't fail.
Change-Id: I490118923855158891cf45eecd5de1e922a3a1fe
Reviewed-on: https://pdfium-review.googlesource.com/40170
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@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>
|
|
Bring in line with standards.
Remove argument entirely for mac code that is always nullptr.
Change-Id: I0710bdbd51fc0bc2e1d428ef44976be39a631147
Reviewed-on: https://pdfium-review.googlesource.com/40091
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Introduce const/non-const versions of method where required.
Part of the war on const_cast<>. Tidy one expression to use []
instead of .data().
Change-Id: I41e45669c79eee242ff2244c7dc3afcf6386a433
Reviewed-on: https://pdfium-review.googlesource.com/39852
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Remove a bunch of const_cast<uint8_t*> or equivalent. This will also
help when we convert to span<>, since casting spans is a nuisance.
Change-Id: I330e5041cbaf33a84425fc4242a3dfacf5ca8011
Reviewed-on: https://pdfium-review.googlesource.com/39831
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@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>
|
|
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>
|
|
BUG=chromium:668762
Change-Id: Iaf3fc9bcf68b8da2c947bbd78c5d72f78195b621
Reviewed-on: https://pdfium-review.googlesource.com/35991
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
In CPDF_ScaledRenderBuffer::Initialize(), use the existing
CFX_DIBitmap::CalculatePitchAndSize() function to figure out the pitch
and size. Unlike the existing code, CalculatePitchAndSize() does a
better job of checking for integer overflows.
BUG=pdfium:1123
Change-Id: Ic8fe7226bc56fed0456486d88e02a7af2928bc94
Reviewed-on: https://pdfium-review.googlesource.com/38010
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I6fa3fd93638bc3aeaaef854676fe31476888433b
Reviewed-on: https://pdfium-review.googlesource.com/37671
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This CL allows Apple to use m_GlyphIndex as a replacement for m_ExtGID
when it is invalid.
Bug: pdfium:1121
Change-Id: I49e7936201815bae5a2c8a26680fc1e542a60c43
Reviewed-on: https://pdfium-review.googlesource.com/37390
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
|
|
Bug: chromium:845800
Change-Id: Ib878dd991e435a76b63b662ef3d9d33c2cc61a19
Reviewed-on: https://pdfium-review.googlesource.com/37191
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
This is called by many client to make sure CountItems() does not
crash. Moving the check to CountItems() makes HasRef() unnecessary.
Bug: pdfium:1037
Change-Id: I4f21f33a88c9aad54f0dae18a38b370c6ceaec80
Reviewed-on: https://pdfium-review.googlesource.com/37133
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|