Age | Commit message (Collapse) | Author |
|
In TIFFFillStrip, calls to TIFFReadBufferSetup may allocate large amounts of
memory. In this CL we do sanity checks on the claimed size of the raw strip
data before that happens, to prevent out-of-memory.
Bug: chromium:707431
Change-Id: I4e7c9a8630fad11d4f68a3ceccd71ffa511f4293
Reviewed-on: https://pdfium-review.googlesource.com/3811
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
If windows is unable to resolve the font stream,
use the custom empty handler instead, which
maps to freetype.
R=dsinclair@chromium.org,bungeman@google.com
Bug:chrome:705580
Change-Id: Ib1732f29f462fc5d5e42329088c80c83abe3ea25
Reviewed-on: https://pdfium-review.googlesource.com/3771
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Cary Clark <caryclark@google.com>
|
|
Bug: 708383
Change-Id: I6d59fb40bbddd4bdc7224d72bfb789d360f029ca
Reviewed-on: https://pdfium-review.googlesource.com/3770
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This CL moves the attribute handling out of CFDE_XMLElement and
CFDE_XMLInstruction into a common CFDE_XMLAttributeNode. The handling is
also converted to a std::map from either a) a vector storing
name,value,name,value or b) two vectors one for names and the other for
values.
The unused Get/Set methods for interger and float are removed and the
iteration is converted to use iterators.
Change-Id: Icda00ae898a595d58b06af0ced337f55f47c317c
Reviewed-on: https://pdfium-review.googlesource.com/3753
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This Cl adds a --show-structure to pdfium_test which will dump out the
StructElement items for the selected pages.
Bug: pdfium:672
Change-Id: I90aceda71c13c54abfe4ac242a62375643cdfd9d
Reviewed-on: https://pdfium-review.googlesource.com/3750
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
It was already possible to set the fill color, this is the other
direction.
Change-Id: Id53f3c9969ca036ec1f9383a2cdbaf224395215f
Reviewed-on: https://pdfium-review.googlesource.com/3690
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
Sigh, messed up std::min conversion.
TBR=npm@chromium.org
Bug: pdfium:697
Change-Id: I0091f178b08fa537ebc3962d9349eb46d0aa8a80
Reviewed-on: https://pdfium-review.googlesource.com/3751
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
When fixing https://crbug.com/672177 we added a guard that we aren't
reading off the end of the file. That guard used the file access
Position(). This is the wrong value to compare against as our read
position and the file access Position may be different. This CL updates
the check to use the correct current file position.
Bug: pdfium:697
Change-Id: I68a5eaed2f1f3d65422605f0a8474144cfa7d172
Reviewed-on: https://pdfium-review.googlesource.com/3711
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Use std::vector and return booleans results when possible.
Change-Id: If3ce4559f137fb449fd1ab818750558a1b5f8df0
Reviewed-on: https://pdfium-review.googlesource.com/3561
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Combine some common CCodec_Jbig2Module code.
Change-Id: I9a046314bc0e9dddc9a8c1a06b37764e9f3cc4b6
Reviewed-on: https://pdfium-review.googlesource.com/3713
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
This CL removes dib_int.h by moving CStretchEngine to its own file, other
classes to where they are used, and the remaining to fx_dib.h.
Change-Id: Ie2d4bb39389737cd631f92b88000ea942608da21
Reviewed-on: https://pdfium-review.googlesource.com/3714
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
Pass stream argument to constructor; it feels like a
stream accessor should always be made from a stream rather
than passing one in after the fact.
Change-Id: Iaa46cb37677b81f0170f5d39bab76ad38ea4af44
Reviewed-on: https://pdfium-review.googlesource.com/3620
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Pick up updated baselines for bug_511_jbig_null_crash.pdf, and updated
PRESUBMIT.py.
BUG=pdfium:511
TBR=tsepez@chromium.org
Change-Id: I881b218b02751f3a52e6f6ff44b59108aafdf282
Reviewed-on: https://pdfium-review.googlesource.com/3710
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Instead of storing the same constants as strings and converting them to
uint64_t.
Change-Id: Ib32b0f721303f917e197cf93999857a7ee745823
Reviewed-on: https://pdfium-review.googlesource.com/3621
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This Cl switchs CFDE_XMLCharData to subclass CFDE_XMLText and cleans up
the code which was the same except for the accessor names.
Change-Id: I85ebf4f3f19f0d15be4dd77a71b89ca8083f4b1e
Reviewed-on: https://pdfium-review.googlesource.com/3672
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
This was just used as the parent to CFDE_XMLCharData but didn't override
anything over CFDE_XMLNode. Switch CFDE_XMLCharData to inherit from
CFDE_XMLNode and remove CFDE_XMLDeclaration.
Change-Id: Ide7507c0d4a6886331b6cebeae0bd7f9e9d738fb
Reviewed-on: https://pdfium-review.googlesource.com/3671
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL cleans up default parameters, return values and bits of code
formatting in the CFX_BlockBuffer code.
Change-Id: Ie7fd7d86046f716d0786213735ad464eefc58dbb
Reviewed-on: https://pdfium-review.googlesource.com/3670
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Remove a bunch of unused code, including gotos.
Fix some potential memory leaks.
Change-Id: Ia2775e2ab176f4741b765e259a24a293a5717394
Reviewed-on: https://pdfium-review.googlesource.com/3560
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL avoids some void* usage and removes CancelDIBits after making a
CPDF_ImageRenderer own its CFX_ImageRenderer.
Bug: pdfium:686
Change-Id: Ied205c57a858cc14d8e2c592db3444ed465b2796
Reviewed-on: https://pdfium-review.googlesource.com/3673
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
Make the IccProfile track its stream so that it has a
proper key with which to purge the docpagedata map.
Change-Id: Ib05ebc1afb828f1f5e5df62a1a33a1bfdecf507d
Reviewed-on: https://pdfium-review.googlesource.com/3619
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
After this CL, fx_dib.h only has some definitions used in multiple places.
Definitions that were of restricted usage were moved out to the corresponding
place. Includes in fx_dib were reduced, thus revealing other needed includes.
Change-Id: I3607da0af81c491256d64c0aa085225631efbdcc
Reviewed-on: https://pdfium-review.googlesource.com/3594
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This CL adds a FPDF_StructElement_GetType method to get the type of a given
tagged struct. This corresponds to the /S key in the structure element
dictionary. See PDF1.7 Table 10.10.
Bug: pdfium:672
Change-Id: I313eb886dc9623715995d73a76bce01ba9985e4b
Reviewed-on: https://pdfium-review.googlesource.com/3623
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
This can be used to build only the PDFium targets, and skip targets from
projects PDFium depends on, like V8, when one builds "all" targets.
Change-Id: I25b8cd8ac946f6a28adb109d7b175b8a69f9f3d7
Reviewed-on: https://pdfium-review.googlesource.com/3562
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: Icf6b0ec88dfc8dc707b18ca4ad25dd77610b4c91
Reviewed-on: https://pdfium-review.googlesource.com/3622
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Move as much as possible into anonymous namespaces.
BUG=pdfium:388
Change-Id: I7cca042736372c52105ed2ef1f9945a8d72c3db2
Reviewed-on: https://pdfium-review.googlesource.com/3557
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: Iaea91df0300b55e35cbfd9b3f3389b3e291eae9b
Reviewed-on: https://pdfium-review.googlesource.com/3618
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Prefer internal refcounts to external scheme.
Change-Id: Ia99d5fc635a51a38f41b1d64ea44d8202685ddc7
Reviewed-on: https://pdfium-review.googlesource.com/3617
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Prefer internal reference counts over ad-hoc schemes.
Change-Id: I8d420e9e9827ac39fdc0bc8146a532caeee10f26
Reviewed-on: https://pdfium-review.googlesource.com/3615
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
This Cl splits the fde_xml_int file apart into individual class files.
Includes are fixed as needed. fde_xml.h is also removed and the needed
defines moved to more appropiate places.
Change-Id: I29774dabc4d0fb2d5092fcbbe7853f03401b6ec7
Reviewed-on: https://pdfium-review.googlesource.com/3616
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This Cl drops the FXSYS_ from utility methods which are the same on all
platforms.
Bug: pdfium:694
Change-Id: I0859b60c5ba7af68c929a519dd76f48c27a6c896
Reviewed-on: https://pdfium-review.googlesource.com/3614
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This Cl drops the FXSYS_ from mem methods which are the same on all
platforms.
Bug: pdfium:694
Change-Id: I9d5ae905997dbaaec5aa0b2ae4c07358ed9c6236
Reviewed-on: https://pdfium-review.googlesource.com/3613
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This Cl drops the FXSYS_ from wide string methods which are the same on
all platforms.
Bug: pdfium:694
Change-Id: I46a7af5913e7897f7c4ba712a76540c12105818f
Reviewed-on: https://pdfium-review.googlesource.com/3611
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This Cl drops the FXSYS_ from file methods which are the same on all
platforms.
Bug: pdfium:694
Change-Id: I095c64fed69bf70e00a2594fa94a1fdc71a7060e
Reviewed-on: https://pdfium-review.googlesource.com/3610
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This Cl drops the FXSYS_ from math methods which are the same on all
platforms.
Bug: pdfium:694
Change-Id: I85c9ff841fd9095b1434f67319847ba0cd9df7ac
Reviewed-on: https://pdfium-review.googlesource.com/3598
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I327a3f94cf6f00366d7a78ed9f973d00f702f397
Reviewed-on: https://pdfium-review.googlesource.com/3559
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
We need to oversize the buffer and then fail to format. Use an
invalid character conversion to trip this up.
Bug: 707479
Change-Id: I7c1d97f0351d76af8fddf74a1cdf05f49c6b1cf7
Reviewed-on: https://pdfium-review.googlesource.com/3612
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
This Cl drops the FXSYS_ from string methods which are the same on
all platforms.
Bug: pdfium:694
Change-Id: I1698aafd84f40474997549ae91ce35603377e303
Reviewed-on: https://pdfium-review.googlesource.com/3597
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I8872aae5088fb4f721207106d8f2c863828cd199
Reviewed-on: https://pdfium-review.googlesource.com/3558
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Bug: 707479
Change-Id: I6deea8ca2408df8715e639c8ff161cbb3d5f8296
Reviewed-on: https://pdfium-review.googlesource.com/3595
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Move more classes into their own files.
Change-Id: Ic505be9e406eafb378235216ea19221ce172f32e
Reviewed-on: https://pdfium-review.googlesource.com/3593
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Cleanup some unused methods, add some missing #ifdef comments.
Bug: pdfium:694
Change-Id: I019a03f7a55d1d4a23300ff822ae30dde4406c3d
Reviewed-on: https://pdfium-review.googlesource.com/3596
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
- Moved CFX_DIBitmap code to its own cpp file.
- Moved CFX_DIBExtractor out from fx_dib.h
Change-Id: I7b3fe9c657a350320b7ecb3f005017080491fe29
Reviewed-on: https://pdfium-review.googlesource.com/3591
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
The possible return values were already part of the public header in the
form of a set of defines.
Change-Id: I040e0f330fdd7a3cd29f74fc6ee06d122afd2dd0
Reviewed-on: https://pdfium-review.googlesource.com/3570
Reviewed-by: Nicolás Peña <npm@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I51bdba3e3d48533398618942669cf5ea93bb2f9a
Reviewed-on: https://pdfium-review.googlesource.com/3590
Commit-Queue: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Remove the old externally-counted CPDF_CountedImage type.
Change-Id: Ia0b288586272da3f2daf7dfc153f08e62794321a
Reviewed-on: https://pdfium-review.googlesource.com/3553
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
After moving to a DEPS based FreeType checkout, integration with
Chromium no longer works correctly when pdf_bundle_freetype is set
to true, because relative paths would point to
third_party/pdfium/third_party/freetype, and that no longer exists.
BUG=pdfium:688
TBR=drott@chromium.org,dsinclair@chromium.org,npm@chromium.org
Change-Id: I346072ddc1052d25be58ca1610f6d1c002fc03ef
Reviewed-on: https://pdfium-review.googlesource.com/3556
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
BUG=pdfium:681
Change-Id: Ic40ed9409855097d823659f710cdf7cd96a21e83
Reviewed-on: https://pdfium-review.googlesource.com/3554
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
BUG=pdfium:681
Change-Id: Ide52764c7c7e8833c581dbc9d41ed875faa2c2bc
Reviewed-on: https://pdfium-review.googlesource.com/3555
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
BUG=chromium:541704
Change-Id: I313d8853450ff5940b3baa4054ff441b342c46b7
Reviewed-on: https://pdfium-review.googlesource.com/3350
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
Moved CFX_ImageRenderer, CFX_ImageTransformer to their own files.
Change-Id: Ic98403f62bea317600a933f79946a2a9bad30eeb
Reviewed-on: https://pdfium-review.googlesource.com/3551
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|