Age | Commit message (Collapse) | Author |
|
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>
|
|
Precursor to testing app.beep() in chrome's browser tests.
Change-Id: I09ef497bd6a8094e389783b144fa04c9230cbe3d
Reviewed-on: https://pdfium-review.googlesource.com/32550
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
This CL separates the parts of CPDF_ContentParser::Continue into three
distinct methods. It clarifes when and what is returned from Continue.
Change-Id: Id7a9bf1aa16f366f567cce74006c27c452cb5dcc
Reviewed-on: https://pdfium-review.googlesource.com/32531
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Use the same limit as JBIG2 codecs.
BUG=chromium:834633
Change-Id: I11d12c841e10ab48fd85df792bf8a034fe40493c
Reviewed-on: https://pdfium-review.googlesource.com/32514
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
In case there are long runs of data to be skipped, FindBit() runs much
faster reading and comparing 8 bytes at a time.
BUG=chromium:834633
Change-Id: Ifc7b348d123c5a72cf09fbf53d764075f8abfba0
Reviewed-on: https://pdfium-review.googlesource.com/32513
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Get rid of a few more fxbarcode exception codes.
Change-Id: Ia9c9cdcef581174e25be8dc2fba181915dc6d729
Reviewed-on: https://pdfium-review.googlesource.com/32471
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Change-Id: Ibc446d9f4606d29f997ee3521f31f0fbcf1ad84b
Reviewed-on: https://pdfium-review.googlesource.com/32176
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Break out parts of ProcessTextObject() into helper functions.
Change-Id: I76ad141728ce77e8d24d7dc9635722d670663f39
Reviewed-on: https://pdfium-review.googlesource.com/32175
Reviewed-by: Ryan Harrison <rharrison@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>
|
|
This CL switches the usage of wcstod to use the FXSYS_wcstof to
determine if a given string is a valid floating point number.
Using the internal method makes linux slightly slower (10's of ms)
makes mac a lot faster 900ms to 60ms for the test case in the bug.
The FXSYS_wcstof method has been extended to handle the parsing of
float exponents. Unittests were added for FXSYS_wcstof.
Bug: chromium:813646
Change-Id: Ie68287a336e3b95a0c0b845d5bf39db6fc82b39c
Reviewed-on: https://pdfium-review.googlesource.com/32510
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Bug: 840922
Change-Id: I984db568153bd55eff6d217e6a5219fd8a32c947
Reviewed-on: https://pdfium-review.googlesource.com/32470
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: Ia3a79aa7cc65aaecd1b0f0a5ea07df4e9d33a012
Reviewed-on: https://pdfium-review.googlesource.com/32396
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: Ic39b843ab21e7eb738849511a5187822ad49d67a
Reviewed-on: https://pdfium-review.googlesource.com/32413
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|