Age | Commit message (Collapse) | Author |
|
BUG=pdfium:681
Change-Id: I5073d80d9bd623b73e578d5ba2226c39c371bab0
Reviewed-on: https://pdfium-review.googlesource.com/3097
Commit-Queue: Chris Palmer <palmer@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I85ea9529f4188bf818ee96c37944e4546411f79c
Reviewed-on: https://pdfium-review.googlesource.com/3211
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
CloneNonCycle() tries to detect cyclic object references without copying
them. There are two issues:
-- for elements in an array or a dictionary, they should be able to
refer to the same object, which are not cyclic;
-- for cyclic referenced elements in an array or a dictionary, do not
clone the element at all. Having nullptr or <key, nullptr> as an element,
like we did before, might cause crash when the element being accessed.
BUG=chromium:701860
Change-Id: Id0304accde76ed06fa5ce640994c7628359600fb
Reviewed-on: https://pdfium-review.googlesource.com/3156
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This reverts commit 55d1d0191ea8316df32858d8cc62fb7c620e8613.
Reason for revert: Slowing down corpus tests by a lot on Mac/Win
Original change's description:
> Remove CFX_FixedBufGrow
>
> This Cl replaces the CFX_FixedBufGrow class with std::vector.
>
> Change-Id: I85c85b7a8de4794840b561e09841bb464cfa9dfe
> Reviewed-on: https://pdfium-review.googlesource.com/3138
> Reviewed-by: Tom Sepez <tsepez@chromium.org>
> Commit-Queue: dsinclair <dsinclair@chromium.org>
>
TBR=tsepez@chromium.org,dsinclair@chromium.org,pdfium-reviews@googlegroups.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: Iaee27570f140b2033b5d8fb8f3077fc839558d64
Reviewed-on: https://pdfium-review.googlesource.com/3158
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
Change-Id: I909deca1d0bfc6de5ac0fd2e6956f9b918caf17a
Reviewed-on: https://pdfium-review.googlesource.com/3157
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
If ParseIndirectObjectAt fails, the replaced object will be null. So we can't
ASSERT the output of ValidatePage. CL introducing the ASSERT:
https://codereview.chromium.org/2483633002/
BUG=chromium:702897
Change-Id: Ib6e8c0bccaf2c05893f0abef27d431e112064865
Reviewed-on: https://pdfium-review.googlesource.com/3146
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
This Cl replaces the CFX_FixedBufGrow class with std::vector.
Change-Id: I85c85b7a8de4794840b561e09841bb464cfa9dfe
Reviewed-on: https://pdfium-review.googlesource.com/3138
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This Cl moves the Matrix and Vector code which is only used by the
colorspace code into the colorspace cpp file.
Change-Id: Ie37bcee0978278a56d345e63704494b5b67e5b24
Reviewed-on: https://pdfium-review.googlesource.com/3137
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL replaces the FileSizeListArray code with a std::map.
Change-Id: Ic158ad95e7055693168d186ba428806a59b04c95
Reviewed-on: https://pdfium-review.googlesource.com/3136
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
If the Kids array for the Pages dictionary does not exist, just treat this
dictionary as the unique page in the document.
BUG=chromium:702883
Change-Id: I9cb9645a53d60306ffe563f9b27cbbd37442f4ec
Reviewed-on: https://pdfium-review.googlesource.com/3135
Commit-Queue: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
BUG=pdfium:667
Change-Id: I6e7620948086f3f620e4cde778a4144570e1bd6d
Reviewed-on: https://pdfium-review.googlesource.com/3106
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
Ue it to fix a typo as well.
BUG=pdfium:634
Change-Id: I2d686242ffb841aedc2fae6a3cf7a00bea667404
Reviewed-on: https://pdfium-review.googlesource.com/3113
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I2e1bc6cd8ba45fef2bde55bcc3f0c19947d46ed5
Reviewed-on: https://pdfium-review.googlesource.com/3111
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
The spec says the N dictionary field is required and must be set to
a valid value. Adjust the code based on this assertion.
BUG=pdfium:675,chromium:691967,chromium:702238
Change-Id: Iaa76fa0e16ce4aaa9822ad471668cbf8af5fb7cb
Reviewed-on: https://pdfium-review.googlesource.com/3112
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
There exists PDFs with many redundant path points, and keeping track of
them all uses a lot of memory.
BUG=chromium:679353
Change-Id: I514610cbba181658b6396e30f5bf58a3661359f5
Reviewed-on: https://pdfium-review.googlesource.com/3110
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I959dbfebdc7a5a1ec9b201a80ff6cfdc031572b0
Reviewed-on: https://pdfium-review.googlesource.com/2833
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: Icfeb3a6dce20e8c2b619aaff1e19cde56347cb52
Reviewed-on: https://pdfium-review.googlesource.com/3011
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
Change-Id: I2e4eba78c5764de108c203b0e0efcd4e81b7bab2
Reviewed-on: https://pdfium-review.googlesource.com/3068
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
If the PDF declares it has a gazillion pages when it does not, we just start
traversing again from the start. This CL fixes that.
BUG=chromium:680222
Change-Id: Ie9b55abc0aaa372429b3d995a7e1e7ab58fb7965
Reviewed-on: https://pdfium-review.googlesource.com/3060
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I1e30d68dae3bf70cf3c426f6126d593b7f1c3ba4
Reviewed-on: https://pdfium-review.googlesource.com/2991
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
Change-Id: I229a3108a787725bbf2f000c39ee19d0680e9150
Reviewed-on: https://pdfium-review.googlesource.com/2968
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: Ie69dfc32e7b526eca2ac6ae621eed879ad98476e
Reviewed-on: https://pdfium-review.googlesource.com/3054
Commit-Queue: dsinclair <dsinclair@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Avoid writing |Type| in CollectionSize<Type>() so that index
type can change without rewriting conditions.
Change-Id: I40c94ca39148b379908760ba9b861114b88af7bb
Reviewed-on: https://pdfium-review.googlesource.com/3056
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
The CIDs are unsigned integers. Avoid overflow since they are given as input
from the PDF file.
BUG=chromium:700787
Change-Id: Icdc3efbbd0f4f2ad8d5b4f4f52926e20f7e06391
Reviewed-on: https://pdfium-review.googlesource.com/3052
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
Currently m_Pos is a FX_POSITION. The value stored into the void* is
typically a uint32_t. We sometimes read that uint32_t value as a size_t
to compare against vector lengths. This Cl converts all usages to be
uint32_t and uses pdfium::CollectionSize to get the correct typed vector
size.
Change-Id: I5f452817ab6049e03477945e4622c6911c89f877
Reviewed-on: https://pdfium-review.googlesource.com/3032
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I158b7d80b0ec28b742a9f2d5a96f3dde7fb3ab56
Reviewed-on: https://pdfium-review.googlesource.com/3031
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
Change-Id: I96e0a20d66b9184d22f64d8e4ce0dadd5a78c1e8
Reviewed-on: https://pdfium-review.googlesource.com/2967
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I9dc32342e24361389841ecba83081a97fc043377
Reviewed-on: https://pdfium-review.googlesource.com/2959
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
The cbox values are long. We should make sure they are not too big before
putting them into FX_RECT, which holds integers. The bound is chosen to also
avoid overflow when multiplying by 1000.
BUG=chromium:699961
Change-Id: Ie4443848e0319348110f7215bd1c909ef19dad9f
Reviewed-on: https://pdfium-review.googlesource.com/2956
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
PDF spec, section 'DeviceCMYK Color Space' states that:
'Each component is specified by a number in the range 0.0 to 1.0'
BUG=chromium:699459
Change-Id: Ie476bbe8740c7b1b33c80be3e3dc4207df5e6e28
Reviewed-on: https://pdfium-review.googlesource.com/2954
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Not cloning is causing issues when printing to XPS printer. I have no idea why.
CL being reverted: https://codereview.chromium.org/2518063005/
BUG=698350
Change-Id: I7c814c712f9959d10d0b6502a28e15ecd752f94a
Reviewed-on: https://pdfium-review.googlesource.com/2930
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
BUG=chromium:690501
Change-Id: I74b09d90a8082554a67f737eb6adc3bff82ed93e
Reviewed-on: https://pdfium-review.googlesource.com/2889
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I6f9fd67cdac581e8f91f829a5934b763bb229d21
Reviewed-on: https://pdfium-review.googlesource.com/2838
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Found by Coverity when scanning the bundled pdfium-3004 in LibreOffice.
This fixes:
- CID 1400335: Uninitialized members (UNINIT_CTOR)
CPDF_DataAvail::m_dwTrailerOffset
- CID 1400334: Uninitialized members (UNINIT_CTOR)
CXML_Element::m_pParent
Change-Id: I42da9a704ad75adf39c510c6ef89eb7a97860ea1
Reviewed-on: https://pdfium-review.googlesource.com/2670
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Moved all the flags to CFX_Font. Explicitly stated which ones are valued
according to the PDF spec to avoid their values being changed.
Change-Id: Ib57593234a4b9b83ef1ad593d0396c64159f303f
Reviewed-on: https://pdfium-review.googlesource.com/2837
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
BUG=chromium:694147
Change-Id: I388cb1d117318edb0339f5c7ee1d2b072f0fb741
Reviewed-on: https://pdfium-review.googlesource.com/2832
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This Cl converts remaining calls to TransformPoint to use Transform instead.
Change-Id: I7a2c000492da5dda3975b4449812f281816fdab6
Reviewed-on: https://pdfium-review.googlesource.com/2822
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This Cl converts the PointX,PointY pairs into a CFX_PointF.
Change-Id: I46897832077c317a5bffb4e568550705decbc40c
Reviewed-on: https://pdfium-review.googlesource.com/2821
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
This Cl converts the AllStates to use CFX_PointF and changes the advance code
to return a CFX_PointF instead of accepting two out floats.
Change-Id: Idb5e295b92e8a16ead535773de066f4b7ea2bdd9
Reviewed-on: https://pdfium-review.googlesource.com/2813
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
The ConvertTextSpace method was called once, and it was the only caller of
ConvertUserSpace. Fold both methods back into the callsite and convert the
use of TransformPoint to Transform.
Change-Id: Ia09ec8846c28603df0616135ba1519dbbba219c3
Reviewed-on: https://pdfium-review.googlesource.com/2810
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
This Cl converts several uses of TransformPoint to use Transform(CFX_PointF).
Change-Id: I9bc3c484e0a4304b904584218bd9e59dec7db727
Reviewed-on: https://pdfium-review.googlesource.com/2791
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
Keep a vector of object superseeded by another object. These will
no longer be returned from the holder, but it will clean them
Change-Id: If9754ff6614bd79e9de6ce8c3492230435813218
Reviewed-on: https://pdfium-review.googlesource.com/2790
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
This converts the two Origin{X,Y} points in fx_font to CFX_Point{F} points.
Change-Id: Id7cbb34a6e76043f1b26e9d7091d89f300dfc563
Reviewed-on: https://pdfium-review.googlesource.com/2720
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL updates the Origin x,y coordinates in FXTEXT_CHARPOS to be an
CFX_PointF.
Change-Id: I67281db2cb82687e12490145f7c99aee908e5fa8
Reviewed-on: https://pdfium-review.googlesource.com/2718
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
This CL converts the OriginX and OriginY from CPDF_TextObjectItem to use a
CFX_PointF instead of two floats.
Change-Id: Id39de18d3d908a86f925bec68d0680392f70906e
Reviewed-on: https://pdfium-review.googlesource.com/2715
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
A new CPDF_PageContentGenerator is created for every call of
FPDFPage_GenerateContent, so having the maps there will cause duplicated
resources to be created every time this method is called. Thus it is better
to move these to the page.
Change-Id: I47804f79790fc5354f8a94b6387d66b65eda5a20
Reviewed-on: https://pdfium-review.googlesource.com/2717
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
This CL replaces the array of path points with a vector. Cleaning up the usage
as required.
Change-Id: Ifa386a2c847005fef68af748ebe99c4e08961238
Reviewed-on: https://pdfium-review.googlesource.com/2710
Reviewed-by: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL fixes up the bits of the CPDF_MeshStream CL that depended on the Origin
CL and integrates the fixes for the Skia bots.
Change-Id: I470e49c35b809f00fecbaeb303de15c0db3fe590
Reviewed-on: https://pdfium-review.googlesource.com/2698
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
BUG=pdfium:667
Change-Id: I701719144127881ebdb5be01a51e833d1e576477
Reviewed-on: https://pdfium-review.googlesource.com/2691
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This reverts commit da83d3a5cc09c4056310b3cf299dbbccd5c70d11.
Reason for revert: Reverting chain to see if fixes Chrome roll.
Original change's description:
> Convert Origins to points
>
> This CL converts various OriginX, OriginY pairs into CFX_PointF objects.
>
> Change-Id: I9141f7fc713c710b2014d4fdcdec7dc93501f844
> Reviewed-on: https://pdfium-review.googlesource.com/2575
> Commit-Queue: dsinclair <dsinclair@chromium.org>
> Reviewed-by: Nicolás Peña <npm@chromium.org>
>
TBR=tsepez@chromium.org,dsinclair@chromium.org,npm@chromium.org,pdfium-reviews@googlegroups.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=
Change-Id: I949fb4ec712e2587e7d0ef0191c34db198b61dcc
Reviewed-on: https://pdfium-review.googlesource.com/2696
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|