Age | Commit message (Collapse) | Author |
|
This method is working on the FloatRect content so move it to CFX_FloatRect.
Change-Id: I60aabf6e3b86aa9acc59f86cff69347ec5fe5033
Reviewed-on: https://pdfium-review.googlesource.com/7712
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Remove members from CPDF_RenderOptions which are set but never read.
Change-Id: I9598478bbc63c94af1c4693907abf66503138eb5
Reviewed-on: https://pdfium-review.googlesource.com/7750
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Changed CPDF_FileSpec::GetFileName() to directly return CFX_WideString,
instead of taking in a CFX_WideString* and returning a bool. Also fixed
test calls in the unit test.
Bug=pdfium:808
Change-Id: Ie081fc9f4f1c15d23c86d7222d8480ab9cb56056
Reviewed-on: https://pdfium-review.googlesource.com/7671
Commit-Queue: Jane Liu <janeliulwq@google.com>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
PDFium's native code reverse engineers the glyph code on Mac
by taking the character code point, looking up its name in
FreeType, and then finding the named glyph's index from
CoreGraphics.
If the FreeType glyph index and the CoreGraphics index don't
match, it uses CoreGraphics' index when drawing.
The IDs match except when drawing an embedded Type 1 font tha
has been sparsely populated to cut down on the PDF size.
R=dsinclair@chromium.org
Bug: 738279
Change-Id: I16d993b611afe3b2481b36f886644524c9c351ef
Reviewed-on: https://pdfium-review.googlesource.com/7650
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
|
|
This CL makes CJBig2_Segment own the results: symbol, pattern, huffman,
and huffman. This causes a lot more unique_ptr usage in JBig2 code.
Change-Id: I1f0a5bfaaf85053658b467bef5325c72d1f496c7
Reviewed-on: https://pdfium-review.googlesource.com/7690
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
This should unblock the skia-roller
Bug:Skia:6828
Change-Id: Id918f017ed69bea9536eb1df8c31d43eac51d680
Reviewed-on: https://pdfium-review.googlesource.com/7730
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
|
|
Change-Id: I29f1c4f68356e335cd55e38014699780bf658249
Reviewed-on: https://pdfium-review.googlesource.com/7610
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
Skia has no direct match for a different 2x3
matrix per glyph -- if the 2x3 is a square scale
with rotation, we can do that with RSX transforms.
The bug used the 2x3 to do a condensed face,
which we can do with SkPaint::setTextScaleX.
Otherwise, we draw a character at a time.
R=dsinclair@chromium.org,npm@chromium.org
Bug: 736703
Change-Id: I8f14fd63ffdaee886b63d1154b771f9de092a83f
Reviewed-on: https://pdfium-review.googlesource.com/7272
Commit-Queue: Cary Clark <caryclark@google.com>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
Change-Id: Idbed9a2061d9d25ab12f8caaa09fe5ddba93cff7
Reviewed-on: https://pdfium-review.googlesource.com/7670
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
1. Added two helper functions in CPDF_FileSpec, which will be useful
when adding support for embedded files:
CPDF_FileSpec::GetFileStream() - useful because the stream object
contains the file's data
CPDF_FileSpec::GetParamsDict() - useful because the params dictionary
contains parameters of the file, such as creation date, size, etc.
* Added two unit tests testing both functions.
Bug=pdfium:174
Change-Id: I33ea21ddb621434007f94767f281ead0b00ecb8a
Reviewed-on: https://pdfium-review.googlesource.com/7355
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Jane Liu <janeliulwq@google.com>
|
|
This CL moves CMYKtoRGB methods to fx_codec. It also cleans them up a
bit, including allowing them to return tuples instead of having
non-const refs in their parameters.
Change-Id: Ib3ec45102ec7eff623cd07a624e852d39bf335e4
Reviewed-on: https://pdfium-review.googlesource.com/7591
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This CL switches void* to CLcmsCmm*, simplifies the ownership and
destruction of CLcmsCmm, and reduces unnecessary function calling in
fx_codec_icc.cpp.
Change-Id: Ifdbf59dcdaede497d1684b161dd066726cf08ee3
Reviewed-on: https://pdfium-review.googlesource.com/7590
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
This CL adds some helper namespace methods and cleans up methods.
Change-Id: I7ef51dd1ff365d307694a10519d532698ee39211
Reviewed-on: https://pdfium-review.googlesource.com/7550
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
BUG=chromium:734850
Change-Id: Icc0947e2e99e77a36d8963fcf0b6d3deea161d3e
Reviewed-on: https://pdfium-review.googlesource.com/7194
Commit-Queue: Rebekah Potter <rbpotter@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Bug: chromium:738919
Change-Id: I2ea99a47f45e2e68650bd1fa9ad7554d8df79874
Reviewed-on: https://pdfium-review.googlesource.com/7351
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
This brings the cpp and h files together and removes the
redundant ge/ path.
Change-Id: I36594b8ae719d362768ba4c2e4ce173e287363eb
Reviewed-on: https://pdfium-review.googlesource.com/7452
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This reverts commit 75e1ab05e731d99b9acdc86de47640720e848415.
Reason for revert: Using the custom skia smart pointer is the correct
approach over CFX_UnownedPtr.
Original change's description:
> Revert "typeface double delete"
>
> This reverts commit ddf2418ba8e5d925909d7955ac22b33f37ccce44.
>
> Reason for revert: not right
>
> Original change's description:
> > typeface double delete
> >
> > SkTypeface was doubly deleted at pdfium teardown
> > SkTypeface has two pointers but no owners.
> > Making the font cache an owner fixes the bug but
> > violates checkdeps rules. Let me know what to
> > do about that.
> >
> > R=dsinclair@chromium.org,npm@chromium.org
> > Bug: 736133
> > Change-Id: I756a41258a5ac86e70139d7a587c5da9bb7a707b
> > Reviewed-on: https://pdfium-review.googlesource.com/7270
> > Reviewed-by: Nicolás Peña <npm@chromium.org>
> > Commit-Queue: Cary Clark <caryclark@google.com>
>
> TBR=dsinclair@chromium.org,caryclark@google.com,npm@chromium.org,caryclark@skia.org
>
> Change-Id: I255f50acf2cbaecc85b8e5ac3893c1fbc77b6492
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 736133
> Reviewed-on: https://pdfium-review.googlesource.com/7310
> Reviewed-by: Cary Clark <caryclark@google.com>
> Commit-Queue: Cary Clark <caryclark@google.com>
TBR=dsinclair@chromium.org,caryclark@google.com,npm@chromium.org,caryclark@skia.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: 736133
Change-Id: I0ab949e9da2fdab9559e7ffe0ceed24d8eb9b66a
Reviewed-on: https://pdfium-review.googlesource.com/7510
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Found with this patch:
diff --git a/BUILD.gn b/BUILD.gn
index 83bad1b13..444685f04 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -89,6 +89,8 @@ config("pdfium_core_config") {
"/wd4324",
"/wd4577",
]
+ } else {
+ cflags += [ "-Wshadow" ]
}
}
But renaming the conflicting names is tricky, so done with clang-rename.
Change-Id: Ie959b86e9e82b11b211761b0c73e439e51044de7
Reviewed-on: https://pdfium-review.googlesource.com/7410
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
When reading in a BMP, after processing the header, make sure that
there is enough data remaining in the source before proceeding. If not
signal that the BMP is improperly formatted.
BUG=chromium:738635
Change-Id: I506bc0e6db7dcd4b5984fd91a1f39516320a2037
Reviewed-on: https://pdfium-review.googlesource.com/7280
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Change-Id: I53da7a36ce8503abd99f2525e8a5b394ee547b47
Reviewed-on: https://pdfium-review.googlesource.com/7353
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
This reverts commit ddf2418ba8e5d925909d7955ac22b33f37ccce44.
Reason for revert: not right
Original change's description:
> typeface double delete
>
> SkTypeface was doubly deleted at pdfium teardown
> SkTypeface has two pointers but no owners.
> Making the font cache an owner fixes the bug but
> violates checkdeps rules. Let me know what to
> do about that.
>
> R=dsinclair@chromium.org,npm@chromium.org
> Bug: 736133
> Change-Id: I756a41258a5ac86e70139d7a587c5da9bb7a707b
> Reviewed-on: https://pdfium-review.googlesource.com/7270
> Reviewed-by: Nicolás Peña <npm@chromium.org>
> Commit-Queue: Cary Clark <caryclark@google.com>
TBR=dsinclair@chromium.org,caryclark@google.com,npm@chromium.org,caryclark@skia.org
Change-Id: I255f50acf2cbaecc85b8e5ac3893c1fbc77b6492
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 736133
Reviewed-on: https://pdfium-review.googlesource.com/7310
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
|
|
SkTypeface was doubly deleted at pdfium teardown
SkTypeface has two pointers but no owners.
Making the font cache an owner fixes the bug but
violates checkdeps rules. Let me know what to
do about that.
R=dsinclair@chromium.org,npm@chromium.org
Bug: 736133
Change-Id: I756a41258a5ac86e70139d7a587c5da9bb7a707b
Reviewed-on: https://pdfium-review.googlesource.com/7270
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: Cary Clark <caryclark@google.com>
|
|
Add debugging for bounding clip boxes
Add debugging to dump save count (probably not useful)
Make debugging output easier to find
R=dsinclair@chromium.org,npm@chromium.org
Bug:
Change-Id: I4b985b8810c80a3061a11401e26a065d17236604
Reviewed-on: https://pdfium-review.googlesource.com/7278
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Cary Clark <caryclark@google.com>
|
|
GetClipBox returned wrong clip bounds
Found tracing through looking for other bugs.
GetClipBox is used by graphics outside of
Skia so it needs to be kept up to date.
R=dsinclair@chromium.org,npm@chromium.org
Bug: 736703
Change-Id: I2b3fdfe91053848243e5b486a2615a233654c5a9
Reviewed-on: https://pdfium-review.googlesource.com/7274
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: Cary Clark <caryclark@google.com>
|
|
clip rect should mirror existing construction
Also found tracing. Keep the clip rect
in sync with its expected value for
compatibility.
R=dsinclair@chromium.org,npm@chromium.org
Bug: 736703
Change-Id: I57bab209f5e1febb5fbcd91860b43296063f1f80
Reviewed-on: https://pdfium-review.googlesource.com/7275
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: Cary Clark <caryclark@google.com>
|
|
disabled by default
R=dsinclair@chromium.org,npm@chromium.org
Bug:
Change-Id: Iab08a7120d28b2d81a5e1d4768fd95a460208ebf
Reviewed-on: https://pdfium-review.googlesource.com/7277
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Cary Clark <caryclark@google.com>
|
|
I could not get this to reproduce. It was also
reported in April, but I marked it fixed because
I couldn't reproduce this then, either. I suspect
that the result of LineSide() is +/-inf, causing
either minBounds or maxBounds in
ClipAngledGradient() to be set to -1, triggering
the stack buffer misread.
R=dsinclair@chromium.org,npm@chromium.org
Bug: 736574
Change-Id: Id828321f8c5481b862822be43d76a41dd8e74ef0
Reviewed-on: https://pdfium-review.googlesource.com/7273
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: Cary Clark <caryclark@google.com>
|
|
Code around this bug was altered in April
to fix the off by one bug, but somehow the
loop counter fix was overlooked.
R=dsinclair@chromium.org,npm@chromium.org
Bug: 736195
Change-Id: I583a9f2389e6111ae1b847b961afaafd5e854810
Reviewed-on: https://pdfium-review.googlesource.com/7276
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Cary Clark <caryclark@google.com>
|
|
They are allocated with |opj_malloc| (which is just |malloc|), but we were
freeing them with |FX_Free|. But |FX_Free| recently changed to be
|PartitionFree|.
This is probably not the right ultimate fix, but it should solve the
high-occurence crash we're seeing in the short term.
BUG=chromium:737033
Change-Id: Ia162fe4e39731bd774d3eccb2357d9add26aa079
Reviewed-on: https://pdfium-review.googlesource.com/7230
Commit-Queue: Chris Palmer <palmer@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
BUG=pdfium:786
Change-Id: I0779dccb6db0e6ea3933279914153ef7961d9a5b
Reviewed-on: https://pdfium-review.googlesource.com/7152
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Also just call CFX_FloatRect() instead of explicitly writing out all
zeros.
Change-Id: I7574e64791d0c9ba613b14d0a613737dfbf39b12
Reviewed-on: https://pdfium-review.googlesource.com/7172
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
1. Added APIs for retrieving existing annotation paths and setting
annotation paths.
* Added an embedder test testing all the new functions.
Bug=pdfium:737
Change-Id: Ic451bcd3be488261baf2182549c4238b887b219e
Reviewed-on: https://pdfium-review.googlesource.com/6676
Commit-Queue: Jane Liu <janeliulwq@google.com>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
The bool returned by Start was not being used and the method was always
called right after the constructor, so it should be in the constructor.
Change-Id: I98abf9f7c11fbe42b3aa15ec5e46731198aa23d5
Reviewed-on: https://pdfium-review.googlesource.com/7151
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
CFX_Matrix::GetInverse is much clearer.
Change-Id: Id10ab1723735332e1a78de853f28415ec3a4d834
Reviewed-on: https://pdfium-review.googlesource.com/7090
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
BUG=pdfium:790
Change-Id: I4a3623dc0daac6ff8407c09cd00e9f2e4e5dd2d7
Reviewed-on: https://pdfium-review.googlesource.com/7051
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
In this CL, the content generator sets some default graphics states
before processing the page objects. In particular, a default ExtGState
is now set before processing, and the last CTM is now stored right
after parsing finishes: the only command to change matrix is ctm, and
it concatenates, so inverting requires knowing the current value.
Bug: pdfium:779
Change-Id: I35b1c07550ce91839fb0e20fbf717e3e80c9b9d6
Reviewed-on: https://pdfium-review.googlesource.com/7070
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This CL removes m_pTrailer in favor of having them all in a vector, and
having an index that points to the position of the previous m_pTrailer
in the vector.
Bug: pdfium:787
Change-Id: Ieebbf4849f7ea78f8f74d188e3adb3446a53482e
Reviewed-on: https://pdfium-review.googlesource.com/7040
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
https://pdfium-review.googlesource.com/c/7033/ contains the changes
in the corpus tests expected pngs. They are imperceptible and due to
a difference in float rounding when writing the appearance stream.
Bug: pdfium:731
Change-Id: I815ca5b9ddd02382b74285a32bfde8bd3e8eeaae
Reviewed-on: https://pdfium-review.googlesource.com/7010
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
BUG=pdfium:788
Change-Id: I9f211d42e60c0d8b7b3c508d340036a3b26542dd
Reviewed-on: https://pdfium-review.googlesource.com/7041
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Bug: pdfium:731
Change-Id: I92077971aec6bada061ed101cb48abe1611050d7
Reviewed-on: https://pdfium-review.googlesource.com/7042
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
1. Modified some existing annotation APIs to take into account the
effect of annotation's appearance streams.
* Added an embedder test testing annotations with APs.
This CL is refactored out of
https://pdfium-review.googlesource.com/c/6676/.
Bug=pdfium:737
Change-Id: I27d5e66dfdb90038d147cab1a26e0bf86b324982
Reviewed-on: https://pdfium-review.googlesource.com/7030
Commit-Queue: Jane Liu <janeliulwq@google.com>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Bug: pdfium:731
Change-Id: Ie65bafc644cff076b0d7aadcc5d0b0e33e2c199b
Reviewed-on: https://pdfium-review.googlesource.com/7035
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I1f3933709ad4a4f251a634dbe6d87a541994f02e
Reviewed-on: https://pdfium-review.googlesource.com/7037
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Bug: pdfium:731
Change-Id: I9453f28a17dd34908e6dcc97ea27e5ee84eda2d1
Reviewed-on: https://pdfium-review.googlesource.com/7011
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
CPDF_PageContentGenerator currently only works for CPDF_Page objects.
However, CPDF_Form is also a CPDF_PageObjectHolder like CPDF_Page, and
content streams can be generated for form objects too.
This CL modifies the content generator to work with both forms and
pages. The content generator will later be used on annotation objects'
CPDF_Form to simplify the code for annotation AP stream generation.
Change-Id: I1c50bdf0329d1f5788db23286ac72750355a10ed
Reviewed-on: https://pdfium-review.googlesource.com/6837
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
Bug: pdfium:731
Change-Id: I285332c8f9d988327e8633cb0746af2b76c401e5
Reviewed-on: https://pdfium-review.googlesource.com/6911
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This is unused except for being a pathway for indirect deps.
Change-Id: I717290235ccbc59429ad24231033382958e2a086
Reviewed-on: https://pdfium-review.googlesource.com/6910
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
This CL replaces raw pointers with vector and unique_ptr. It also fixes
other nits.
Change-Id: I45c99c9aa658681ec3f0b48fc4f407b278b250f5
Reviewed-on: https://pdfium-review.googlesource.com/6830
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Since cpdfsdk_widget.cpp already generates it, we can expect that
FPDF_GenerateAP will not be called. That implementation does not
work with widgets with a shared field.
Bug: chromium:733528
Change-Id: Ia436b4e8bc87ca86b67a02cf7301ac2328339128
Reviewed-on: https://pdfium-review.googlesource.com/6752
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
BUG=pdfium:690
Change-Id: I922279e4bdc8b411f47f49798155e8f9118c1396
Reviewed-on: https://pdfium-review.googlesource.com/6552
Commit-Queue: Chris Palmer <palmer@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|