Age | Commit message (Collapse) | Author |
|
This CL adds the ability to extract the title from a tagged structure element if
one exists.
Bug: pdfium:672
Change-Id: I22e2a8371db4f08b8a70dd77002f1befab97f530
Reviewed-on: https://pdfium-review.googlesource.com/3819
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Also use safe arithmetic for two-arg ctor.
Change-Id: I5d541d9b2d5fe5b939f4cc8c22cf034f5cb01176
Reviewed-on: https://pdfium-review.googlesource.com/3955
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Return strings where possible.
Add missing consts to strings passed by ref.
Convert non-const cases to pointers.
Rename a few methods to be clearer.
Change-Id: I86569bc1744f539e6dd67fc73649b272c016328c
Reviewed-on: https://pdfium-review.googlesource.com/3951
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
Pass in/out argument as a pointer.
Avoid pointless malloc just to copy in multibyte case. Then we can
avoid special-casing the single-byte case.
Change-Id: I3dd2d57e08ef6ad7b78ea38398b228fa41a9b3e6
Reviewed-on: https://pdfium-review.googlesource.com/3950
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
- All callers of CFX_DIBitmap methods use nullptr as the ICC Transform.
- The CFX_ScanlineCompositor is always initialized with a null ICC transform.
Many of its methods call TranslateScanline from the ICC module. This method
casts just uses ((CLcmsCmm*)pTransform)->m_hTransform, and this should not be
done when pTransform is nullptr.
Change-Id: I1b846d1f20699fa017cb9a276be3214eb8fabd4b
Reviewed-on: https://pdfium-review.googlesource.com/3931
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Repeated looping over Realloc() with a linearly increasing buffer
size is going to be O(N^2) which is why it was limited to small
cases. But it's wrong to do it anyways, and it kicks out a
lurking issue in PartitionAlloc as it turns out.
See https://crbug.com/709271, but this doesn't actually fix that
issue, it just avoids it.
Change-Id: I39d8f8df0d5fc358b7b9caa15c507a8f57e45004
Reviewed-on: https://pdfium-review.googlesource.com/3910
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: Ia4181a2838de60e4e177165b3689338c86f45771
Reviewed-on: https://pdfium-review.googlesource.com/3817
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
Tests need to be subclasses of FPDF_Test.
BUG=pdfium:700
Change-Id: I317ec2c49567e58cb57c6222e387574226f594b3
Reviewed-on: https://pdfium-review.googlesource.com/3890
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Chris Palmer <palmer@chromium.org>
|
|
Remove default params, use more unique_ptr, and fix some nits.
Change-Id: I4ed9a576fb3ebd9afd64c6544d1f6a1103e9d270
Reviewed-on: https://pdfium-review.googlesource.com/3872
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
Change-Id: I1e0b84a8b208d92aff3f02b6461b3a20f60f4d1e
Reviewed-on: https://pdfium-review.googlesource.com/3870
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
This Cl removes a bunch of unused tagged code. Some of this will need to come
back in the future (like the attr code) but we can add it back with tests when
needed.
Bug: pdfium:672
Change-Id: I7aaed79963910b336f42ce665790408038c39ba4
Reviewed-on: https://pdfium-review.googlesource.com/3830
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL removes the IPDF_Struct* classes in favour of their only implementation.
The tagged code was split out into files matching the classes they contain. The
friendship between CPDF_StructTree and CPDF_StructElement was broken in favour
of accessors.
Bug: pdfium:672
Change-Id: Iade83b608fb7168b3b0f41338d10d5fd8ab91a6e
Reviewed-on: https://pdfium-review.googlesource.com/3820
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This Cl removes the reference to the length of the CFX_BlockBuffer that
was stored and manipulated in CFDE_XMLSyntaxParser. Methods have been
added to BlockBuffer to satisify the usages in the syntax parser.
Change-Id: I1107c343ce267283c4c45aa3ae1bbfa93c24079f
Reviewed-on: https://pdfium-review.googlesource.com/3816
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
Change-Id: I149718bbdb7195223012150d6162d73cbeb3b8cc
Reviewed-on: https://pdfium-review.googlesource.com/3813
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Nicolás Peña <npm@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>
|
|
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>
|
|
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>
|
|
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 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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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=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>
|
|
BUG=pdfium:688
Change-Id: I7787b29d0fedc48f1360ab041d43829d0e805462
Change-Id: I7787b29d0fedc48f1360ab041d43829d0e805462
Reviewed-on: https://pdfium-review.googlesource.com/3331
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
Remove dependency on fx_stream.h from fx_safe_types.h.
We're going to hit cylces in include file dependencies
otherwise when the partition allocator work is landed.
Change-Id: I35bf78038a08599559b959f1403aa0f8fbf87739
Reviewed-on: https://pdfium-review.googlesource.com/3552
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|