Age | Commit message (Collapse) | Author |
|
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_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>
|
|
The CXFA_FFApp can get the FWLWidgetMgr from the CFWL_App and does not
need to store a copy. This removes the need to pass the delegate into
the GetFWLAdapterWidgetMgr() method and we can set the capabilities
directy.
Change-Id: If4794d07fa0fb5dd32b816a21f04e6d7710886ca
Reviewed-on: https://pdfium-review.googlesource.com/14611
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
The CXFA_FFApp::GetWidgetMgr has two return types. This CL renames the
methods to make it clear which one is being used.
Change-Id: Id4fdaa33c1e6079afd2f0f7dcc77ae46f1c07ac2
Reviewed-on: https://pdfium-review.googlesource.com/14610
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL removes the map of CXFA_FFDoc -> CFGAS_PDFFontMgr from the
CXFA_FontMgr and moves the storage of the PDFFontMgr into the CXFA_FFDoc
itself.
Change-Id: Ia725ddd94b1ac2c9504bfd6370040ab6ac01e272
Reviewed-on: https://pdfium-review.googlesource.com/14590
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL removes any XFA requirements on the default font manager and
moves it to the fgas/ directory. Some helper methods from CXFA_FontMgr
are moved into the fgas/fgas_fontutils.h files.
Change-Id: I17ba8dc2bd60085c17d8a3328f6625675a82787f
Reviewed-on: https://pdfium-review.googlesource.com/14570
Reviewed-by: Henrique Nakashima <hnakashima@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>
|
|
XFA bits passed into the PDFFontMgr are just used to get the
CPDF_Document and the CFGAS_FontMgr. This CL changes the code to pass
those two things into the constructor. Then, the fxfa/cxfa_pdffontmgr.*
code has been moved to fgas/cfgas_pdffontmgr.* to show it doesn't depend
on any of the XFA classes.
Change-Id: I21d791869e2a32ffedfd7c87bb3bbd035232d991
Reviewed-on: https://pdfium-review.googlesource.com/14550
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL adds two mouse selection tests for CFWL_Edit. In order to do so
the needed selection code was added to the XFA widget handler and
plumbed down to the CFWL_Edit field as needed.
Bug: pdfium:840
Change-Id: Ia3b5f5d191494a4579c01524df8fb35b24cc0085
Reviewed-on: https://pdfium-review.googlesource.com/14530
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Some of the calls in CXFA_FMParser on the prase recursion had been
missed when adding in the parse depth limiting logic. The fuzzers
found them.
BUG=chromium:759295
Change-Id: Iad54beb356c4c555908797d4b58a42549c006e9e
Reviewed-on: https://pdfium-review.googlesource.com/14510
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@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>
|
|
This CL changes the Text Edit Engine code to use a count instead of an
end index for the selection range. Using count lets us differentiate a
selection at the beginning of 1 character and an empty selection.
A few new tests were added to test unicode word break behaviour, some are not
working yet and are commented out.
Change-Id: Icce8f5003102ef0a850151ccdf16d3c2226d94bf
Reviewed-on: https://pdfium-review.googlesource.com/13491
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
While Chromium's clang and libc++ implicitly end up including that header,
the build can break with other toolchains (e.g. GCC 7 and its libstdc++)
because some headers reference types such as int32_t without including the
header that defines them.
Change-Id: Ibb2aa3d3b432f4b47f1b8635d0196d4f69cb09a0
Reviewed-on: https://pdfium-review.googlesource.com/14270
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@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: I89c81e18273e929910f083399ed169017a6171f5
Reviewed-on: https://pdfium-review.googlesource.com/14091
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
BUG=chromium:763353
Change-Id: I6ee93f769509326d9af5bbfa1450c90747d6a065
Reviewed-on: https://pdfium-review.googlesource.com/14090
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Lei Zhang <thestig@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>
|
|
This enables MSVC by default on Windows again, so fix code that fail
to build with MSVC too.
Change-Id: I03fb4e3697ad777a4dca88af462b35526d6c1d4d
Reviewed-on: https://pdfium-review.googlesource.com/13392
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change the underlying type for FX_STRSIZE to size_t from int. This
will make the value unsigned and thus all values in the range of the
type will be valid. This allows for the final remove of negative
length strings, but also introduces a some casting and functional
errors, since many parts of the code base assume that FX_STRSIZE is
int or another signed type. This also CL fixes these errors.
BUG=pdfium:828
Change-Id: I231dca59e96fc9330cbb099eecbdfc41fcf86f5b
Reviewed-on: https://pdfium-review.googlesource.com/11830
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
This CL removes fx_guid and inlines into CXFA_FM2JSContext as needed.
Change-Id: I08a1f03fd4be46730eee24ab73b8b5c0daf9cd7d
Reviewed-on: https://pdfium-review.googlesource.com/13094
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL splits the GUID code out of fx_extension into an fx_guid.h file.
Change-Id: I915538ff98601efb07595264eff6435729193177
Reviewed-on: https://pdfium-review.googlesource.com/13090
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Mid(foo, 1) is equivalent to [foo], if all you want is the character. Similarly
Left(1) is [0]. It is faster also, since it does not need to create intermediate
strings.
Right(1) is a touch more tricky, since it requires something like GetLength() ?
[GetLength() - 1] : 0;. A new method, Last() has been added to perform this
character extraction.
Multiple call sites have been updated to use more efficient/simpler
syntax. There are a number of call sites that use on these patterns, but based
on the surrounding context we actually need/want a string, so they have not been
modified.
Change-Id: I485a7f9c7b34c9bdacecada610158f996816afdd
Reviewed-on: https://pdfium-review.googlesource.com/12890
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Bug: chromium:760034
Change-Id: Id0862749b1454e065de4de7d746a27e78ac58e30
Reviewed-on: https://pdfium-review.googlesource.com/12730
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
BUG=pdfium:813
Change-Id: I4c638857bf114327dbc0344cc6d231b897f0d001
Reviewed-on: https://pdfium-review.googlesource.com/11971
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@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>
|
|
Instead of only having CPDF_Dictionary* GetRoot() const, provide
const CPDF_Dictionary* GetRoot() const and CPDF_Dictionary* GetRoot().
Do the same for GetInfo().
Change-Id: I6eae1208d38327fcdc7d0cd75069a01c95f4a92a
Reviewed-on: https://pdfium-review.googlesource.com/11671
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This CL moves CFX_WideTextBuf to its own files and updates includes as
needed.
Change-Id: Ibe66ecf3e66f8f01dd8e9eaf6b467588be86ad4f
Reviewed-on: https://pdfium-review.googlesource.com/12413
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL moves CFX_AutoRestorer into its own file, separate from
fx_basic.h.
Change-Id: I415cb9207416bd4744b8ac8e2d7466852db53f0a
Reviewed-on: https://pdfium-review.googlesource.com/12390
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL rebuilds the text edit engine in a simpler fashion. Instead of
depending on multiple pages, paragraphs and buffer fields there is a
single text edit engine which contains a gap buffer.
This makes the code easier to understand and follow.
Change-Id: I10fe85603fa9ed15a647eaac2d931f113cd0c7b0
Reviewed-on: https://pdfium-review.googlesource.com/11990
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Through out the code base there are numerous places where variables
are declared using a signed integer type when interacting with the
string classes, since they assume that FX_STRSIZE is 'int'. As part of
changing the underling type of FX_STRSIZE to be unsigned, these
locations are being changed to use FX_STRSIZE. This is necessary as
part of converting the type, but has been broken off into a separate CL,
since it should be low risk.
Some related cleanups that are low risk are included as part of
this CL.
BUG=pdfium:828
Change-Id: Ifaae54ad195ccde0fe8672f71271d29a6ebd65fd
Reviewed-on: https://pdfium-review.googlesource.com/12210
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Change-Id: If2a8e608498c505440405e7eff675969ac4b195a
Reviewed-on: https://pdfium-review.googlesource.com/12330
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
BUG=chromium:752501
Change-Id: Ie9943cd80a4afa73ad9393c8bcd2aa2656a9d932
Reviewed-on: https://pdfium-review.googlesource.com/12290
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
The current limit of 2000 is still causing occassional ASAN issues,
reducing to 1250.
BUG=chromium:757711
Change-Id: Idb07f97b01230afabcceaa23b29495432193ec64
Reviewed-on: https://pdfium-review.googlesource.com/11750
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: 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 cleans up formatting and simplifies logic in CFDE_TextOut.
Change-Id: Ib675a35da79df77854f51e86bf24e5dc90b33b06
Reviewed-on: https://pdfium-review.googlesource.com/11334
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: Idc9dfcafe6727c1689443ce8f9568567e55d51c8
Reviewed-on: https://pdfium-review.googlesource.com/11114
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change some related code to take a const CFX_Matrix* since it is not
immediately obvious if the matrix can be made into a const-ref.
Change-Id: I15c840222b575cc479b1f6f0b6d3b3c0e50d5515
Reviewed-on: https://pdfium-review.googlesource.com/11113
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Also remove an unused method and move a bunch of internal methods into
an anonymous namespace.
Change-Id: Ic7b4a975852cc2a7384bf3f681b953a5bf7e7d29
Reviewed-on: https://pdfium-review.googlesource.com/11112
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Constify parameters as well.
Change-Id: I7e87b11cc73b133b04d49ceed1c46f5afcb89d1a
Reviewed-on: https://pdfium-review.googlesource.com/11111
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I6ea062bf5def0bc5fea7c52323198209dcf4c3e9
Reviewed-on: https://pdfium-review.googlesource.com/11110
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Remove friendship.
De-virtualize.
Nest enum inside class.
Make copy-assignable and pass by const ref.
Make pack better on 64-bits.
Change-Id: I1ae3b6d03756fa5780e9023795db6648e8b8299a
Reviewed-on: https://pdfium-review.googlesource.com/11290
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Due to the recursive nature of the FormCalc parser, deeply nested
expressions can lead to memory being exhausted. This check is being
added to have the parser exit early instead of running out of
memory. This should reduce the number of false positives about
addressing issues being found by fuzzers.
BUG=chromium:752433
Change-Id: I511ecfb07e32073555e1fd1658f3b8b47f1a5a91
Reviewed-on: https://pdfium-review.googlesource.com/11170
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This class is actually an accidentally renamed interface. There is only
one concrete class so fold the interface back into the concrete class.
Change-Id: If921a34595fad85750389f071ffdc9a5eae09f8e
Reviewed-on: https://pdfium-review.googlesource.com/11150
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
BUG=chromium:754982
Change-Id: I41da6828c714d3ed12fe796ae7e228d87b168962
Reviewed-on: https://pdfium-review.googlesource.com/10890
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This method duplicates the behaviour of the const [] operator and
doesn't offer any additional safety. Folding them into one
implementation.
SetAt is retained, since implementing the non-const [] operator to
replace SetAt has potential performance concerns. Specifically many
non-obvious cases of reading an element using [] will cause a realloc
& copy.
BUG=pdfium:860
Change-Id: I3ef5e5e5a15376f040256b646eb0d90636e24b67
Reviewed-on: https://pdfium-review.googlesource.com/10870
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Tom Sepez <tsepez@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_RenderContext and moves the ::Render method to be
::RenderText on the CFWL_Edit class which was the only caller.
Change-Id: Ic940a3f0d10cfce169f5e491de90803fc8a7940d
Reviewed-on: https://pdfium-review.googlesource.com/10950
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL replaceds FDE_TTOSTYLE defines with a FDE_TextStyle struct which
is used to set the needed flags. The FDE_TTOALIGNMENT defines are
replaced with an enum class and unused members have been removed.
Change-Id: Ib0e2818a82e7f1961de57f8d15703477f8235a03
Reviewed-on: https://pdfium-review.googlesource.com/10530
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|