Age | Commit message (Collapse) | Author |
|
This CL converts the use of CPVT_Color to CFX_Color and removes the
CPVT_Color class.
Change-Id: I86a2d06524cd8f0fbce2335f0185426cc41dbe84
Reviewed-on: https://pdfium-review.googlesource.com/16030
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Bug: chromium:770890
Change-Id: Iee532d76aabc0763a835c203344455ba07c6e82c
Reviewed-on: https://pdfium-review.googlesource.com/15930
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
|
|
This CL updates cfx_fontmapper to use std::make_tuple instead of the {}
variant.
Change-Id: I1eeeeed803fd4b813f3dbf7b3d23416af9400b6f
Reviewed-on: https://pdfium-review.googlesource.com/15131
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Remove unused defines.
Change-Id: Ibf10d8470f19cbf4528fe1342398a39ef15c1d12
Reviewed-on: https://pdfium-review.googlesource.com/15110
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Use methods to match font information; cleanup some font code.
Change-Id: Ib99c1e466e56723cb5d264d49e1caf9bbbc0daed
Reviewed-on: https://pdfium-review.googlesource.com/15072
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL removes duplicate defines between XFA and core. Several OR'd
values have been coverted into individual booleans to make the code
clearer.
Change-Id: Ic32a71c711cffd9a0cf1136e5a22f0502e085c39
Reviewed-on: https://pdfium-review.googlesource.com/15071
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL moves some font defines to the only .cpp file they're used in
and removes un-needed forward declarations from fx_font.h.
Change-Id: Ic291a42d6bddfa6537111a7d42728802236e6e26
Reviewed-on: https://pdfium-review.googlesource.com/14970
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
This CL moves CFX_FaceFontInfo to be a protected inner class of
CFX_FolderFontInfo.
Change-Id: I3674c36d5295307be253e04337c22d6d0608fefe
Reviewed-on: https://pdfium-review.googlesource.com/14952
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@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 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: I5c40237433ebabaeabdb43aec9cdf783e41dfe16
Reviewed-on: https://pdfium-review.googlesource.com/13230
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@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 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>
|
|
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 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 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>
|
|
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>
|
|
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: 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>
|
|
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: 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>
|
|
BUG=pdfium:828
Change-Id: Ifeaf19291ffd33aab63449ab52f8d2606b66c0fc
Reviewed-on: https://pdfium-review.googlesource.com/13330
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
DEPS roll is failing since std::min(size_t, int) -> int doesn't make
sense. min is templated on a single class, i.e. std::min(size_t,
size_t) -> size_t.
BUG=pdfium:828
Change-Id: Idec3ac7bdbf1d22b8c878a95bd9c44c9a94bbccf
Reviewed-on: https://pdfium-review.googlesource.com/13310
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
This CL removes the fx_basic.h header and fixes up includes as needed.
Change-Id: I49af32a8327bdbcda40c50a61ffbd75d06609040
Reviewed-on: https://pdfium-review.googlesource.com/12670
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL moves IFX_Pause out to its own class from fx_basic and updates
includes as needed.
Change-Id: Iebdd183d8c85aa17570f190f1a7d1602c0af3c8b
Reviewed-on: https://pdfium-review.googlesource.com/12491
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL moves CFX_FixedBufGrow to its own files and updates includes as
needed.
Change-Id: Ia0cb70569b30acdb3ba9f23d8937ab8f9c17d6e6
Reviewed-on: https://pdfium-review.googlesource.com/12490
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
The Find and ReverseFind methods for WideString, WideStringC,
ByteString, and ByteStringC have been converted from returning a raw
FX_STRSIZE, to returning Optional<FX_STRSIZE>, so that success/failure
can be indicated without using FX_STRNPOS.
This allows for removing FX_STRNPOS and by association makes the
conversion of FX_STRSIZE to size_t easier, since it forces checking
the return value of Find to be explictly done as well as taking the
error value out of the range of FX_STRSIZE.
New Contains methods have been added for cases where the success or
failure is all the call site to Find cared about, and the actual
position was ignored.
BUG=pdfium:828
Change-Id: Id827e508c8660affa68cc08a13d96121369364b7
Reviewed-on: https://pdfium-review.googlesource.com/11350
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Currently, all three of CFX_Matrix::TransformRect() take in rect values
and modify them in place.
This CL converts them to take in constant values and return the
transformed values instead, and fixes all the call sites.
Bug=pdfium:874
Change-Id: I9c274df3b14e9d88c100ba0530068e06e8fec32b
Reviewed-on: https://pdfium-review.googlesource.com/11550
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Jane Liu <janeliulwq@google.com>
|
|
This CL is a tentative fix for the bug below. The last method in the
stack trace is FontEnumProc, which calls AddInstalledFont. This problem
was introduced by
https://pdfium-review.googlesource.com/c/pdfium/+/10651
Bug: chromium:757388
Change-Id: If089a43367f1106a79276f6b09b6d0546b863e35
Reviewed-on: https://pdfium-review.googlesource.com/11611
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
Converted CFX_FloatRect::Init() and CFX_FloatRect::UpdateRect() to take
in a CFX_PointF object instead of two coordinates.
Bug=pdfium:770
Change-Id: Ibcb620f192d6c086158c39f23c411777286005d0
Reviewed-on: https://pdfium-review.googlesource.com/11450
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Converted CFX_RenderDevice::DrawCosmeticLine() and IFX_RenderDeviceDriver::
DrawCosmeticLine() to take in CFX_PointF objects instead of two coordinates
per point.
Bug=pdfium:769
Change-Id: I6116e4106a61487184a71e79c1dca3a85e8c7c27
Reviewed-on: https://pdfium-review.googlesource.com/11410
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Also roll buildtools_revision to f90f6a5 and update Android code that
did not previously pass the Chromium style plugin.
TBR=dsinclair@chromium.org
Change-Id: Ifb1193cee8f68ac99a31c8d43195e4d7005eeafb
Reviewed-on: https://pdfium-review.googlesource.com/11293
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
BUG=chromium:754969
Change-Id: I4f92d301499c658c57393fde01f1252ea84e59a8
Reviewed-on: https://pdfium-review.googlesource.com/11250
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Simplify some code along the way.
Change-Id: I0022c8a82188192c63b9ac0bc87e9b9dbf983040
Reviewed-on: https://pdfium-review.googlesource.com/10852
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This CL removes CFDE_RenderDevice. For most of the proxy'd calls we call
the CFX_RenderDevice directly now. To set the clip rect an overload was
added to accept a CFX_RectF and handle the casting to FX_RECT. The one
needed method, DrawString, is move to a static on CFDE_TextOut.
Change-Id: I95ea7e1fa1fd4702074b797c06423c9c9cb51db9
Reviewed-on: https://pdfium-review.googlesource.com/10951
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL removes CFDE_Path. There is only one method, AddLine which is
required, the rest can be removed. That method is moved to CFX_PathData
which is what CFDE_Path is appending to anyway.
Change-Id: If50af8cf856a9f7379791fe1999174db5fd13e38
Reviewed-on: https://pdfium-review.googlesource.com/10454
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Remove ifdef'd code for versions we know will no longer work.
Change-Id: I036c80168f846df1b98e9df4972f84655e8418fb
Reviewed-on: https://pdfium-review.googlesource.com/10051
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Bug: pdfium:731
Change-Id: I95d7c16e6c30e6675a17505359b5b7ae1dd5ff12
Reviewed-on: https://pdfium-review.googlesource.com/9950
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Added FPDFImageObj_GetBitmap() that returns the bitmap of an image
object, and a FPDFBitmap_GetFormat() that returns the format of a
bitmap.
* Fixed a small bitmap conversion bug in cfx_dibsource.cpp.
* Enabled EmbedderTest::CompareBitmap() to support different formats
of bitmaps.
* Added an embedder test and a test PDF file with images of many
different formats.
Bug=pdfium:677
Change-Id: I6a72f9d969cf5f3577db9400ca33197c213622ed
Reviewed-on: https://pdfium-review.googlesource.com/9690
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Jane Liu <janeliulwq@google.com>
|
|
Bug: pdfium:731
Change-Id: Iac887a8d3485b5511ec7f3d809efeb8af6ea9ce7
Reviewed-on: https://pdfium-review.googlesource.com/9930
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Currently Find() and other methods that return a FX_STRSIZE return -1
to indicate error/failure. This means that there is a lot of magic
numbers and magic checks floating around. The standard library for
similar operations uses a npos constant. This CL implements
FX_STRNPOS, and replaces usages of magic number checking. It also does
some type cleanup along the way where it was obvious that FX_STRSIZE
should be being used.
Removing the magic numbers should make eventually changing FX_STRSIZE
to be unsigned easier in the future.
BUG=pdfium:828
Change-Id: I67e481e44cf2f75a1698afa8fbee4f375a74c490
Reviewed-on: https://pdfium-review.googlesource.com/9651
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
The various string/byte classes support Mid(), Left(), and Right() for
extracting substrings. Mid() can handle all possible cases, but Left()
and Right() are useful for common cases and more explicit about what
is going on.
Calls like Mid(offset, length - offset) can be converted to
Right(length - offset). Calls like Mid(0, length) can be converted to
Left(length).
If the substring being extracted does not extend all the way to one of
the edges of the string, then Mid() still needs to be used.
BUG=pdfium:828
Change-Id: I2ec46ad3d71aac0f7b513e103c69cbe8c854cf62
Reviewed-on: https://pdfium-review.googlesource.com/9510
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This support is being removed from CFX_ByteString, CFX_ByteStringC,
CFX_WideString, and CFX_WideStringC. This standardizes all of these
classes to only have one Mid method that takes in 2 params, offset and
count. Count now must be positive. The old behaviour of calculating
the length for the user if -1 is passed in for the count has been
removed. This work is in preperation for converting these classes to
not accept negative lengths anywhere and thus make the underlying size
type unsigned.
BUG=pdfium:828
Change-Id: I5f15e7b7b00b264231817f143e2da88ee6f69e7b
Reviewed-on: https://pdfium-review.googlesource.com/9430
Reviewed-by: (OOO Jul 28 - Aug 8) dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
CLRF characters seem to still work with label printer drivers, and some
users want to preserve these characters when printing. We cannot
distinguish new lines due to CLRF characters in the original text from
new lines created during layout, so just add the characters to all new
lines.
Bug: chromium:734850
Change-Id: I4d032a311c33e20a27b2cc1d5d0ba3eb9ef2fd41
Reviewed-on: https://pdfium-review.googlesource.com/9110
Commit-Queue: Rebekah Potter <rbpotter@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Most calls to the Skia Driver combine flushing
the draw cache with deleting the driver itself.
Progressive drawing needs to flush the cache to
keep drawing in order, but the driver must remain
for the next progressive draw.
R=dsinclair@chromium.org, hnakashima@chromium.org
Bug: pdfium:833
Change-Id: I311f80b2dc0ef6e4df9a3a0f082ae076cb7a591f
Reviewed-on: https://pdfium-review.googlesource.com/8890
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Since there is no guarantee of termination if the StringC was
extracted from a snippet of another string. Make it more obvious
that things like
strlen(str.unterminated_c_str())
might be a bad idea.
Change-Id: I7832248ed89ebbddf5c0bcd402aac7d40ec2adc2
Reviewed-on: https://pdfium-review.googlesource.com/8170
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Bug:
Change-Id: Ic40d1fce83b6b13f638c522205a765c20f6ccd50
Reviewed-on: https://pdfium-review.googlesource.com/8090
Commit-Queue: Mike Reed <reed@google.com>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Cary Clark <caryclark@google.com>
|