Age | Commit message (Collapse) | Author |
|
Moved everything from core/fxcodec/lgif to core/fxcodec/gif
Converted CGifContext -> CFX_GifContext
Removed _ptr suffixes from CXF_GifContext
Movef fx_gif.* -> cfx_gif.*
Renamed structs in cfx_gif.h
Renamed members of CFX_GifImage
Renamed members of CFX_GifContext
Renamed CFX_LZWDecoder -> CFX_LZWDecompressor
BUG=pdfium:903
Change-Id: I537e905e935da26832e6bbdc03e0373ed5500bcb
Reviewed-on: https://pdfium-review.googlesource.com/14990
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This CL moves the CFX_Font definition out of fx_font.h and into
cfx_font.h to match the cfx_font.cpp implementation.
Change-Id: Icc2fc7463fa4b9d0bec925e80b60a638136a83a1
Reviewed-on: https://pdfium-review.googlesource.com/14951
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
This string is set, but never used.
BUG=pdfium:907
Change-Id: I57555d0dd3670b245554ff2d7163d1d04bcdb7e8
Reviewed-on: https://pdfium-review.googlesource.com/14930
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
This CL converts typedefs to using statements, removes unused defines
and changes c-style casts to static_cast or reinterpret_cast as needed.
Change-Id: Id700eed82a7e59574b0769567084ee442e56b151
Reviewed-on: https://pdfium-review.googlesource.com/14950
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
With the conversion of internal string sizes to size_t, these wrappers
are no longer needed. Replacing them with strlen and wcslen
respectively.
BUG=pdfium:828
Change-Id: Ia087ca2ddaf688a57ec9bd9ddfb8533cbe41510d
Reviewed-on: https://pdfium-review.googlesource.com/14890
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
BUG=pdfium:828
Change-Id: If9560338c456b28f968e743a90a3629791d87df0
Reviewed-on: https://pdfium-review.googlesource.com/14832
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
BUG=pdfium:828
Change-Id: I5c40237433ebabaeabdb43aec9cdf783e41dfe16
Reviewed-on: https://pdfium-review.googlesource.com/13230
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
A lot of the structs in the GIF code use acronyms that are non-obvious
unless you are familar with the GIF spec, and even then lead to lots
of looking back. Making the naming more explicit. Also converted
GifImage to be a struct, since it didn't have any methods defined for
it.
BUG=pdfium:903
Change-Id: I97ca2adfdc4ada8bcaef5f8f317c1dea7365d70d
Reviewed-on: https://pdfium-review.googlesource.com/14836
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
This was causing us to use the local palette values when they didn't
exist, instead of the global palette values.
BUG=chromium:769292
Change-Id: I02d19cbcf0cf9e362e123fc7648d8f47991b8155
Reviewed-on: https://pdfium-review.googlesource.com/14910
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
This CL removes unreachable code and also removes the flag
Icc_Format_DEFAULT which becomes unused.
Bug: chromium:346399
Change-Id: I1cdd0f70ffec2abcd20ddf5b181273971b92ecaa
Reviewed-on: https://pdfium-review.googlesource.com/14850
Commit-Queue: Nico Weber <thakis@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
|
|
This CL renames the FX_OS defines to have _OS_ in their names and drops
the _DESKTOP suffix. The FXM defines have been changed to just FX.
Change-Id: Iab172fba541713b5f6d14fb8098baf68e3364c74
Reviewed-on: https://pdfium-review.googlesource.com/14833
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
The _FX_IOS_ define is never defined, so it isn't useful to check
_FX_OS_ against. Remove.
Change-Id: I90b50a1a0dc165073ed223cbfe861b9a227818dd
Reviewed-on: https://pdfium-review.googlesource.com/14831
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Several of the OS checks were mis-typed as FX_WIN64 instead of
FX_WIN64_DESKTOP. This CL updates the defines to check for the correct
OS define.
Bug: pdfium:906
Change-Id: Ib58a6472d1bc26c34d509edf32ac00b18d852a3b
Reviewed-on: https://pdfium-review.googlesource.com/14813
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Previous implementation assumed that if the local colour palette was
not specified and the global palette had its size specified, then use
the global. If the global palette is disable, it will not have data,
but it may have a size. Technically the size is giberish in this case,
but the value is allowed to be non-zero, so isn't a sufficient check.
BUG=chromium:768089
Change-Id: Iaec15fcd65f3983056df7d56d29118a516334cd9
Reviewed-on: https://pdfium-review.googlesource.com/14819
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
CGifLZWDecoder has been moved out into its own file, name changed to
CFX_LZWDecoder, member variable names updated, creation pattern
changed, and unit tests added.
Wrt the creation pattern, there is no longer a constructor and 2
initialization methods that need to be called. Instead all of the
initialization is done as part of the constructor. A wrapper has been
added for generating a std::unique_ptr<CFX_LZWDecoder>, so that params
can be validated.
BUG=pdfium:900,pdfium:901,pdfium:903,pdfium:904
Change-Id: Idcbe773f7fb18b08e64d5a89bfd87d4801332c53
Reviewed-on: https://pdfium-review.googlesource.com/14814
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
The CFX_SizeGlyphCache is only used internally by the CFX_FaceCache.
This CL moves the definition to that file and removes fx_text_int.h
Change-Id: I38f26f437f0eaa72492995ae7442d5c38ed2f229
Reviewed-on: https://pdfium-review.googlesource.com/14771
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
The CFX_UniqueKeyGen struct is only used in cfx_facecache.cpp. This CL
moves the struct to the anonymous namespace of that file.
Change-Id: I1ec85126070e2e0446abc5639cea8465cb490f1a
Reviewed-on: https://pdfium-review.googlesource.com/14770
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
There are a number of functions in fx_gix.h/.cpp that take in a
pointer to a CGifContext as their first parameter. Moving these to be
methods in that class.
BUG=pdfium:902
Change-Id: I8c583ab9e42dda4241aa8a6f865408a94fa6d273
Reviewed-on: https://pdfium-review.googlesource.com/14670
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
The core fix in this CL is a change to how LWZ decompression works, so
that when the min code table size and the color palette size are
different, color codes after the end of the defined color palette are
considered errors.
This CL also introduces a bunch of tweaks to the call return path,
since there were multiple locations where the GIF decode failing
status was being dropped on the floor, so the end widget would have a
bitmap with the default colour in it, instead of nothing.
BUG=chromium:616671
Change-Id: Id6f40d552dc24650c91e9903f710ff2fa63bc774
Reviewed-on: https://pdfium-review.googlesource.com/14630
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: Ia8fd1893f862391fbada396f505ac16985b59cd6
Reviewed-on: https://pdfium-review.googlesource.com/12850
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This CL renames CFX_WeakPtr to WeakPtr and moves into the fxcrt
namespace.
Bug: pdfium:898
Change-Id: Ide50a8afeb1e987c48c8fbd103898745c9199d6a
Reviewed-on: https://pdfium-review.googlesource.com/14621
Commit-Queue: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL moves CFX_UnownedPtr to UnownedPtr and places in the fxcrt
namespace.
Bug: pdfium:898
Change-Id: I6d1fa463f365e5cb3aafa8c8a7a5f7eff62ed8e0
Reviewed-on: https://pdfium-review.googlesource.com/14620
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL moves CFX_StringPoolTemplate to StringPoolTemplate and places in
the fxcrt namespace.
Bug: pdfium:898
Change-Id: I41c8f23d6ad814d65cd154092143efaa630a96d1
Reviewed-on: https://pdfium-review.googlesource.com/14619
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL renames CFX_StringDataTemplate to StringDataTemplate and moves
into the fxcrt namespace.
Bug: pdfium:898
Change-Id: I1c1e5ae674c3cca34fd595272e9eebc9346ed6ac
Reviewed-on: https://pdfium-review.googlesource.com/14618
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL renames CFX_SharedCopyOnWrite to SharedCopyOnWrite and moves to
the fxcrt namespace.
Bug: pdfium:898
Change-Id: Iced796b9f341407720e2a88f11d1916df56fe68c
Reviewed-on: https://pdfium-review.googlesource.com/14617
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL renames CFX_RetainPtr to RetainPtr and places in the fxcrt
namespace.
Bug: pdfium:898
Change-Id: I8798a9f79cb0840d3f037e8d04937cedd742914e
Reviewed-on: https://pdfium-review.googlesource.com/14616
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL renames CFX_Observable to Observable and moves into the fxcrt
namespace.
The test suite names were updated to ObservedPtr from fxcrt.
Bug: pdfium:898
Change-Id: Ia507482bc0a1d6d8bbf12c0c55c4a88f6c8910e2
Reviewed-on: https://pdfium-review.googlesource.com/14615
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL moves CFX_MaybeOwned into the fxcrt namespace and removes the
CFX_ prefix.
The test names for maybe owned were updated to be in the MaybeOned test
suite instead of the fxcrt suite.
Bug: pdfium:898
Change-Id: I0c07057d66c8610e7b19133094b4507fff725e76
Reviewed-on: https://pdfium-review.googlesource.com/14470
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL renames CFX_AutoRestorer to just AutoRestorer and places in the
fxcrt namespace.
Bug: pdfium:898
Change-Id: Id9f36df94e95f3b2a55054bc198ca1bfd249ee3d
Reviewed-on: https://pdfium-review.googlesource.com/14450
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
When working with LineTo and BezierTo commands, verify we are within the
bounds of the path data before accessing elements.
Bug: pdfium:899
Change-Id: Iae9f9f3d0e5dbaf8d5452b86961ab8c79a6210f1
Reviewed-on: https://pdfium-review.googlesource.com/14490
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Then set up the right dependencies for them.
BUG=chromium:765914
Change-Id: I036cd888c741927d5efe0d020c6676f169e7cbb1
Reviewed-on: https://pdfium-review.googlesource.com/14410
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I020b862619f3f93f71dbb027b9e799d78744f686
Reviewed-on: https://pdfium-review.googlesource.com/14391
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: Icacf877e2b66ca7d49637dcf9eaec0f99bcdd8bb
Reviewed-on: https://pdfium-review.googlesource.com/14390
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I703321108712e8c4a11a8343ecf8b1a8804c1d1a
Reviewed-on: https://pdfium-review.googlesource.com/14352
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I9ecf08c5cabfeb7b354abeb46b94918ae0b4539a
Reviewed-on: https://pdfium-review.googlesource.com/13590
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: Ie1170e71fb2d8f87857e68620f27e478a0801d21
Reviewed-on: https://pdfium-review.googlesource.com/13670
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
|
|
Change-Id: I416e636d90c63679e2dd0b109c6594fc02663c89
Reviewed-on: https://pdfium-review.googlesource.com/13572
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
|
|
Change-Id: Idbde2714eb5a3fd5a76c77ce968f790f3c5dfa07
Reviewed-on: https://pdfium-review.googlesource.com/13571
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
|
|
Change-Id: I5c0fccc74a9f103d91c95fd72dc6683d991eadec
Reviewed-on: https://pdfium-review.googlesource.com/13570
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
|
|
Automated using git grep & sed.
Replace StringC classes with StringView classes.
Remove the CFX_ prefix and put string classes in fxcrt namespace.
Change AsStringC() to AsStringView().
Rename tests from TEST(fxcrt, *String*Foo) to TEST(*String*,
Foo).
Couple of tests needed to have their names regularlized.
BUG=pdfium:894
Change-Id: I7ca038685c8d803795f3ed02545124f7a224c83d
Reviewed-on: https://pdfium-review.googlesource.com/14151
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Change-Id: I87b5e6cefe973b82b4868e56fc5285c95c53a12b
Reviewed-on: https://pdfium-review.googlesource.com/12550
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Now considering anything not representable by a 32-bit signed int
as OOB rather than decoding some arbitrary overflowed value.
Bug: chromium:761666
Change-Id: I00f5a3abadca51f9bedc5e5d78f7f184040c2f33
Reviewed-on: https://pdfium-review.googlesource.com/14010
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Due to some of the size parameters for allocating space in Decode()
depending on the values produced by opj_decode(), this change was
causing misallocation of space, which in turn was causing illegal
reads/writes.
The issue with excessive memory usage that the original CL was trying
to change is less significant than the above mentioned problems, so
reverting this fix and looking for another solution to the
problem. This will re-open bugs https://crbug.com/754423 and
https://crbug.com/761005.
BUG=chromium:764177,chromium:754423,chromium:761005
Change-Id: I1cafac8a8117ec1e3bc32b31196bdec719d46477
Reviewed-on: https://pdfium-review.googlesource.com/13950
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
This CL changes the behavior of FPDF_RenderPageBitmapWithMatrix so it
transforms the bitmap. Before, the page would be transformed and the
assumption was that it would be drawn on a bitmap with the same
dimensions as the original page. This does not work well because a
transformation generally changes the dimensions of the page. The
rectangles test is modified to include small rectangles in the corner
of the page, so that it's clear that the whole original page is being
displayed.
Bug: pdfium:849
Change-Id: Ie89f959a1605fea59a15d239ca871ccd939ec92b
Reviewed-on: https://pdfium-review.googlesource.com/13510
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Reverse iteration with signed lengths and indices is kinda icky
without this abstraction, and STL provides this pretty much "for
free" given the existing forward iterator.
Change-Id: I97c36c8bd23c0aa48195bc17da7c672292b4cde2
Reviewed-on: https://pdfium-review.googlesource.com/13770
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I2a750c8e46b68dc4870e2dadd2ed3429008e1562
Reviewed-on: https://pdfium-review.googlesource.com/13551
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
The existing code did end of range checks by making sure that the
value was never less then 0. This isn't correct when using an unsigned
type, since 0 - 1 will wrap around to the max possible value, and
thus still be less then 0. Additionally the existing code was hard to
follow due to the complexity of some of the low level operations being
performed.
It has been rewritten using higher level string operations to make it
clearer and correct.
BUG=chromium:763256
Change-Id: Ib8bf5ca0e29e73724c4a1c4781362e8a8fc30149
Reviewed-on: https://pdfium-review.googlesource.com/13690
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Speculative fix for bug. Also remove FX_VA_COPY as va_copy should
be fine on all ports nowdays (we think).
Bug: 763965
Change-Id: I5c321d5624d00b3b2f262ec599e4382f02b744ff
Reviewed-on: https://pdfium-review.googlesource.com/13790
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
When reading a stream, if it is encrypted using an AES cipher it must
be atleast 16 bytes long aka 128 bits, other wise it is malformed.
BUG=chromium:763585
Change-Id: Ied7c36978f1eb24aeda93a184527b6d6a191e5c3
Reviewed-on: https://pdfium-review.googlesource.com/13751
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
BUG=chromium:761005
Change-Id: I538e49f1eeb32891b33677d8587d2bed110b1fc1
Reviewed-on: https://pdfium-review.googlesource.com/13692
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|