Age | Commit message (Collapse) | Author |
|
Import Chromium's base/compiler_specific.h from r537069.
Now that FALLTHROUGH is available via compiler_specific.h, remove
FX_FALLTHROUGH.
Change-Id: I8b9631a4f007673e10e0c26951dfd61e9dcada30
Reviewed-on: https://pdfium-review.googlesource.com/32639
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Lei Zhang <thestig@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>
|
|
Encapsulates transparency status instead of having it be a raw int.
Change-Id: I8b10dafa97da112795cf84c46cf416a0294551d5
Reviewed-on: https://pdfium-review.googlesource.com/32194
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
They are mostly CPDF_Object* and derived classes, but others that should
be are marked const as well.
Change-Id: Ib3344d7d8db90940df8edc97c0dd6c59da080541
Reviewed-on: https://pdfium-review.googlesource.com/32180
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
BUG=pdfium:1049
Change-Id: I3a589fe51f2e584dc130ba31faa144d4494a1b08
Reviewed-on: https://pdfium-review.googlesource.com/32179
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Fix some nits in the code in the process.
Change-Id: I660b3bf547823a11bc291ed2dd1ec19a76b24b5b
Reviewed-on: https://pdfium-review.googlesource.com/32178
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Tested by running safetynet_compare.py on this patch vs master. The
results were 0 regressions and 0 improvements. The two remaining usages
cannot be replaced because they would cause a regression.
Bug: pdfium:177
Change-Id: I43eddf4ffaac2eb063f2004d6606bc3cd6e627ac
Reviewed-on: https://pdfium-review.googlesource.com/32159
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
|
|
Change-Id: I3fe99ecb17d37f893ce5d0d59219c82ee31fe7ea
Reviewed-on: https://pdfium-review.googlesource.com/32110
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Also move static private members into the .cpp file.
Change-Id: Idbbdc7c78ac4199968888466caa20c58a5653dfd
Reviewed-on: https://pdfium-review.googlesource.com/32151
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Change-Id: I06eab59d7944309d6fe99b97956e8ffb11d64088
Reviewed-on: https://pdfium-review.googlesource.com/30991
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
BUG=chromium:833721
Change-Id: I3ca878760c12144ef27a71dcbbfd7c18d12a5f3b
Reviewed-on: https://pdfium-review.googlesource.com/30992
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Make Copy() take a const-ref parameter. As is, the parameter is a
pointer and it is dereferenced without any checks, and there are no
crash reports as a result of that.
Also mention GetPattern() should only be called when IsPattern() returns
true.
Change-Id: Ice3b7c941532d5a312fdd8f0c032e08d1ee1c6b5
Reviewed-on: https://pdfium-review.googlesource.com/30430
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I1232e6c61cbe696d90d87f461ebed0a7aea40893
Reviewed-on: https://pdfium-review.googlesource.com/29973
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
It has no overrides and always returns the identity matrix. Many callers
that use the returned value can be simplified, because they are scaling
by 1 or concatenating an identity matrix.
Change-Id: I7afb7214be210d02638644dfb9b58404420c2ef2
Reviewed-on: https://pdfium-review.googlesource.com/29972
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
- Just return the rect directly and let the caller check for emptiness.
- Get rid of a boolean parameter with always false argument.
Change-Id: Ia33587db34c0a628047e59b7faa390c3ac57ec8a
Reviewed-on: https://pdfium-review.googlesource.com/29971
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
This might make the memory tools more effective in finding OOBs.
Change-Id: Id093bb0a88c37954c80d612ac00b5a168e75bdbf
Reviewed-on: https://pdfium-review.googlesource.com/29550
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Mark the other ArgbEncode() variant as constexpr.
Change-Id: I84207d805766e5efc669638bd8a15cfead356a41
Reviewed-on: https://pdfium-review.googlesource.com/28577
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I196e3148d680c9efeaf9609dd3ddbfe3f6635fa6
Reviewed-on: https://pdfium-review.googlesource.com/28576
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
FX_COLORREF should work like win32 COLORREF, which is BGR.
Change-Id: I9f8bb3e2d30a64dc822ac6b8c46130358a03678a
Reviewed-on: https://pdfium-review.googlesource.com/28574
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
This CL renames IFX classes in core/fxge to Iface.
Change-Id: I137167ddd4ff1563d8002d9501222c27183408cc
Reviewed-on: https://pdfium-review.googlesource.com/27990
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL renames the 3 IFX files in core/fxcrt to Iface instead.
Change-Id: I7cee6836650b71bc5c5729a8147fda62f0910fe3
Reviewed-on: https://pdfium-review.googlesource.com/27970
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: Ic1d5a250fc00d6767cee7eee1b2d74d5e1caa2bb
Reviewed-on: https://pdfium-review.googlesource.com/27050
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Didn't find any bugs, but also doesn't require much boilerplate.
Bug: TODO
Change-Id: I5f30183c55216f1333c79fcb46476d281720873e
Reviewed-on: https://pdfium-review.googlesource.com/26210
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Nico Weber <thakis@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: I9b878c8df4a6208fb1908bad09eb1c699970163f
Reviewed-on: https://pdfium-review.googlesource.com/21690
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: Iec4e999d76dabc9b6cd00323881c5c87afc5f629
Reviewed-on: https://pdfium-review.googlesource.com/19930
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Bug: pdfium:774
Change-Id: I4996f5526884c33d92df964045bd5467c392df5e
Reviewed-on: https://pdfium-review.googlesource.com/19490
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL updates the various call sites to use size_t instead of other
types.
Bug: pdfium:774
Change-Id: Id8b75728b61c0ca1b15bc815831c885d33374f7b
Reviewed-on: https://pdfium-review.googlesource.com/19410
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Also remove a conditional in the CPDF_Form ctor that cannot be true.
Change-Id: Icd00233969cea33e9c63d0d6a9d07226c2b173f2
Reviewed-on: https://pdfium-review.googlesource.com/17070
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Fix a mismatched parameter name in cpdf_renderstatus.h too.
Change-Id: I9765838e6ab93db37791fc282e553b6cb9c51ec5
Reviewed-on: https://pdfium-review.googlesource.com/17050
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This CL adds some validation into the tiling pattern drawing code.
BUG: chromium:775365
Change-Id: I7bcad7f7f2c83982cd955f92091658b46f6b820b
Reviewed-on: https://pdfium-review.googlesource.com/16190
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Also check the return value for a Clone() call.
Change-Id: Ia2775c2f70aafa2874f5d4172e0dc178854a3f51
Reviewed-on: https://pdfium-review.googlesource.com/15791
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This CL moves the members of CPDF_RenderOptions to be private members
and adds accessor methods as needed.
Change-Id: Ie91665ff53ae00cc4c53741d089d375503fabe11
Reviewed-on: https://pdfium-review.googlesource.com/15531
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL removes the friends from CPDF_TextObject and adds accessor
methods as needed.
Change-Id: I68d18297640b46113df79f58bea50b77dac89d39
Reviewed-on: https://pdfium-review.googlesource.com/15455
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL renames the FX_OS defines to have _OS_ in their names and drops
the _DESKTOP suffix. The FXM defines have been changed to just FX.
Change-Id: Iab172fba541713b5f6d14fb8098baf68e3364c74
Reviewed-on: https://pdfium-review.googlesource.com/14833
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL moves CFX_UnownedPtr to UnownedPtr and places in the fxcrt
namespace.
Bug: pdfium:898
Change-Id: I6d1fa463f365e5cb3aafa8c8a7a5f7eff62ed8e0
Reviewed-on: https://pdfium-review.googlesource.com/14620
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL renames CFX_RetainPtr to RetainPtr and places in the fxcrt
namespace.
Bug: pdfium:898
Change-Id: I8798a9f79cb0840d3f037e8d04937cedd742914e
Reviewed-on: https://pdfium-review.googlesource.com/14616
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL moves CFX_MaybeOwned into the fxcrt namespace and removes the
CFX_ prefix.
The test names for maybe owned were updated to be in the MaybeOned test
suite instead of the fxcrt suite.
Bug: pdfium:898
Change-Id: I0c07057d66c8610e7b19133094b4507fff725e76
Reviewed-on: https://pdfium-review.googlesource.com/14470
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL renames CFX_AutoRestorer to just AutoRestorer and places in the
fxcrt namespace.
Bug: pdfium:898
Change-Id: Id9f36df94e95f3b2a55054bc198ca1bfd249ee3d
Reviewed-on: https://pdfium-review.googlesource.com/14450
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I703321108712e8c4a11a8343ecf8b1a8804c1d1a
Reviewed-on: https://pdfium-review.googlesource.com/14352
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Add a new ParseContent() method as a convenience to call
ParseContentWithParams() with the default parameters.
Change-Id: I274682845a72e125c3fc6299289edb760104ac4d
Reviewed-on: https://pdfium-review.googlesource.com/12250
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
This CL moves IFX_Pause out to its own class from fx_basic and updates
includes as needed.
Change-Id: Iebdd183d8c85aa17570f190f1a7d1602c0af3c8b
Reviewed-on: https://pdfium-review.googlesource.com/12491
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL moves CFX_FixedBufGrow to its own files and updates includes as
needed.
Change-Id: Ia0cb70569b30acdb3ba9f23d8937ab8f9c17d6e6
Reviewed-on: https://pdfium-review.googlesource.com/12490
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL moves CFX_AutoRestorer into its own file, separate from
fx_basic.h.
Change-Id: I415cb9207416bd4744b8ac8e2d7466852db53f0a
Reviewed-on: https://pdfium-review.googlesource.com/12390
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Currently, all three of CFX_Matrix::TransformRect() take in rect values
and modify them in place.
This CL converts them to take in constant values and return the
transformed values instead, and fixes all the call sites.
Bug=pdfium:874
Change-Id: I9c274df3b14e9d88c100ba0530068e06e8fec32b
Reviewed-on: https://pdfium-review.googlesource.com/11550
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Jane Liu <janeliulwq@google.com>
|
|
Re-enable individual image mask rendering to improve spool sizes, with
bug fixes and improvements:
- Fix bug with missing images by ensuring all masks are recorded
- Fix printing to landscape paper sizes
- Improve spool sizes by processing the location of the masks in the
progressive renderer when rendering to the printer instead of needlessly
fully rendering them (they will be rendered as bitmaps anyway).
Bug: chromium:753700
Change-Id: I86bdcce9f10855274c56ba2ddae2c2522b36426d
Reviewed-on: https://pdfium-review.googlesource.com/11115
Commit-Queue: Rebekah Potter <rbpotter@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Instead of passing in a CPDF_PageObject* and then converting it to an
image, which is always what it is.
Change-Id: I146a476147f4b344417982b5ace002b9bd7b3d80
Reviewed-on: https://pdfium-review.googlesource.com/9810
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Most calls to the Skia Driver combine flushing
the draw cache with deleting the driver itself.
Progressive drawing needs to flush the cache to
keep drawing in order, but the driver must remain
for the next progressive draw.
R=dsinclair@chromium.org, hnakashima@chromium.org
Bug: pdfium:833
Change-Id: I311f80b2dc0ef6e4df9a3a0f082ae076cb7a591f
Reviewed-on: https://pdfium-review.googlesource.com/8890
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
In this CL, CPDF_MeshStream::ReadVertexRow returns a vector. The vector
size is not allocated in advance to prevent OOM attacks, since the size
is given as an input to the PDF.
Bug: chromium:735248
Change-Id: I3e2b020896f24715af5dfd9aa18768e6d64d6f76
Reviewed-on: https://pdfium-review.googlesource.com/7950
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This CL removes the fore/back colours in favour of just using the
colours inline and converts the m_ColorMode to an enum.
Change-Id: I1796e200d5c470680126af8625d45fc3062a1042
Reviewed-on: https://pdfium-review.googlesource.com/7751
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|