Age | Commit message (Collapse) | Author |
|
Small step to reducing the differences between XFA and non-XFA. We
still use the RetainPtr pretty much as if it were an unique_ptr, in
that we're not yet caching pages and handing out multiple pointers
to the same page in the non-XFA case.
The one change is in page view cleanup, where we no longer need a
boolean and can take (sufficient) page ownership with a RetainPtr.
Tidy up some document.h -> page.h -> document.h circular inclusion
while we're at it.
NOTE: Wait for imminent branch to pass before landing. We'll want
this to bake a while.
Change-Id: I64a2f12ac3424ece1063d40583995b834117cf34
Reviewed-on: https://pdfium-review.googlesource.com/32790
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
BUG=pdfium:234
Change-Id: I6fde00c976ad4bb9cab632f465cf292f5b1da3d2
Reviewed-on: https://pdfium-review.googlesource.com/32914
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
BUG=pdfium:234
Change-Id: I5c900aa0547afef0c60de35422b4ee489daa6cfb
Reviewed-on: https://pdfium-review.googlesource.com/32913
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: Ib5f4cdb9c7f9c33561028a85029649ba68f4a6e5
Reviewed-on: https://pdfium-review.googlesource.com/32912
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: Id37333ba61ad0d395055acffd75d4d8be5eb2b3e
Reviewed-on: https://pdfium-review.googlesource.com/32911
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Move them out of testing/libfuzzer, to make it possible to pull
libfuzzer into that directory. Leave testing/libfuzzer/BUILD.gn there
for now as a transitional build file.
BUG=pdfium:1088
Change-Id: I4126d89dd3e075ac63477a4860e029c135866dbe
Reviewed-on: https://pdfium-review.googlesource.com/32896
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
BUG=pdfium:234
Change-Id: Ia3e758bbe5c445c3856f5215e900e02a16b4d7d7
Reviewed-on: https://pdfium-review.googlesource.com/32910
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
It is not called anywhere.
Change-Id: Ic5af010300a20fdd3d05f55df481030a946bb8c4
Reviewed-on: https://pdfium-review.googlesource.com/32971
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
During encoding, the code is going to walk through every character in
m_msg and determine what values need to be added to m_codewords. The
ceiling on the number of characters being added to m_codewords is the
length of m_msg, so reserving enought space in advance. This prevents
thrash related to incrementing the string and thus resizing in a tight
loop.
BUG=chromium:846027
Change-Id: Icefd6955933f8068feeeee6243e430f60c50d747
Reviewed-on: https://pdfium-review.googlesource.com/32990
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Change-Id: Id7bf252ebe25c92d26065d1138a445ebb2f78d0b
Reviewed-on: https://pdfium-review.googlesource.com/32187
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
When an xfa.event is sent it is possible to change the selStart, selEnd
and change values of the event. This should cause the value of newText
to be changed as needed.
This CL removes m_wsNewText from CXFA_EventParam and instead generates
the new text based on the previous text, the selection and the change.
Bug: 1066
Change-Id: I35d126fad9771c8980654a8af64d2b98989bff3f
Reviewed-on: https://pdfium-review.googlesource.com/32970
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
This CL adds the missing cancleAction property from the xfa.event
object.
Bug: 1066
Change-Id: I7d38956e2985c1f6ac0eba6de090874f1f72003c
Reviewed-on: https://pdfium-review.googlesource.com/32950
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
This CL adds bounds checking for the selStart and selEnd settings of the
event object. The selEnd is not allowed to be less then selStart. They
are also not allowed to be negative. This also clamps them to the length
of the prevText string.
Bug: 1066
Change-Id: Ifc9113c669c83a4a97655554affbbce30c2bfc64
Reviewed-on: https://pdfium-review.googlesource.com/32933
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
According to the XFA Spec only the cancelAction, selStart, selEnd and
change properties of xfa.event are editable. This CL adds checking to
early out if attempting to set any of the other properties.
Bug: 1066
Change-Id: Ie6129e1f65de7584f0b5f3072a1acf6e25d44a2c
Reviewed-on: https://pdfium-review.googlesource.com/32932
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
This CL renames the pValue parameters to the CJX_EventPseudoModel
Property helpers. This makes it a little clearer that the thing we're
setting is _not_ pValue but wsValue.
Bug: 1066
Change-Id: I1f468659c4e241059da0bbe43c461be788cd62a0
Reviewed-on: https://pdfium-review.googlesource.com/32931
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
This CL updates the CFXJSE_Engine code to access the defined properties
of a class if we fail to find the property in any other way. This fixes
up an issue where we were unable to read the 'change' property of the
CJX_EventPseudoModel because we could not find the 'change' property.
Bug: 1066
Change-Id: I4ad205bc527beeca1c3e24a36cdde0c21287d9fb
Reviewed-on: https://pdfium-review.googlesource.com/32930
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
This CL adds a bit of commented out code to CJX_LogPseudoModel to dump
any xfa.log.message() commands to the terminal. It's commented out as we
don't want it running normally but we can enable as needed.
Change-Id: Ia53759253391cbaa249a1801aa1541213020ad68
Reviewed-on: https://pdfium-review.googlesource.com/32915
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
CFX_BitStream::GetBits() got refactored recently, with an assert to not
read 0 bits. A fuzzer then discovered code that is trying to do that.
BUG=chromium:846394
Change-Id: Ib18b47200c82aab369109b5911540db724172690
Reviewed-on: https://pdfium-review.googlesource.com/32934
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This CL cleans up variables in CJBig2_Context. It moves some
declarations further, to when the variables are actually used. It also
caches huffman tables in a vector of unique_ptr.
Change-Id: Id3af96f9526b1000f681e4e2b174bba07b45ee55
Reviewed-on: https://pdfium-review.googlesource.com/32715
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
The class modifies the tree, so stop pretending its const.
Change-Id: I1095239a728fc0999c84db37d5cb17f596b9c791
Reviewed-on: https://pdfium-review.googlesource.com/32185
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Most of them can be marked const. A couple are marked non-const because
eventually something inside gets modified.
Change-Id: I5415ca8d1efdac451cde340272436cd1e6ec433f
Reviewed-on: https://pdfium-review.googlesource.com/32184
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Replace it with CFX_BitStream.
Change-Id: Ib74657f888b8dec8b6fdad7b49e28d250991c590
Reviewed-on: https://pdfium-review.googlesource.com/32852
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: Icfb7c6933625436b9fcf6a9fdfd0e5f655108eca
Reviewed-on: https://pdfium-review.googlesource.com/32851
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I764196b9cc1d437313aac18ee9d5dbed642c7119
Reviewed-on: https://pdfium-review.googlesource.com/32850
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This CL sets the text edit engine to skip the length check when doing an
insert if the engine is currently empty. This allows handling inserting
the formatted version of strings if they have a length longer then the
maximium length.
Bug: 1066
Change-Id: If9799334f889b8ae0f568f1f9d5457e2b504aa1d
Reviewed-on: https://pdfium-review.googlesource.com/32898
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Commit 86688dea moved some code out of a header, so now build targets
that used to only include the header need proper dependencies.
BUG=chromium:845771
Change-Id: I28603eea721b0ee19c2539ecf93fc3c22c3a8298
Reviewed-on: https://pdfium-review.googlesource.com/32895
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This CL moves the pow10 definition inside the pdfium::skia namespace in
order to fix conflicts with the skia version of the same file. This
comes up due to the code coverage tools.
Bug: chromium:845505
Change-Id: Ief53a2bbd15cb9828be23417ff3442461347d146
Reviewed-on: https://pdfium-review.googlesource.com/32893
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Also make destructors private for RetainPtr sub-classes, and add missing
destructors.
Change-Id: I451bf0aae2dae943b1f450d0aa4ca5124dc578fd
Reviewed-on: https://pdfium-review.googlesource.com/32853
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
- Make parameter checking more consistent in a several places.
- Remove unnecessary parameter size checks.
- Get rid of new statements / FX_Free() calls.
Change-Id: I7bac8e678f590815a398a318cd62a2947e1dd973
Reviewed-on: https://pdfium-review.googlesource.com/32836
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Fix some nits in CPDF_ShadingPattern as well.
Change-Id: I6b4b73f99031733a113fe2ad1bdc1d1e565b7a7d
Reviewed-on: https://pdfium-review.googlesource.com/32738
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I5fda9b68309a8b1f0b1768c26a25c95d7dda8d3d
Reviewed-on: https://pdfium-review.googlesource.com/32745
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Commit 10e1f05a incorrectly removed a font weight sanitizing step in the
font substitution code.
BUG=chromium:820345
Change-Id: I876f65a5649270648616f561eaad17ee333b9a9e
Reviewed-on: https://pdfium-review.googlesource.com/32832
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
BUG=chromium:820345
Change-Id: Ia3adb6a7565e12f3d5e129e2babb4b8628028269
Reviewed-on: https://pdfium-review.googlesource.com/32810
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This CL orders the CHKs in fpdf_view_c_api_test.c in alphabetical order
within each file because it is more convenient for these reasons:
* Easier to find existing APIs for which exact name is not known.
* Easier to verify that the ordering is being followed when adding APIs.
Change-Id: Ie9f56dd97e64b288927a14927c90ad8ec4cb8539
Reviewed-on: https://pdfium-review.googlesource.com/32713
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Just use memcpy() and memset().
Change-Id: Id6c6fab4e65a5524786ae318270c5981313825f2
Reviewed-on: https://pdfium-review.googlesource.com/32743
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Nobody reads it.
Change-Id: I76c0f5881e5432d2086cb8eaec7fc70fa5b71536
Reviewed-on: https://pdfium-review.googlesource.com/32741
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Rename fooBar() to FooBar().
Change-Id: I87775fa14ce7e4f4a5897780d0d02fb61c7693ff
Reviewed-on: https://pdfium-review.googlesource.com/32739
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
It was already possible to set the stroke width of a page object, this
is the other direction.
Change-Id: I5c4681b232768fc928bc7a169f223877284d4812
Reviewed-on: https://pdfium-review.googlesource.com/32770
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This override method just calls its parent class's method.
Change-Id: I4b22f55267a651a0eef0bf4e77d1231a7721fd6c
Reviewed-on: https://pdfium-review.googlesource.com/32747
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
CFGAS_PDFFontMgr::GetCharWidth() is only used for spaces, for no
good reason I could find. It's broken in this case too, returning
a default value of 600 for any character.
This CL removes this method and its only usage that led to finding
this issue.
Bug: pdfium:1083
Change-Id: I954de45101715b5af05169612fb5eca1b1a170b4
Reviewed-on: https://pdfium-review.googlesource.com/32740
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I06ca9eb7e8bb19f75ee75937a44e4ae548a7a92c
Reviewed-on: https://pdfium-review.googlesource.com/32791
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
In CCodec_FaxDecoder::v_GetNextLine(), a fixed size vector often needs
to be inverted. Doing so without checking bounds on every access makes a
big difference in non-optimized builds.
BUG=chromium:843899
Change-Id: Iecc0a3da22631a289745245563dab7a7c3c458d0
Reviewed-on: https://pdfium-review.googlesource.com/32744
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This causes a crash if running verbose mode
Change-Id: Ib5fe3dada8c81874aae110e21252edad05668a36
Reviewed-on: https://pdfium-review.googlesource.com/32737
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
This fixes two partially interrelated bugs with font loading in XFA
documents. First, it adds falling back to the builtin fonts if there
are no viable embedded or installed font for the top-level XFA font
manager. Additionally it changes the load font code path in
CXFA_FWLTheme to use the top level XFA font manager, instead of the
one that just handles the system installed fonts.
The main visible issue that this patch fixes is that currently using
--font-dir with pdfium_test on a XFA PDF can cause text to not be
displayed in widgets and/or NOTREACHED asserts. This occurs if there
isn't a needed fonts embedded in the document or in the font
directory, since currently PDFium will not correctly fall back to the
builtins.
BUG=pdfium:1008,pdfium:1020
Change-Id: I451a8aede63d639e401c0cc076443e61d8b7a2f8
Reviewed-on: https://pdfium-review.googlesource.com/32730
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Hoisted myself on this today when I was actually passing the path to
the font file I wanted to use, not the directory.
BUG=pdfium:1008,pdfium:1020
Change-Id: I4a68a7d96633e951a92125d83397ff457288b1e0
Reviewed-on: https://pdfium-review.googlesource.com/32636
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
There are several more places where the width is added to a characters
valid width in the bidi code. This CL changes all occurances to used a
check numeric.
Bug: chromium:844046
Change-Id: Idd8be3a4a576af626b5afa6f7cd04cc160b929d5
Reviewed-on: https://pdfium-review.googlesource.com/32714
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL deprecates the following APIs in favor of the more general
versions:
FPDFPath_SetStrokeColor
FPDFPath_GetStrokeColor
FPDFPath_SetStrokeWidth
FPDFPath_SetLineJoin
FPDFPath_SetLineCap
FPDFPath_SetFillColor
FPDFPath_GetFillColor
FPDFText_SetFillColor
Change-Id: Iccaa2ce26025e51366bc50e058e39650f3698836
Reviewed-on: https://pdfium-review.googlesource.com/32711
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
|
|
The LayoutProcessor is owned by the CXFA_Document. Make the ownership
explicit with an UnownedPtr.
Change-Id: I100af9e2e029e0a5db4ee365e11977016ffdcd70
Reviewed-on: https://pdfium-review.googlesource.com/32670
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
https://chromium.googlesource.com/chromium/src/third_party/freetype2.git/+log/2157d8fa6f7e..9e345c911714
$ git log 2157d8fa6..9e345c911 --date=short --no-merges --format='%ad %ae %s'
2018-05-10 alan.coopersmith Further fix to visibility flag testing with Solaris Studio compilers.
2018-05-08 wl [autofit] Avoid potential SEGV if running out of memory.
2018-05-07 madigens CMake: Allow using project as subfolder in other project
2018-05-07 wl [build] Suppress configure's `nothing to be done' message.
2018-05-04 mpsuzuki Support symbol visibility features of Sun / Oracle C compilers.
2018-05-02 madigens Unbreak CMake Windows installation
2018-05-02 wl Remove FT_CONFIG_OPTION_PIC and related code.
2018-05-01 wl * Version 2.9.1 released. =========================
2018-04-26 wl Another fix for handling invalid format 2 cmaps.
Created with:
roll-dep third_party/freetype/src
BUG=pdfium:1084
TBR=npm@chromium.org
Change-Id: I282e6c9c3cde6b3068f92461b08e14f86f033768
Reviewed-on: https://pdfium-review.googlesource.com/32712
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Doing this in the inner loops gets us another small performance
improvement.
Change-Id: I61fdf4bf8363a66123b3be3bc7ca9b5370f451fc
Reviewed-on: https://pdfium-review.googlesource.com/32710
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|