Age | Commit message (Collapse) | Author |
|
This Cl moves CXFA_WideTextRead to be in the anonymous namespace of
IFGAS_Stream and adds a IFGAS_Stream::CreateWideStringReadStream()
method.
This is done so we have all the implementations of IFGAS_Stream
centralized.
Change-Id: I9fbbf0a493fc2dd05fcd544e344268214a75d8a1
Reviewed-on: https://pdfium-review.googlesource.com/4052
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
BUG=pdfium:691
Change-Id: If6f1e200e763827ec640b2b79171f3899ea7927e
Reviewed-on: https://pdfium-review.googlesource.com/4050
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Chris Palmer <palmer@chromium.org>
|
|
This Cl removes the MakeSeekableReadStream call and, at the one place
it's used, creates an IFX_MemoryStream which is a seekable read stream.
Change-Id: I6b0b23636eff47f8caca5432313ba99703e21e4d
Reviewed-on: https://pdfium-review.googlesource.com/4037
Reviewed-by: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
To help find future bugs, add printf and checking
to see that the skia clip stack and the pdfium
clip stack are in sync.
Bug: 705783,795821
Change-Id: I3ed39cbe2514ab18e5bee6eb363cc2d0f042bff5
Reviewed-on: https://pdfium-review.googlesource.com/4090
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL removes the FGAS buffered stream. The only user was unittests
which have been converted to use a ReadStream.
Change-Id: I5af9d3bdf570a307502ea01eef6029db1c8fecef
Reviewed-on: https://pdfium-review.googlesource.com/4036
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
TBR=npm@chromium.org
Change-Id: I86451ff849644056b7d86ea642a11b5987a33830
Reviewed-on: https://pdfium-review.googlesource.com/4051
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
The pointer members point to owned arrays. Avoid FX_Free in CFX_Palette.
Use std::pair and avoid the use of a buggy quicksort.
Change-Id: I5d5471d56dbfd32800e204c84664c436d1fbab08
Reviewed-on: https://pdfium-review.googlesource.com/4038
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
BUG=pdfium:702
Review-Url: https://codereview.chromium.org/2814743003
|
|
There are only two types of streams created _File and _Buffer. This CL
simplifes the code by removing other stream types and removes code which
is for those types.
The CFGAS_Stream creation was also inverted to pass in the impl instead
of accepting and setting the stream type.
Change-Id: I73f207d0f458818ab59db915b256c6fdd633a336
Reviewed-on: https://pdfium-review.googlesource.com/4035
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
We only parse FM right before translating to JS. Our current implementation of
assignment will duplicate to first expression's ToJavascript. So having a long
chain of assignments will result in a huge ToJavascript.
Bug: chromium:665087
Change-Id: I542371b5787113be2f2d686153ed0a6c48191bab
Reviewed-on: https://pdfium-review.googlesource.com/4030
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This Cl removes all of the steam access flags other then write. Flags
which were always set were removed.
Change-Id: I96df4fa0c95d89f4f454db050f3f032bc163e498
Reviewed-on: https://pdfium-review.googlesource.com/4034
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Remove unused loading methods, fold Create method back into caller.
Change-Id: If3b7b3d1cdaf3d58fc7c07c3e96cf9ac89b61bd4
Reviewed-on: https://pdfium-review.googlesource.com/4033
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL creates a CreateReadStream and CreateWriteStream method instead
of having a single overloaded method. This removes the need for the cast
at the call sites. The access parameter has been rolled into the method
as it was always passed the same way to each Create*Stream method.
Change-Id: I845951c3fe386b8051daf4f6b2ee5ba29b5c7d54
Reviewed-on: https://pdfium-review.googlesource.com/4032
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
It's possible for the nVal to become negative as it is shifted. This Cl
changes nVal to be a checked_numeric and bails out if the shift is invalid.
Bug: chromium:708504
Change-Id: Ia2ebbc828ece7f7d443432542784b39defe6a897
Reviewed-on: https://pdfium-review.googlesource.com/4010
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
This CL removes the CreateTextStream method as it is not called.
Change-Id: I628aec2e8f488ad549b3497344ac08c5bb24de51
Reviewed-on: https://pdfium-review.googlesource.com/4014
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
The CreateShreadStream code is not called, remove.
Change-Id: I62871ce190e50598b7c82ab3b43355dbde6b8b4b
Reviewed-on: https://pdfium-review.googlesource.com/4013
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
It's possible for the RANGELEN[NTEMP] value to be larger then 32. This
will make the shift invalid if the 1 is an int. This CL changes to 1L
and uses the CheckedNumeric to validate that the result is inside the
needed range for an int.
Bug: chromium:708439
Change-Id: I1f0359985c2d7769367bd0edcf5e081f5bb58816
Reviewed-on: https://pdfium-review.googlesource.com/3991
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
Only fillable fields should show highlights. Push button should
not do that. Doing so results in lighter color or extra layer of
light color.
BUG=chromium:638626
Change-Id: I6b4d129e1f60bf44ff5a297d4b9db823d6be8079
Reviewed-on: https://pdfium-review.googlesource.com/3790
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Wei Li <weili@chromium.org>
|
|
Depending on the code table, it's possible to have the largest PREFLEN
value in the huffman table to be > 32. This will, potentially, cause the
calcuation of ((FIRSTCODE[i - 1] + LENCOUNT[i - 1]) << 1 to overflow the
int value and cause a negative shift.
This Cl checks the shift value and failes the initialization if we would
shift a negative value.
Bug: chromium:709781
Change-Id: Ia165a01ba9412e31c5e5a43717d415fcb42eafe5
Reviewed-on: https://pdfium-review.googlesource.com/3990
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
The skia build on Windows is not producing a shared .lib file when building
skia. This Cl updates the Skia component build to correctly generate the
needed shared library.
Bug: pdfium:701
Change-Id: I9545b8fcf76c8622624780ee3cc9ba794f4a842d
Reviewed-on: https://pdfium-review.googlesource.com/3971
Reviewed-by: Cary Clark <caryclark@google.com>
Reviewed-by: Wei Li <weili@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Change pass by reference to const reference or pointer.
Change-Id: Ic007f14e6569679a846980a96cc627eac4ecd5d6
Reviewed-on: https://pdfium-review.googlesource.com/3953
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
m_Transparency is set in the Init method of the CFX_ScanlineCompositor. After
the removal of the icc transform, it is clear that m_Transparency can only take
values strictly less than 64.
Change-Id: I6c33b9971b3b8a1ec45fbf50901f9815f323a2a5
Reviewed-on: https://pdfium-review.googlesource.com/3970
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
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: I9c05ddc2ca2e3377cc8a9d13c3e4faa2f17a49a5
Reviewed-on: https://pdfium-review.googlesource.com/3930
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
Check out libjpeg-turbo via DEPS.
Also checkout yasm via DEPS and copy some yasm build files from
Chromium.
BUG=chromium:541704,pdfium:389
Change-Id: Ic7af415f002a3ca2acd9223ed3474dedf3930b32
Reviewed-on: https://pdfium-review.googlesource.com/3470
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@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>
|
|
Change-Id: Iff738c99fb4fe38d35515c280057b489624d734f
Reviewed-on: https://pdfium-review.googlesource.com/3752
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
v8_enable_inspector was removed recently. Clean up remnants.
BUG=645890
TEST=none
Change-Id: I501d33bfaa1bf0a03f83b9ed3b4b183301d38d63
Reviewed-on: https://pdfium-review.googlesource.com/3871
Reviewed-by: Nicolás Peña <npm@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Commit-Queue: Nicolás Peña <npm@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>
|
|
This CL changes m_pStart and m_pEnd to FX_FILESIZE. This is the appropriate
type because the values are used as such by the CFDE_XMLParser.
Change-Id: I6988c5e520f52c39053d682d9e2ce713883c8b54
Reviewed-on: https://pdfium-review.googlesource.com/3850
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This Cl updates the m_pBuffer pointer to a vector.
Change-Id: Ib971d224376122a1d5ebf5bb0e712db552df2342
Reviewed-on: https://pdfium-review.googlesource.com/3815
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
No caller cares about the exception values anyway. Remove the unused
ones. Also use more std::unique_ptr to stop potential leaks.
Change-Id: Ic5955fb0d879f55e1c6a005c0204df50246dab19
Reviewed-on: https://pdfium-review.googlesource.com/3715
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@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>
|
|
This Init() method is always called right after construction. Merge
together for clarity.
Change-Id: Iab5bfe937e82b7a310e373dd139399bc1be7cea6
Reviewed-on: https://pdfium-review.googlesource.com/3814
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I0b52246e72fb2243288e8edef361d47bc00b9469
Reviewed-on: https://pdfium-review.googlesource.com/3812
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This Cl updates the CFDE_XMLSyntaxParser to return strings instead of
taking out parameters.
Change-Id: I51124d8d961c00a72987c1a21025d0626b965fab
Reviewed-on: https://pdfium-review.googlesource.com/3754
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
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>
|