Age | Commit message (Collapse) | Author |
|
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>
|
|
The reason for calling ReleaseBindingNodes() has changed but the code
comment hadn't. This CL updates the code comment to make it clearer why
this release has to happen.
Change-Id: I0c08c7580ef7c8508cd4db7b8930d5f2cd595b1b
Reviewed-on: https://pdfium-review.googlesource.com/32690
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
CJBig2_Image::ComposeFrom() wraps a call to ComposeTo() and does an
extra validity check. In tight loops where the validity check will
always succeed, this is wasteful. Change existing callers of
ComposeFrom() to ComposeTo() when the validity check has already been
done.
BUG=chromium:840728
Change-Id: I39fb42eea49b92b7804cbd42c3d8a0329edeb58d
Reviewed-on: https://pdfium-review.googlesource.com/32637
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
This class is used heavily by CFX_ImageTransformer and fmodf()
calculations are expensive.
Change-Id: If2b9037eb2e90ae377ffb490483a7e7e4faf63b2
Reviewed-on: https://pdfium-review.googlesource.com/23176
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: Ib44a6b7bd19625a4081322d2471551bec894abd8
Reviewed-on: https://pdfium-review.googlesource.com/32638
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This CL changes several of the JS execution methods to to return an
Optional<IJS_Runtime::JS_Error> instead of a bool with a WideString
out param.
The IJS_Runtime::JS_Error will contain the line, column and exception message
if an error occurs during execution.
Change-Id: I37785ae6cd133a4c94ad8d25289473600b8a5d19
Reviewed-on: https://pdfium-review.googlesource.com/32614
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
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 changes the table information so it can be indexed, and allows
moving all of the information to the CJBig2_HuffmanTable implementation,
which is the only real user of the data.
Change-Id: I88780bee32c8509198518fd3b1e82d68ae7ff707
Reviewed-on: https://pdfium-review.googlesource.com/32635
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Currently the PartitionRealloc code path will only exit, with no
option to return nullptr on failure, unlike PartitionAlloc code path.
This CL refactors the realloc code path to be similar to alloc code
path, following the upstream patch:
https://chromium-review.googlesource.com/c/chromium/src/+/1044971
This also changes the version of realloc exposed to third party C libs
to have the nullptr behaviour, like the exposed version of alloc.
This CL is a redo of
https://pdfium-review.googlesource.com/c/pdfium/+/31990
BUG=chromium:783022
Change-Id: Ib1b659079585dfd0423d683b8a2c7b6758a22a01
Reviewed-on: https://pdfium-review.googlesource.com/32613
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Chris Palmer <palmer@chromium.org>
|
|
Pick up https://crrev.com/515947 and https://crrev.com/542972
Change-Id: Idccd388ee2f9cc71ace7ed5f598c820754e87b6e
Reviewed-on: https://pdfium-review.googlesource.com/32631
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Bug: pdfium:1085
Change-Id: I62c526ae865f0cadfddd2e75a616bce73de0f88d
Reviewed-on: https://pdfium-review.googlesource.com/32632
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
They are not used outside of it.
Change-Id: I0baa84c5a015621bc0ba211c2ddb01608997dc7d
Reviewed-on: https://pdfium-review.googlesource.com/32633
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: Ibbc020393e38405f9d1cb0d483ef875777d4e721
Reviewed-on: https://pdfium-review.googlesource.com/32650
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Remove some unused args along the way.
Change-Id: I234a674d4d6cc79b33087bc850f5df36bae25870
Reviewed-on: https://pdfium-review.googlesource.com/32596
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
FindBit() is called frequently by other fax codec code. Use 16 more
bytes of space to store the two possible values memset() can set.
Change-Id: Ibeb549c44928bbb468ac4eb4cef2d9339cf6490d
Reviewed-on: https://pdfium-review.googlesource.com/32630
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Bug: pdfium:1085
Change-Id: I121152527333e143d23e7cb852c8c1a745026453
Reviewed-on: https://pdfium-review.googlesource.com/32618
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
We never use the return values of these methods, switch to void from
bool.
Change-Id: I8b0d96e5be90ac08281bbb82d2c7205d94abea2b
Reviewed-on: https://pdfium-review.googlesource.com/32616
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I959fe5dc30fcfe2176c7e5a64b07d082313a22b4
Reviewed-on: https://pdfium-review.googlesource.com/32595
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Use the system ICU header when USE_SYSTEM_ICUUC is defined.
Change-Id: Ieeb0e4a11ae86da871644dd0fd84de07e9917fde
Reviewed-on: https://pdfium-review.googlesource.com/32490
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This CL cleans up the CPDF_ContentParser code. The m_bIsDone flag has
been removed and a kComplete stage added. Each of the processing methods
returns the next stage instead of setting the internal flag
automatically. The infinite loop is removed for simpler straight line
code.
Change-Id: Id817a5fa054e28c331c68c63ec2c12b369cb0233
Reviewed-on: https://pdfium-review.googlesource.com/32611
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Provides more lifetime/bounds checking "for free".
Change-Id: Ifaf7a95c0f6f288777cd6ef35996e01b3dc4bc63
Reviewed-on: https://pdfium-review.googlesource.com/32594
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
The CFX_BidiLine class is just a thin wrapper to hold a set of methods.
This CL moves the methods into the anonymous namespace and calls them
directly from FX_BidiLine.
Change-Id: Iea2ba178fb08339445702c9af4251f3c8ba2beb6
Reviewed-on: https://pdfium-review.googlesource.com/32617
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL converts the WidetextBuf reference to a pointer in the formcalc
ToJavaScript methods.
Change-Id: Ia05c7255a99a2eaa3d9a57f77580969896ad90a0
Reviewed-on: https://pdfium-review.googlesource.com/32612
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL adds verification to the m_iWidth value when adding the
characters width.
Bug: chromium:843096
Change-Id: I7b2e7b1e786a9cba77f5aceafbb5d2bf13dc8eb9
Reviewed-on: https://pdfium-review.googlesource.com/32610
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL verifies that the provided BidiPos is within the acceptable size
for the vector before accessing.
Bug: chromium:843100
Change-Id: I2955a3ca628b19ee51dd4233726b859729c125af
Reviewed-on: https://pdfium-review.googlesource.com/32593
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Remove the unused GetChar method and GetPiece method from CFX_BreakLine.
Change-Id: Ieee8e7b20513b37537d304e2bff46f0d1629576c
Reviewed-on: https://pdfium-review.googlesource.com/32592
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL inlines the call to pdfium::CollectionSize for the one usage of
CFX_BreakLine::CountPieces.
Change-Id: I7eb64486c0a84c329d773f6d55ae277604098baf
Reviewed-on: https://pdfium-review.googlesource.com/32591
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
The CFX_BreakLine::CountChars is a thin wrapper around getting the size
of the m_LineChars vector. This CL removes CountChars and uses the
vectory directly.
Change-Id: I6b172c090aa7acf3282df517a8ae2bbdd55ff15b
Reviewed-on: https://pdfium-review.googlesource.com/32590
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I1d2a91619a1c944b6fdca00b2f9c5bb338326986
Reviewed-on: https://pdfium-review.googlesource.com/32572
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
When detecting the exponent on a floating point number, cap the maximum
amount we'll multiply by otherwise we can get excessivly large numbers.
Bug: chromium:843074
Change-Id: I6a8d1b4c20b66e305d2727f464119b1e74beb699
Reviewed-on: https://pdfium-review.googlesource.com/32570
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Also format the trailer in a cleaner multi-line format.
Change-Id: If145834b56f8678f97247b346cc0cfd4d367c501
Reviewed-on: https://pdfium-review.googlesource.com/32571
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|