Age | Commit message (Collapse) | Author |
|
This converts the existing class naming and references. The ::Entry
struct is converted to ::Property. The GetBy* methods are renamed to
GetPropertyBy*.
Free functions from other parts of the CSS code base are merged into
the class. GetCSSPropertyValueByName becomes ::GetPropertyValueByName
with a return value of ::PropertyValue*. GetCSSLengthUnitByName
becomes ::GetLengthUnitByName with a return value of
::LengthUnit*. GetCSSColorByName becomes ::GetColorByName with a
return value of ::Color*.
BUG=pdfium:998
Change-Id: I5b78c69d0fe53ad714ac3545cfdda8c26b95e4d5
Reviewed-on: https://pdfium-review.googlesource.com/25010
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
FPDFDest_GetDestPageIndex() has a well defined return value for
errors (-1). Keeping FPDFDest_GetPageIndex() to avoid changing
behavior of the old API for whoever relies on it.
Bug: pdfium:938
Change-Id: Iad528923cb156e957a419540c262a65f45cb777d
Reviewed-on: https://pdfium-review.googlesource.com/24811
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
BUG=pdfium:798
Change-Id: I9f0cc6fa095f111d6c43034b55f5e12e2bcab059
Reviewed-on: https://pdfium-review.googlesource.com/24716
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
BUG=pdfium:798
Change-Id: I97d0dc566f95736ef12eda90ee0bf336cba42098
Reviewed-on: https://pdfium-review.googlesource.com/24715
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
BUG=pdfium:798
Change-Id: I1e50aeffa439063bc9eb2640af457e33c4e3c46c
Reviewed-on: https://pdfium-review.googlesource.com/24713
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Reorganizes the free functions to be static methods on a
class. Converts the Table struct to be an Entry struct defined in the
class.
Change-Id: I9eca0dfb15187af10cbe2dc4b4c2756d55d957be
Reviewed-on: https://pdfium-review.googlesource.com/24712
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Bug: 806612
Change-Id: I22bd9046dd37a1b596762c46a6b29a323d6e9fa1
Reviewed-on: https://pdfium-review.googlesource.com/24410
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
|
|
This cleans up the entries in the table to no longer have a marker for
size, and also removes a hand rolled search. This prevents an out of
bounds issue that had been reported and addresses another potential
out of bounds issue.
BUG=chromium:807214
Change-Id: I3d3ab5a3a174dd4dcec56fa7ee7a0e6c2805bfaa
Reviewed-on: https://pdfium-review.googlesource.com/24690
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Bug: chromium:797726
Change-Id: Ib13d5a4a78de462f1257f1103728f2a4111cb916
Reviewed-on: https://pdfium-review.googlesource.com/24510
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Change-Id: I064ddcad8671b9ade2c02142a6c2c2983846e3a9
Reviewed-on: https://pdfium-review.googlesource.com/24650
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
BUG=chromium:805881
Change-Id: I5f920649f425d0cfc47c780b36ed70f23cbe1299
Reviewed-on: https://pdfium-review.googlesource.com/24191
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Fix some nits as well.
Change-Id: Ia52f4550c39d8072004679d764243ca9a9f7db0d
Reviewed-on: https://pdfium-review.googlesource.com/24190
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This reverts commit 77d8ed02c7e97471ceccee5abbabeb2fdea413c7.
Reason for revert: <INSERT REASONING HERE>
Original change's description:
> Revert "Use UnownedPtr instead of T* in MaybeOwned."
>
> This reverts commit e563e8352139e4852a955e319023b09f2844aee9.
>
> Reason for revert: <INSERT REASONING HERE>
>
> Original change's description:
> > Use UnownedPtr instead of T* in MaybeOwned.
> >
> > Always check the liftime in the unowned case. Doing so unearthed
> > the following issues:
> >
> > Transient lifetime issue in jbig2_image when doing realloc().
> > Stale (but unused) dictionary pointer in CPDF_Image.
> > Destruction order in error branch in cpdf_dibsource.cpp
> >
> > Change-Id: I12b758aafeefedc7abe1e8b21a18db959929e95f
> > Reviewed-on: https://pdfium-review.googlesource.com/24552
> > Commit-Queue: Tom Sepez <tsepez@chromium.org>
> > Reviewed-by: dsinclair <dsinclair@chromium.org>
>
> TBR=thestig@chromium.org,tsepez@chromium.org,dsinclair@chromium.org
>
> Change-Id: I3c56ee6ab502da90e3adb7507dbc8cc92f090140
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://pdfium-review.googlesource.com/24670
> Reviewed-by: Tom Sepez <tsepez@chromium.org>
> Commit-Queue: Tom Sepez <tsepez@chromium.org>
TBR=thestig@chromium.org,tsepez@chromium.org,dsinclair@chromium.org
Change-Id: I0ccbbeab8be6cadc9b3a5bfefe2aca733654342f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://pdfium-review.googlesource.com/24671
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
This reverts commit e563e8352139e4852a955e319023b09f2844aee9.
Reason for revert: <INSERT REASONING HERE>
Original change's description:
> Use UnownedPtr instead of T* in MaybeOwned.
>
> Always check the liftime in the unowned case. Doing so unearthed
> the following issues:
>
> Transient lifetime issue in jbig2_image when doing realloc().
> Stale (but unused) dictionary pointer in CPDF_Image.
> Destruction order in error branch in cpdf_dibsource.cpp
>
> Change-Id: I12b758aafeefedc7abe1e8b21a18db959929e95f
> Reviewed-on: https://pdfium-review.googlesource.com/24552
> Commit-Queue: Tom Sepez <tsepez@chromium.org>
> Reviewed-by: dsinclair <dsinclair@chromium.org>
TBR=thestig@chromium.org,tsepez@chromium.org,dsinclair@chromium.org
Change-Id: I3c56ee6ab502da90e3adb7507dbc8cc92f090140
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://pdfium-review.googlesource.com/24670
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Always check the liftime in the unowned case. Doing so unearthed
the following issues:
Transient lifetime issue in jbig2_image when doing realloc().
Stale (but unused) dictionary pointer in CPDF_Image.
Destruction order in error branch in cpdf_dibsource.cpp
Change-Id: I12b758aafeefedc7abe1e8b21a18db959929e95f
Reviewed-on: https://pdfium-review.googlesource.com/24552
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
BUG=chromium:805881
Change-Id: I5ff76067fb26198df13482e6c475138142b3f6c5
Reviewed-on: https://pdfium-review.googlesource.com/24192
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
The CPWL_EditImpl::Backspace() instance occurred in commit 671a799. The
other two instances where known cases.
BUG=chromium:805881
Change-Id: Iae7cb8534e85342069d8753ced88543dad751e92
Reviewed-on: https://pdfium-review.googlesource.com/24050
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
BUG=chromium:805881
Change-Id: I3b4914325833c859285a4af1f6e326872cbf1b18
Reviewed-on: https://pdfium-review.googlesource.com/24091
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Introduced here
https://pdfium-review.googlesource.com/#/c/17950/5/core/fpdftext/cpdf_textpage.cpp@1237
BUG=chromium:805881
Change-Id: I0c9109f3eebec968360734ff4d9d0542881d6823
Reviewed-on: https://pdfium-review.googlesource.com/24210
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This has existed since the initial PDFium check in.
BUG=chromium:805881
Change-Id: I34b79d61c753d15d0f112c12f3dee43973403673
Reviewed-on: https://pdfium-review.googlesource.com/24090
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I4ec48652d41cea9a79b6711c08484965ceea7587
Reviewed-on: https://pdfium-review.googlesource.com/24130
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Bug: chromium:804155
Change-Id: Ie70e93116696e3c4db987a10b8fc31b1af8aea70
Reviewed-on: https://pdfium-review.googlesource.com/23990
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Avoid passing by non-const ref.
Change-Id: I05bfdd918b334d775c5ce50eebb8328630626896
Reviewed-on: https://pdfium-review.googlesource.com/24170
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Change-Id: I063690047274372b449726cd5d2c479bad0672f4
Reviewed-on: https://pdfium-review.googlesource.com/24150
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
BUG=chromium:805881
Change-Id: I91266367296218998d011dd5f62e0b4c6df291a3
Reviewed-on: https://pdfium-review.googlesource.com/24070
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Change-Id: Ieb6a4dab00a784dd8d085100e07c935094d72b08
Reviewed-on: https://pdfium-review.googlesource.com/24011
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
This makes things more self-contained since we don't need the define in
the BUILD.gn file.
Change-Id: I27138f409521751f4994e6e9dc3c1a029e679836
Reviewed-on: https://pdfium-review.googlesource.com/23550
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: Ib4c6589a63761e8993e8cd33ed9459ba3d1e206c
Reviewed-on: https://pdfium-review.googlesource.com/23911
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Bug: pdfium:987
Change-Id: Ieee2850ceec12d6fff3ba6e0fb5a775e62c5c76e
Reviewed-on: https://pdfium-review.googlesource.com/23230
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Nicolás Peña Moreno <npm@chromium.org>
|
|
The guard being removed was moved lower down in the code, but it
appears the original creeped back in while I was rebasing at some
point. This is causing clusterfuzz failures.
BUG=chromium:803732,chromium:803735
Change-Id: I5bcc6046e64d6060a674f390e243dd8eda9d1d17
Reviewed-on: https://pdfium-review.googlesource.com/23250
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
The translations were in the opposite order they should be.
First the specified (x, y) coord needs to be translated to the
origin, then rotation should be applied, then the translation should
be reversed. To translate (x, y) to the origin, the initial
translation should be Tx = -x, Ty = -y.
Bug: pdfium:987
Change-Id: I7f873c6a20858bf7fd03e5fdb49020b196b44a1d
Reviewed-on: https://pdfium-review.googlesource.com/23210
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Nicolás Peña Moreno <npm@chromium.org>
Reviewed-by: Shirleen Lou <xlou@chromium.org>
|
|
WriteColorResult(), which calls NeedAlpha(), runs on a per-pixel basis
in CFX_ImageTransformer. NeedAlpha() repeats some conditional
calculations. Remove that for a slight speed-up.
Change-Id: I0bb3f92001b9ccdb65c4d59c9f832fe9edfa71f4
Reviewed-on: https://pdfium-review.googlesource.com/23175
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This completes jumbo build support for non-XFA builds.
BUG=pdfium:964
Change-Id: Ife4ed23f9b438623581a863685014e64a06cf0d8
Reviewed-on: https://pdfium-review.googlesource.com/22775
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
BUG=chromium:802983
Change-Id: I866ece9c370bf05571b76b50ad23598f5038332b
Reviewed-on: https://pdfium-review.googlesource.com/23151
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: Ifabaf71bb45ffa7e9af7da4acb21d8757e9596ce
Reviewed-on: https://pdfium-review.googlesource.com/23150
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I0a07dbc9850bef2184ed35ff04b08385fc1bdd17
Reviewed-on: https://pdfium-review.googlesource.com/22891
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Refactoring the big image format switch in ContinueDecode to call
separate methods for each image format, instead of having one giant
switch block. This should have no functional changes.
BUG=pdfium:976
Change-Id: Ide4892526ee823023c233f0e43b1c98ac8bd1477
Reviewed-on: https://pdfium-review.googlesource.com/23134
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Refactoring the big image format switch in StartDecode to call
separate methods for each image format, instead of having one giant
switch block. This should have no functional changes.
BUG=pdfium:976
Change-Id: I4e609ecaec0c5d0e173957c0795555b37c38f9a2
Reviewed-on: https://pdfium-review.googlesource.com/23131
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Refactoring the big image format switch in DetectImageType to call
separate methods for each image format, instead of having one giant
switch block. This should have no functional changes.
BUG=pdfium:976
Change-Id: I52cc83879da20b33d471420016f6b1eb53993f0b
Reviewed-on: https://pdfium-review.googlesource.com/23130
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
By catching this early we are now actually returning the wrong
value. The bad value should be passed into the jpeg library code,
which will cause a fatal error and jump out to the common error
handling code for this method.
BUG=pdfium:986
Change-Id: Ib3d32939aa38aece887c014c3a477407ee178193
Reviewed-on: https://pdfium-review.googlesource.com/23119
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This moves the setjmps needed for handling fatal errors in the jpeg
library up a level to be in line with how other instances of this are
being modified. This additionally reduces the number of times that
setjmp needs to be called and documents why it is occurring.
This covers the Start and ReadScanLine methods. It also adds in
setting the error member, which had been missed in previous CLs.
BUG=pdfium:986
Change-Id: I7db87288ffe0ee8b29899d97035c30ad812da76a
Reviewed-on: https://pdfium-review.googlesource.com/23117
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
This move the setjmp needed for handling fatal errors in the jpeg
library up a level to be in line with how other instances of this are
being modified. This additionally reduces the number of times that
setjmp needs to be called and documents why it is occuring.
BUG=pdfium:986
Change-Id: Ia57821e1ce65aae811618effb3f2fa6256e1ab8c
Reviewed-on: https://pdfium-review.googlesource.com/23115
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
This functional part of this CL is mostly a revert of
"Change behaviour of FPDF_RenderPageBitmapWithMatrix"
24b0733a72bbc4013bff8628f198b0aea807aa06
Besides the revert, the parameters passed to
pPage->GetDisplayMatrix() are changed to fix a bug with the previous
implementation: the page was scaled to fit inside the clipping_rect,
instead of clipped.
Bug: pdfium:849
Change-Id: I95d0a303a979c998026a3bd6963c8684a1209f03
Reviewed-on: https://pdfium-review.googlesource.com/22931
Reviewed-by: Nicolás Peña Moreno <npm@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
The current implementation treats both returning false and longjmp'ing
out of jpeg_start_decompress as indicating that the decompression has
paused and needs more data. This is incorrect, in reality only the
false return value indicates this. The longjmp path indicates a fatal
error in the processing of the jpeg. The default implementation
actually calls exit() in this case, and the documentation explicitly
calls out that in this case recovery isn't possible and the decode
process will have to start from scratch.
This resolves a situation where the progressive decoder would get a
malformed jpeg and keep on grabbing blocks from it and try to start
decoding it. This would eventually fail when it ran out of data to
read, but would cause a large memory leak and a crash on the MSAN
fuzzers.
BUG=pdfium:986,chromium:798665
Change-Id: Ifd2ed7a2dc46fa20bab34e9c461a8d4c4718c4d7
Reviewed-on: https://pdfium-review.googlesource.com/23072
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Change-Id: I46eb5789b303040f4e62d39882f32537f637e01a
Reviewed-on: https://pdfium-review.googlesource.com/22970
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
This adds to form field types specific types for XFA form fields to be
used instead of the generic XFA value when possible.
BUG=pdfium:952,chromium:763129,chromium:592758
Change-Id: I8d1cff6a280d71db348b7c31a251cbe2e398ec79
Reviewed-on: https://pdfium-review.googlesource.com/22677
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
This reverts commit dca380ffe0571be4023b11b06b8aecad9934bb06.
Reason for revert: Causes missing text in a user's PDF
Original change's description:
> Check for success of decodes to avoid infinite loops
>
> Bug: 790693
> Change-Id: I9b1d87e024229d8b01f55ec554e2cc544db6ac06
> Reviewed-on: https://pdfium-review.googlesource.com/20230
> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
> Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
TBR=npm@chromium.org,hnakashima@chromium.org,rharrison@chromium.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: 790693
Change-Id: I886b14e120c34da757a96f8a1f9c6a081d8326b6
Reviewed-on: https://pdfium-review.googlesource.com/22950
Reviewed-by: Nicolás Peña Moreno <npm@chromium.org>
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
|
|
RetainPtr operations are not trivial.
Change-Id: Ic106ada69d1c023a8132a2a59db17d550fd81fa0
Reviewed-on: https://pdfium-review.googlesource.com/22911
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Within PDFium use enum class for better type safety when working with
form field types. These values will still be converted to ints as part
of the public API, since that is the existing API.
This work is preperation for extending the number of form field types
to have more specific entries for XFA.
BUG=pdfium:952,chromium:763129,chromium:592758
Change-Id: Ie6c29f02ae22be782ff36eb87d27f1a4bf2c099e
Reviewed-on: https://pdfium-review.googlesource.com/22742
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
TBR=hnakashima@chromium.org
Change-Id: I50877f5a2ff3fb6f48630019d2481aa451945118
Reviewed-on: https://pdfium-review.googlesource.com/22774
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|