Age | Commit message (Collapse) | Author |
|
This CL moves the FGAS stream code into core/fxcrt and renames to
CFX_SeekableStreamProxy.
Change-Id: I6641fe0cca45a128ef3ec281b0b40f8d60296387
Reviewed-on: https://pdfium-review.googlesource.com/4311
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
This CL replaces IFGAS_Stream with the only implementation CFGAS_Stream.
The CreateReadStream and CreateWriteStream methods are removed in favour
of calling MakeRetain directly.
Change-Id: I882a89258f642e24fc3d631587db05652bd53ded
Reviewed-on: https://pdfium-review.googlesource.com/4210
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL renames several fgas/layout files to match the class names
contained in the files.
Change-Id: Ib4feaa902618e577261e51dbac743cb4cb500ea1
Reviewed-on: https://pdfium-review.googlesource.com/4290
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
The load file methods are always called right after creating the class.
This Cl moves their code up into the constructor and then changes the
other code to assume that the m_pFile{Read|Write} always exists.
Change-Id: I015abf71ea4804d02d4f6f94b97eb1e7855e1fc4
Reviewed-on: https://pdfium-review.googlesource.com/4110
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Every CFGAS_Stream is wrapped inside a CFGAS_TextStream. This CL folds
the two classes together and merges the methods where needed.
Change-Id: Ic56449b36baa51254d8d600ce631f285ba2cbb80
Reviewed-on: https://pdfium-review.googlesource.com/4057
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@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 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>
|
|
This CL renames the textout file to cfde_textout to match the classname
and moves up one directory to xfa/fde.
Change-Id: I0b405961b8406818a2eb3cbb30f87620afa6ab7a
Reviewed-on: https://pdfium-review.googlesource.com/3373
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This Cl moves more of the CFX classes defined in the xfa/ directory to
the core/fxcrt directory and conditionally builds them.
Change-Id: I811e6c6acd31dfbe75b49880be43661f78334013
Reviewed-on: https://pdfium-review.googlesource.com/3372
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I87521aa9bdc796895f1db144fda22b1cb44d2089
Reviewed-on: https://pdfium-review.googlesource.com/3215
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I651782e6eb6b14580a89d9d613404e7984a76cf0
Reviewed-on: https://pdfium-review.googlesource.com/3141
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
This CL starts extracting common members between the two break classes
into a common base class. This also normalizes some of the member names
to be the same across classes.
Change-Id: I7f4e5065f2dac79eb4ebba397458236cc0609d38
Reviewed-on: https://pdfium-review.googlesource.com/3058
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I158b7d80b0ec28b742a9f2d5a96f3dde7fb3ab56
Reviewed-on: https://pdfium-review.googlesource.com/3031
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
Change-Id: I96e0a20d66b9184d22f64d8e4ce0dadd5a78c1e8
Reviewed-on: https://pdfium-review.googlesource.com/2967
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Remove interfaces which are only implemented once.
Change-Id: I73ceaa7bfd7ef2a630479c7eebed5e32ecb99940
Reviewed-on: https://pdfium-review.googlesource.com/2944
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
The rotation value is always 0 so we end up doing nothing for the
rotation.
Change-Id: Ib12a269d4f3c16961b1b934bf9dfc04d1c368e51
Reviewed-on: https://pdfium-review.googlesource.com/2943
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This Cl removes the unused TXTLAYOUTSTYLE and TXTCHARTYLE defines from
fgas_textbreak. This also ripples and removes some of the defined
styles from fde_textout as well.
Change-Id: Ic647e97694366685bbad367e0a7ba61a00416598
Reviewed-on: https://pdfium-review.googlesource.com/2942
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
This Cl replaces the FX_TXTLINEALIGNMENT_ defines with an enum and
cleans up various usages.
Change-Id: I5ff20f046322e5cd39a7d2abbd8735eac81e8c69
Reviewed-on: https://pdfium-review.googlesource.com/2941
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
These are unset in the code, remove support.
Change-Id: I76ef73929a1f74f59ccdd7bbd054d04dc9c5c6e7
Reviewed-on: https://pdfium-review.googlesource.com/2938
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
This Cl updates the code to use the constructors instead of creating an
empty object and calling Set(). It also removes the various memsets of
the CFX_Rect{F} classes.
Change-Id: I6e20cec00866a38372858dcba5a30d31103172e4
Reviewed-on: https://pdfium-review.googlesource.com/2550
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
It's a ref-counted class, so if we're in the destructor, the ref
count has hit zero. We can't make a new ref pointer to itself here,
as it will re-invoke the destructor when it goes out of scope. This
should have been an obvious anti-pattern in hindsight.
The object in question can't be in the m_pFontManager, since the font
manager retains a reference, and we wouldn't get to this destructor
while that is present. So the cleanup isn't required.
Fixing this revealed a free-delete mismatch in cxfa_textlayout.cpp.
I also converted to use unique_ptrs in a few places near this issue.
Fixing this revealed a UAF in CFGAS_GEFont, memcpy'ing a RetainPtr
is not a good idea as it doesn't bump the ref count.
Also protect and friend the CFGAS_GEFont destructor, to make sure
random deletes don't happen.
Also kill off a const cast, and remove unnecessary conversion to
retain_ptr when we already have one.
TEST=look for absence of -11 in XFA corpus test logs, bots not
currently noticing the segv. Argh.
Review-Url: https://codereview.chromium.org/2631703003
|
|
This CL removes the custom allocator from CFDE_TxtEdtBuf and uses
std::vector<std::unique_ptr>> instead.
The Iterator code has been made an inner class of the buffer and rename to
CFDE_TxtEdtBuf::Iterator instead of CFDE_TxtEdtBufIter.
Change-Id: Ied8e844dea700e0ef37087f0d3fad4882d9eada1
Reviewed-on: https://pdfium-review.googlesource.com/2159
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL adds a set of unit tests for the text edit buffer. It fixes up a few
bugs found adding the tests and removes the unused ::Optimize method.
Review-Url: https://codereview.chromium.org/2614383003
|
|
We worry about cyclical references, but no leaks found.
Review-Url: https://codereview.chromium.org/2609423003
|
|
This CL removes the flags from CFWL_Edit which are never set. In turn, the
coresponding text edit engine flags are removed.
Review-Url: https://codereview.chromium.org/2570033003
|
|
Be suspicious of |new|. This removes some of the
easy cases.
Review-Url: https://codereview.chromium.org/2571913002
|
|
The core/ directory in FWL no-longer provides any context. This Cl moves all
of the core/ files up to the fwl/ folder.
As well, the CFWL_EvtFoo files are renamed CFWL_EventFoo and the CFWL_MsgFoo
files are renamed CFWL_MessageFoo. The event and message preceed the type in
order to keep the files sorted together and to make it clear that they're all
related.
Review-Url: https://codereview.chromium.org/2559173002
|
|
This CL cleans up the remaining default values in the fwl/core directory. Some
methods are renamed to better represent what they do.
Review-Url: https://codereview.chromium.org/2557103002
|
|
IFGAS_Streams are not part of the IFX_Stream hierarchy, but
can be made from such.
Review-Url: https://codereview.chromium.org/2559763002
|
|
It's a separate hierarchy unrelated to the IFX_*Stream classes.
Also rename CFX_Stream to CFGAS_Stream, and so forth.
Review-Url: https://codereview.chromium.org/2535723010
|
|
This Cl updates the TxtEdtEngine and TxtEdtBuf to return CFX_WideStrings on
a Get instead of taking an out param. The change is propagated out through
the various Get methods that call into the edit engine.
Change-Id: Iccf10a8ee06678ae3b59f3afd6e65308dacd16bd
Reviewed-on: https://pdfium-review.googlesource.com/2070
Commit-Queue: ooo 11-24 -- 12-05 (dsinclair) <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
This CL merges the IFWL hierarchy into the CFWL hierachy. All CFWL proxy methods
have been replaced by the IFWL implementations.
Review-Url: https://codereview.chromium.org/2524173002
|
|
The -build/include setting was masking out build/include_what_you_use. This CL
restores them, fixes any build errors, and adds NOLINT as needed. As well,
the runtime/explicit and runtime/printf flags are aslo enabled and NOLINT'd.
lint cleanups
Change-Id: Ib013b3eb29c8d0e48cad74c5df9028684130719f
Reviewed-on: https://pdfium-review.googlesource.com/2030
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This Cl cleans up the visibility, method usage and return values in the
remaining CFWL files.
Review-Url: https://codereview.chromium.org/2498163002
|
|
Review-Url: https://codereview.chromium.org/2467203003
|
|
Review-Url: https://codereview.chromium.org/2459073002
|
|
This Cl merges the implementation classes up into the IFWL classes as the
intermediate classes were just acting as proxies.
Review-Url: https://chromiumcodereview.appspot.com/2432423002
|
|
This CL updates all of the includes to be correctly sorted. A PRESUBMIT warning
is added (from chromium) that will warn if the includes are in the wrong order on upload.
Review-Url: https://codereview.chromium.org/2337293002
|
|
Use smart pointer to replace raw pointer type for class
owned member variables so that memory management will
be easier.
BUG=pdfium:518
Review-Url: https://codereview.chromium.org/2208423002
|
|
This change mainly contains files in xfa/ and fxjse/ directories
which were not covered by previous changes.
This is part of the efforts to make PDFium code compilable
by Clang chromium style plugins. After this change, PDFium can be
compiled with "clang_use_chrome_plugin=true" for GN build. Since
clang_use_chrome_plugin is true by default, we no longer need to
set this parameter explicitly.
The changes are mainly the following:
-- move inline constructor/destructor of complex class/struct out-of-line;
-- add constructor/destructor of complex class/struct if not
explicitly defined;
-- add explicit out-of-line copy constructor when needed;
-- move inline virtual functions out-of-line;
-- Properly mark virtual functions with 'override';
-- some minor cleanups;
BUG=pdfium:469
Review-Url: https://codereview.chromium.org/2072803002
|
|
Review-Url: https://codereview.chromium.org/2039923004
|
|
Review-Url: https://codereview.chromium.org/2040323004
|
|
In turn, CFDE_TxtEdtBuf::SetChunkSize becomes unused.
Review-Url: https://codereview.chromium.org/2042743003
|
|
When there are duplicate variable declarations, the inner names shadow the
outter ones. This is error prone and harder to read. Remove all the
instances found by /analyze.
BUG=chromium:613623, chromium:427616
Review-Url: https://codereview.chromium.org/2027273002
|
|
This is part of efforts to bring XFA to chromium_code standard.
The warnings are from unreachable code, or using potentially
uninitialized variables, or using assignment within a condition.
This change list only contains easy to fix cases. More cleanups
will follow.
BUG=pdfium:29
Review-Url: https://codereview.chromium.org/1998873002
|
|
Review-Url: https://codereview.chromium.org/1988393002
|
|
Review-Url: https://codereview.chromium.org/1987223003
|
|
This CL splits the xfa/fee files into individual class files and moves them
into the xfa/fde directory where they belong.
Review-Url: https://codereview.chromium.org/1994693002
|