Age | Commit message (Collapse) | Author |
|
This Cl fixes the naming of the size types to match their purpose. This makes
the code clearer.
Change-Id: I37a41ab0fe01782f4749054f1f8ab29ddf8d2790
Reviewed-on: https://pdfium-review.googlesource.com/2551
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This Cl updates the code to use the constructors instead of creating an
empty object and calling Set(). It also removes the various memsets of
the CFX_Rect{F} classes.
Change-Id: I6e20cec00866a38372858dcba5a30d31103172e4
Reviewed-on: https://pdfium-review.googlesource.com/2550
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Added methods to create paths, set their colors, determine whether they will be
stroked and/or filled. FPDFPage_InsertObject should be used to add a path to a
page.
BUG=pdfium:661
Change-Id: I8fd17b33a09c5126e517bfd1a69a893216c160e8
Reviewed-on: https://pdfium-review.googlesource.com/2534
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
This hopefully makes it less confusing what the description of a point is.
Currently we have defines for the types, which is confusing because a point
can only be one of the three. And it is mixed up with whether the point is
closing a figure or not.
Change-Id: Icd71355d69c77b3d52ca78e03bc379081ff87753
Reviewed-on: https://pdfium-review.googlesource.com/2552
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL converts some of the out parameters in the XFA layout code to pointers
instead of references.
Change-Id: I6246b91b975e7bc08f8cfb040de9dfdc3c3bedee
Reviewed-on: https://pdfium-review.googlesource.com/2531
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
This will allow the compiler to distinguish between rectangle
initialization from a point and a size vs. two points.
Add corresponding ctors, and fix style noise induced in XFA,
now that rects have become a complex type.
Change-Id: Iaa5887db63dafd41ac95f5c623989ca1d6443fd6
Reviewed-on: https://pdfium-review.googlesource.com/2533
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Continuing cleaning up members and methods of CXFA_ItemLayoutProcessor.
Change-Id: Ie74fb83337c85820072b43352b734eafc3a0d5af
Reviewed-on: https://pdfium-review.googlesource.com/2513
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
If m_pFile is set, m_bMemoryBased is set to false. However, ReadRawData
incorrectly checks if m_bMemoryBased is TRUE before passing a read to
m_pFile. This fix changes things to correctly call m_pFile's ReadBlock.
Filed associated https://bugs.chromium.org/p/pdfium/issues/detail?id=662
BUG=pdfium:662
Change-Id: If58af9093e3de78261a4cf1eb0460b7c7c153e5a
Reviewed-on: https://pdfium-review.googlesource.com/2532
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
CPDF_PageObject is a CPDF_GraphicStates, which allows us to add graphics
information to the object itself. The RGB can be added easily in the stream.
The alpha parameter needs to be in a dictionary contained in the ExtGState,
which should be part of the page's resources.
BUG=pdfium:661
Change-Id: Id99b2ece7aa201e3550c765ac2b5eeff4b43fc48
Reviewed-on: https://pdfium-review.googlesource.com/2530
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
Remove some unused #defines as well.
Change-Id: Ie7dc1ae85100eae24f18a3ecd456e3c8d8043a43
Reviewed-on: https://pdfium-review.googlesource.com/2490
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Split XFA layout code into correct files, move static methods into anonymous
namespace blocks. Cleanup formatting where possible.
Change-Id: Ia342d7db42f947db02a52aa86bfa69e4fda916fd
Reviewed-on: https://pdfium-review.googlesource.com/2512
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
The pPageView parameter is always set to nullptr when creating XFA widgets.
Change-Id: I4259ff7e523dc462242d2e37f0e2a919c5543035
Reviewed-on: https://pdfium-review.googlesource.com/2511
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Not needed with modern compilers, removed.
Change-Id: Ia8977262b5791bd4445f02be8456641d1a7e18f3
Reviewed-on: https://pdfium-review.googlesource.com/2431
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Simplify the code to what we support, remove unnecessary classes.
Change-Id: I7af79a4720e0c95c609f163ebb86cf67d643add1
Reviewed-on: https://pdfium-review.googlesource.com/2430
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
See Table 4.9 for path construction operators. Ignoring v, y, because those can
be replaced with the more powerful c operator. The code added will be called by
public methods that do not exist yet.
BUG=pdfium:661
Change-Id: I9a1ad3fd0a601e4e3a292b55f3e5708fe0c9c8fb
Reviewed-on: https://pdfium-review.googlesource.com/2495
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
The DrMemory bots have been removed, remove the config and infrastructure.
BUG=chromium:655521
Change-Id: I065d717b11d615a6dc981b79a8caefd8783b105b
Reviewed-on: https://pdfium-review.googlesource.com/2494
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: Ib319cad12707cf2a7211c64b0f950e5f0dd2b094
Reviewed-on: https://pdfium-review.googlesource.com/2493
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
These obfuscate control flow and save very few lines.
Mechanical change (mostly), sed + clang-format and adding a
few missing semicolons.
Change-Id: If8ae06c23edea8c455c79eab589fee5142dc3409
Reviewed-on: https://pdfium-review.googlesource.com/2472
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
When the results of the test runner were converted to return a tuple the
following code which checked the results for true/false were not updated
to extract the success value from the tuple. This caused the code to think
that the results always passed even when they failed.
This CL fixes the two tests which were broken (both just minor image result
differences) which slipped in during this breakage.
Change-Id: I01b56dd7b05013c2c12c83543746cf59b145e561
Reviewed-on: https://pdfium-review.googlesource.com/2456
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I21aeb1df387b60330d87a6cc82c615878c1f5596
Reviewed-on: https://pdfium-review.googlesource.com/2457
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I16a1bfc7e3edcb3844e0978be1c7ca1e9c59eb6e
Reviewed-on: https://pdfium-review.googlesource.com/2454
Reviewed-by: Nicolás Peña <npm@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I19f2e729b58de42506e8fc2811dd06d406470314
Reviewed-on: https://pdfium-review.googlesource.com/2470
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
BUG=
Review-Url: https://codereview.chromium.org/2660353002
|
|
Change-Id: Idc9921fe7389abea8e23f07a58fb6e7bfd1c09eb
Reviewed-on: https://pdfium-review.googlesource.com/2433
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: Id7eac9163582d05bce3115408a66e63953d7093b
Reviewed-on: https://pdfium-review.googlesource.com/2453
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Avoids explicit deletes through CPDF_RenderOptions holding pointers
to it which may have been copy constructed. Ick.
Change-Id: Ic044b66d13bd7c5eaa53de995373858081e115ec
Reviewed-on: https://pdfium-review.googlesource.com/2451
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Rename array members to plurals.
Use std::vectors rather than native arrays and counts.
Use std::set instead of map of key to itself.
Use unique_ptr inside vector to clean subtables.
Mark non-existent constructors() = delete.
Change-Id: Ifde189157e8affb5de654a44fac8b9358de7079b
Reviewed-on: https://pdfium-review.googlesource.com/2452
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I5166afa96ec3e7fb0232f94fc62020d3d051a64c
Reviewed-on: https://pdfium-review.googlesource.com/2450
Reviewed-by: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
We currently only limit the array recursion levels. This recursion
level may also be reset when parsing. This is insufficient to protect
against stack overflows.
BUG=681920
Change-Id: I69bd0c912fb45c0e68b9b9fa961d43f0adc9bdd3
Reviewed-on: https://pdfium-review.googlesource.com/2434
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
BUG=
Review-Url: https://codereview.chromium.org/2649313005
|
|
tif_data and tif_cleanup are both set on the TIFFInit methods, see for
instance TIFFInitPixarLog. If PredictorSetupDecode fails, whatever was
filled on tif_data should be cleaned up. The previous leak fix from
PixarLogSetupDecode is no longer necessary.
BUG=683834
Change-Id: Ib7dec3fb8addd56fa20f2e85c4ee918222a5f97e
Reviewed-on: https://pdfium-review.googlesource.com/2432
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
Pre-cursor to properly ref-counting it.
Rename to match the CPDF_/IPDF_ conventions.
Move CPDF_ structure out of IPDF-defining headers.
Break friendships.
Review-Url: https://codereview.chromium.org/2640923006
|
|
This CL adds more unit tests to the css parser and removes some unused code.
Change-Id: If233040e19c7a79a907a3215877e042ac388d61b
Reviewed-on: https://pdfium-review.googlesource.com/2412
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL fixes up the bare new calls in CFDE_CSSStyleSelector and replaces
them with unique_ptrs. Code massaged to work correclty with new types.
Change-Id: I90fce1ed7486da97fe7b5e597e9d423748c069c0
Reviewed-on: https://pdfium-review.googlesource.com/2353
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Currently we use the size provided by clusterfuzz when initializing the
css syntax parser. This maybe incorrect as the CFX_WideString may have a
different count after converting to UTF. Use the wide string length instead
of the provided size.
We need to guard against strings that convert to blank when doing the wide
conversion so add an early exit.
BUG=682551
Change-Id: I3e014647fcf869681098a1b4446306b8b3eb9323
Reviewed-on: https://pdfium-review.googlesource.com/2391
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
BUG=682628
Change-Id: I8e88cc0c8392b078afb73f9549ea4dea9a5717fd
Reviewed-on: https://pdfium-review.googlesource.com/2390
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Using int64 to check whether uint32 operations have overflowed.
BUG=681300
Change-Id: I4470d34f2e5e61c0bf96f1c8587cdb7805afe87b
Reviewed-on: https://pdfium-review.googlesource.com/2355
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
Change-Id: Id2ece818c80e8cce4748b9a237871131a7acd6d1
Reviewed-on: https://pdfium-review.googlesource.com/2354
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Replaced (OPJ_UINT32)opj_int_ceildiv((OPJ_INT32)a, (OPJ_INT32) b) with
opj_uint_ceildiv(a, b), which makes much more sense.
BUG=683156
Change-Id: Ie9d6736f4ec0f16d14f203850a14f0dabd73ee38
Reviewed-on: https://pdfium-review.googlesource.com/2352
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
Review-Url: https://codereview.chromium.org/2650773003
|
|
The original coverage CL made the unittests build correclty with coverage but
the code in samples/ builds differently. This CL fixes coverage for pdfium_diff
and pdfium_test code.
Review-Url: https://codereview.chromium.org/2649403003
|
|
This is already the default value and is the only supported case.
Review-Url: https://codereview.chromium.org/2657453005
|
|
These separate scalars are an anti-pattern given the ability to pass a single entity and later operate on it sensibly.
Review-Url: https://codereview.chromium.org/2652033002
|
|
BUG=665583
Change-Id: Iab5637716f168c290cc58fe85711c29dc7c29a7d
Reviewed-on: https://pdfium-review.googlesource.com/2290
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
|
|
Also fix an unsafe negation in same block.
BUG=641551
BUG=681091
Review-Url: https://codereview.chromium.org/2649283002
|
|
m_decorrelation_array and m_offset_array can be assigned to l_mct_data,
which can be set in opj_j2k_read_mct. In this method, there can be an
early true return before allocating m_data but after freeing it.
BUG=678342
Change-Id: Id9ea3cc57a9a278deb1540e5db8a94db86018fd6
Reviewed-on: https://pdfium-review.googlesource.com/2350
Commit-Queue: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
The method is used twice in fpdfsdk/cpdfsdk_interform.cpp and twice in
fpdfsdk/javascript/Document.cpp, but not in a compatible way. Changed
the method so that it now returns true when checks pass, which is the
more natural thing to do, considering the name of the method.
BUG=pdfium:659
Change-Id: Iacf3049f328df1d4db3fbfc995acf184230ebf48
Reviewed-on: https://pdfium-review.googlesource.com/2297
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Remove the bare new and use CFX_RetainPtr to keep track of the computed styles.
Change-Id: Icf235623529797176707482c78676814b7a81b9e
Reviewed-on: https://pdfium-review.googlesource.com/2292
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This Cl cleans up the memory for the CFDE_CSSRuleCollection::Data parameter.
Change-Id: I449ffdeebdc6463bf68b991fffecdc6cf0b25362
Reviewed-on: https://pdfium-review.googlesource.com/2296
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
The UA style defined in CXFA_TextParser does not specify any ID, Class or
Universal selectors. Remove related code.
Change-Id: I9f2d760ee86f309a9cfa8a0f1f3e3dd7a15ef4c8
Reviewed-on: https://pdfium-review.googlesource.com/2295
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|