Age | Commit message (Collapse) | Author |
|
This is the last use of CFX_PrivateData, which is now removed.
Review-Url: https://codereview.chromium.org/2016743002
|
|
Remove an unused inheritance.
The remaining usages are a little more intricate.
Review-Url: https://codereview.chromium.org/2015743002
|
|
Its only used to store one object, so replace it with a unique_ptr
to a class with a virtual dtor. Rename the prototypical class with
virtual dtor from CFX_DestructObject to CFX_Deletable. Rename the
fx_basic_module.cpp to cfx_modulemgr.cpp to match the one class
in it.
Review-Url: https://codereview.chromium.org/2013483003
|
|
Rename addRef() method to Retain() to match Release().
This CL does not convert to CFX_RetainPtrs, which will happen
in a follow-on.
Review-Url: https://codereview.chromium.org/2005933002
|
|
The mixed use of enum and uint32_t causes warnings. And it is more
meaningful to use enum for char type variables.
BUG=pdfium:29
Review-Url: https://codereview.chromium.org/2001733002
|
|
Review-Url: https://codereview.chromium.org/1990153003
|
|
... by using STL containers in more places.
Remove dead / duplicate code as well.
BUG=603904
Review-Url: https://codereview.chromium.org/1998583002
|
|
Currently the Undo/Redo records are serialized as byte strings and stored
into a CFX_ByteStringArray. They are deserialized when used.
This CL removes the serialization and stores the objects in a deque of unique
pointers.
Review-Url: https://codereview.chromium.org/1980293004
|
|
A new Clang warning complains about this, and especially for the function
returning a reference, it seems like a bad idea.
BUG=none
Review-Url: https://codereview.chromium.org/1986453002
|
|
Add missing helper function to CFX_ByteTextBuf to avoid the
anti-pattern CFX_ByteString(sBuf.AsStringC()), using the name
"Make" to indicate there's an allocation going on in this case.
Change some method arguments to take pre-existing ByteStrings where
possible.
Review-Url: https://codereview.chromium.org/1977093002
|
|
BUG=
Review-Url: https://codereview.chromium.org/1979723003
|
|
Review-Url: https://codereview.chromium.org/1874773002
|
|
Most of the time, we want to operate on chars as if they
were unsigned, but there are a few places where we need
the default (questionably signed) values. Consolidate
the casting in a single place rather than forcing callers
to get a char* ptr.
BUG=pdfium:493
Review-Url: https://codereview.chromium.org/1972053003
|
|
Previous CLs have removed or marked explicit the constructors
which allowed bad constructs to compile. I now get an error:
candidate constructor not viable: expects an l-value for 1st argument
when called as indicated in the comment.
Review-Url: https://codereview.chromium.org/1975983002
|
|
BUG=pdfium:493
Review-Url: https://codereview.chromium.org/1968233002
|
|
In particular, we seek to make more use of the .Mid()
(substr) method to make these.
Precursor to removing c_str() calls.
BUG=pdfium:493
Review-Url: https://codereview.chromium.org/1966293002
|
|
Review-Url: https://codereview.chromium.org/1954593004
|
|
Last part. Remove CFX_PtrArray typedef.
Review-Url: https://codereview.chromium.org/1941863002
|
|
Remove IFX_FontProvider, IFX_FontSourceEnum, IFX_SAXReader and
IFX_SAXReaderHandler.
Review-Url: https://codereview.chromium.org/1930533002
|
|
There are currently three ways to assert in the code (ASSERT, FXSYS_assert and
assert). This CL standardizes on ASSERT. The benefit of ASSERT is that it can
be overridden if the platform requies and we can pickup the Chromium version
if it has already been defined in the build.
This does change behaviour. Currently FXSYS_assert is always defined but ASSERT
is only defined in debug builds. So, the FXSYS_assert's would fire in Release
builds. That will no longer happen.
BUG=pdfium:219
Review-Url: https://codereview.chromium.org/1914303003
|
|
Too many calls were of the form fn(x.c_str(), x.GetLength())
which is an anti-pattern given the StringC classes which tie
these together.
There are a few places where explicit CFX_*StringCs are
constructed, but this can be avoided by changing the args
to these functions in the same manner.
Removed String_ from name of functions since it added
little value. Also removed default argument.
Review URL: https://codereview.chromium.org/1919563002
|
|
Use RVO now that we use an array type compatible with it.
Review URL: https://codereview.chromium.org/1906903002
|
|
Its implicit copy constructor is unsafe, since it ends up
sharing the underlying data. Fix one place where it was
being unintentionally invoked.
Review URL: https://codereview.chromium.org/1908073003
|
|
This was causing issues at one point with the GN build but seems to have been
resolved in the meantime.
Review URL: https://codereview.chromium.org/1907563002
|
|
This CL setups up a standalone GN build. You'll need to set gn args similar to:
use_goma = true
clang_use_chrome_plugins = false
pdf_enable_xfa = true
pdf_enable_v8 = true
pdf_is_standalone = true
The third_party/pymock files are needed to make git cl upload work correctly.
BUG=pdfium:106
Review URL: https://codereview.chromium.org/1904563002
|
|
This is a result of looking for the anti-paterns /char\*\sm_/
and /m_.*=.*\.c_str/ which indicate that a class may be using
the contents of a string without extending the lifetime of
the underlying storage.
Along the way, change to uint8_t in fx_dib; this is unrelated but
avoids grep hits (it is binary, not chars anyways).
Also remove two string operators that make it easy to assign in
a manner that does not extend contents lifetime.
Review URL: https://codereview.chromium.org/1902953002
|
|
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1888843004
|
|
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1887003003
|
|
Do the same for CFX_WideTextBuf as well.
The name is confusing because these return CFX_ByteStringC,
not CFX_ByteString. The AsStringC naming gives parallelism with
the string types themselves, and may help to indicate that
the result is only good for the lifetime of the object being
operated upon.
Review URL: https://codereview.chromium.org/1886263003
|
|
Use the more standard name "clear()" instead.
Review URL: https://codereview.chromium.org/1888103002
|
|
BUG=
Review URL: https://codereview.chromium.org/1882043004
|
|
BUG=
Review URL: https://codereview.chromium.org/1885973002
|
|
This CL removes IFX_ArabicChar, IFX_RTFBreak, IFX_TxtBreak, IFX_WordBreak,
IFX_FormatString, and IFX_GSUBTable. References were updated to be the concrete
classes.
The CFX_GSUBTable was also removed as it is unused.
BUG=pdfium:468
Review URL: https://codereview.chromium.org/1882213002
|
|
Make Byte and Wide code identical while at it.
Review URL: https://codereview.chromium.org/1877553002
|
|
BUG=
Review URL: https://codereview.chromium.org/1868293002
|
|
The naming is redundant given the base type, and will stand
in the way of consolidating Byte and Wide code.
BUG=
Review URL: https://codereview.chromium.org/1862123003
|
|
The few places these are called are better served by explicit
calls to CFX_ByteString() itself. This helps make Byte and
Wide strings more similar.
Also prevents fx_string.h from having any knowledge of fx_basic.h's
ByteTextBuf class.
Review URL: https://codereview.chromium.org/1870043003
|
|
It doesn't persist the string beyond the duration of the
call, hence it should take the *StringC variant. Doing so
avoids some allocs by changing to the *StringC ctor in a few
places, at the cost of some explicit .ToByteStringC() calls
(which are cheap).
Review URL: https://codereview.chromium.org/1862953004
|
|
Shuffled the order of methods in fx_basic_wstring.cpp to
match those in fx_basic_bstring.cpp. The way to review
this patch is to diff those two files against each other.
They are beginning to converge.
Re-ordered some parameters in Concat() so that the string
comes before its length. It feels wrong otherwise.
Review URL: https://codereview.chromium.org/1846793002
|
|
Recent changes appear to have made this unused.
Review URL: https://codereview.chromium.org/1864813003
|
|
We removed the FX_DWORD typedef in favour of uint32_t. This CL cleans up the
FX_SAFE_DWORD naming to match.
BUG=pdfium:81, pdfium:470
Review URL: https://codereview.chromium.org/1861403002
|
|
Methods that take string arguments and do not persist them should
take *StringC types as argument rather than discrete ptr/len args.
Avoids a number of implicit casts from CFX_ByteString to char*.
BUG=
Review URL: https://codereview.chromium.org/1861183002
|
|
No functional change intended.
This difference in naming is standing in the way of consolidating
some of the string code between Wide and Byte strings. The Wide
code wants to call raw_str() in exactly the same spots that the
Byte code calls c_str(). This makes sense, because in both places we
get a character type back, and not a uint*_t type. If WideStringC
had a raw_str() method, it would have to return uint32_t or similar.
R=dsinclair@chromium.org
Review URL: https://codereview.chromium.org/1863593004
|
|
First step in making the same changes to CFX_WideString that we
just made to CFX_ByteString.
Review URL: https://codereview.chromium.org/1844073003
|
|
Companion to https://codereview.chromium.org/1853233002
BUG=
Review URL: https://codereview.chromium.org/1857073002
|
|
This CL updates CFX_ByteStringC to use the more common c_str
and raw_str instead of GetCStr and GetPtr.
Review URL: https://codereview.chromium.org/1857713003
|
|
Having this happen implicitly can be dangerous because the lifetime
has to be considered; we should have caught the "red bots" in
https://codereview.chromium.org/1847333004/#ps60001 at compile time.
Review URL: https://codereview.chromium.org/1853233002
|
|
This reverts commit b33dfdf68bafa30e90a65fb71ff6b343202e0561.
BUG=
Review URL: https://codereview.chromium.org/1848993002
|
|
Makes the code slightly cleaner.
Review URL: https://codereview.chromium.org/1846083002
|
|
This reverts commit ac88953dfa7c1a68c69989d61d7bc03c0595064b.
Reason for revert: Strings borked.
TBR=dsinclair@chromium.org
Review URL: https://codereview.chromium.org/1852453004
|