Age | Commit message (Collapse) | Author |
|
This CL renames cxfa_scriptcontext to cfxjse_engine and
cxfa_fm2jscontext to cfxjse_formcalc_context.
From reading the code, the script context appears to handle the v8 setup
and object code. The formcalc context code is related to handling the JS
code generated from the transpiler.
I, think, these new names make the intended usage clearer. They also
move the code into fxjs/ to keep along side the rest of the JS code.
Change-Id: I50619fbe48ca1f553a44cf0e0cb0210be8e45e4f
Reviewed-on: https://pdfium-review.googlesource.com/17130
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL makes the use of CXFA_IsTooBig consistent and universal across
all of the ToJavascript and related methods. Previously this method
was only applied in some calls. It is now being tested as a
precondition and postcondition on every call and as a post condition
for the entire translation process.
There are some size checks within methods that potentially generate
large amounts of JS that have been left in.
BUG=chromium:752920
Change-Id: I1a8bfe21e0a17c2e47592fc6017060243674f1bc
Reviewed-on: https://pdfium-review.googlesource.com/16812
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I3be788e06790d8102fc3793a50a58c19f05f855d
Reviewed-on: https://pdfium-review.googlesource.com/16790
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
There exists a similar check for the parser, but it doesn't catch all
cases of excessive memory usage, since a single parse step can
generate multiple expressions that need to be converted or other cases
where the parse depth doesn't match the emission depth later.
Due to the expressions appearing in two different inheritence
hierachies the depth information needs to be stored outside of the
classes, thus the new depth class.
Another way to handle this would be to change the method calls to take
in a visitor object that tracks depth. This would require significant
reworking of some of the code, so I am going to file a bug about doing
that conversion as a cleanup.
BUG=chromium:752495
Change-Id: Ica7c9b60ecf1e17530ea88b7bfb01582c63043be
Reviewed-on: https://pdfium-review.googlesource.com/16752
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
BUG=chromium:775519,chromium:768986
Adding metric form types
Change-Id: Ic99a5ac988998986f06cb79d08458afeda49a5d1
Reviewed-on: https://pdfium-review.googlesource.com/16392
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
This CL does some minor cleanup in the cxfa_ffdocview file to better
match coding style.
Change-Id: Iafb4fd2ba9c1963494b388104bd77d5423121227
Reviewed-on: https://pdfium-review.googlesource.com/16271
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
The existing API is too restrictive for collection the metrics
information that we want. Specifically it only tells us if there are
XFA forms in the document, but not AcroForms. This refactoring makes
the method more general, so that non-XFA information is provided
also. This change in semantics of the return value required some
changes at the call sites of the API.
BUG=chromium:775519
Change-Id: Id421c66c09b47196c252c64cdc2c711ca1911de0
Reviewed-on: https://pdfium-review.googlesource.com/16210
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
The existing types are PDF, Dynamic & Static, which are poorly named
since they don't really convey the fundamental differences between the
types. "PDF" is confusing because PDFium only handles PDFs, and
"Dynamic" & "Static" describe what a form may do, not how it is
specified or some other fundamental difference. The terms "Dynamic"
and "Static" were especially confusing, since XFAF documents must be
static by definition, whereas full XFA documents can be either
dynamic or static, depending on whether or not they change their
layout.
The types have been renamed to be clear that they are talking about
the type of PDF document being described. "PDF" becomes "None", since
this is used to indicate that there are no XFA forms in the
document. "Dynamic" becomes "Full", since this indicates that the
entire XFA spec is being used for the forms, specifically display
layout is in the XML. "Static" has become "ForegroundOnly", since the
form is specified using the XFAF (XFA Foreground) subset of the spec.
The terms Full & Foreground come from the XFA spec. I would have
preferred XFAF to have a different name, since it is the
display/foreground layer that isn't XFA when using it.
BUG=pdfium:917
Change-Id: I4335958c4a11d77d3bbe63b93602dd5bc14acb57
Reviewed-on: https://pdfium-review.googlesource.com/16010
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Some build configurations do not like the {} variant.
Change-Id: I32f5a18e5b41b628d6b45ec5eb9b26eded5b7d9c
Reviewed-on: https://pdfium-review.googlesource.com/15450
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
The CFX_CRTFileAccess class was only used in one place and only provided
one method. That method was folded back into the caller and the class
removed.
Change-Id: I5e670474244a9ec037b6d099d67bd5091cac7ff4
Reviewed-on: https://pdfium-review.googlesource.com/15410
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Remove unused defines; Move to .cpp files where possible; Fixup values.
Change-Id: I88cd5deb04b14ab8e9f8097a695c3d0b52d64b4c
Reviewed-on: https://pdfium-review.googlesource.com/15130
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@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>
|
|
Remove unused params, cleanup return values.
Change-Id: I9a1bc400e24cdcac982a578242ff0f9de8055775
Reviewed-on: https://pdfium-review.googlesource.com/15070
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
This CL simplifies the OS == WIN{32|64} checks to be PLATFORM == WINDOWS
checks.
Change-Id: I1493d316dd457b0228e4ef39db4cf1d2b8abf97d
Reviewed-on: https://pdfium-review.googlesource.com/14870
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: 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>
|
|
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 moves the static CFGAS_FontMgr methods to the anonymous
namespace.
Change-Id: I2835099ed9e503ee04daca3012a4ddd278255fdc
Reviewed-on: https://pdfium-review.googlesource.com/14830
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: 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>
|
|
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>
|
|
This CL moves FX_HandleParentPath to be a private inner class of
CFX_FontSourceEnum_File.
Change-Id: I5e2d16c4d78457a28e1833d0b937547019cdece6
Reviewed-on: https://pdfium-review.googlesource.com/14818
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL moves the public part of the CFGAS_FontMgr declaration to be
shared across all platforms.
Change-Id: I92e587fe06611c92f72746477775802c2f3b8b57
Reviewed-on: https://pdfium-review.googlesource.com/14817
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL moves the font source into the font manager so it doesn't need
to be stored by each caller (and removes the platform dependant code).
The |EnumFonts| method is exposed on the CFGAS_FontMgr so the caller can
clear the manager if the enumeration fails.
Change-Id: Iecce3d2e09ff01152b7bb79a34fe2b728320da9c
Reviewed-on: https://pdfium-review.googlesource.com/14816
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL removes some default parameters from the font code.
Change-Id: If6f6e09c93474e1e8b7ffaae53eb37dd40c32fab
Reviewed-on: https://pdfium-review.googlesource.com/14815
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@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>
|
|
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>
|
|
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>
|
|
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>
|
|
I don't think this is valid anymore, removing TODO.
Change-Id: I69cfbf499fe9f259f664d30be850604a246ed6dd
Reviewed-on: https://pdfium-review.googlesource.com/14531
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@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>
|
|
This CL adds unittests and implementations for the text edit engine
methods to get various indexes based on cursor position.
The |RebuildPieces| method was fixed to correctly keep track of
character position when dealing with BIDI characters.
Change-Id: Ie3c5ee5d63bfd00f6f0cdcb1c6fcfe6e05bba50e
Reviewed-on: https://pdfium-review.googlesource.com/14430
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
This CL changes FindNextBreakPos to return the found index instead of
requiring a call to GetAt(). This also fixes the issue that we may
return -1 from GetAt which would cause issues in the BoundsForWordAt
method when it gets shoved into a size_t variable.
Change-Id: I29e09de5d0837921a027208fc2471a9b1de287f1
Reviewed-on: https://pdfium-review.googlesource.com/14293
Reviewed-by: Ryan Harrison <rharrison@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>
|
|
The ePreType flag is only used if bFirst is true. After the first
iteration of the loop bFirst is always false. This CL removes the
updating of ePreType as it will never be used.
Also bFirst is only set false at the end of the loop and the do {} while is
changed into a while {}
Change-Id: Iaced1b38bddcc6f5483ae20993ac69c93b2e3f97
Reviewed-on: https://pdfium-review.googlesource.com/14292
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL changes the IsEOF flag to match the semantics of the
FindNextBreakPos flag.
Change-Id: I1a8aba91171baeacf80bdea4b9468d6093599c90
Reviewed-on: https://pdfium-review.googlesource.com/14291
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: 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>
|
|
This CL attempts to clarify the contents of the gs_FX_WordBreak_Table
and adds static_asserts that each entry in the WordBreakProperty table
has the value we expect.
Change-Id: I33c1f12a9e18240b01969be9902204eba5074eb7
Reviewed-on: https://pdfium-review.googlesource.com/13430
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
BUG=chromium:760070
Change-Id: Icb2e46da86b6b7e71dae309a015ae1c5301fc931
Reviewed-on: https://pdfium-review.googlesource.com/14230
Reviewed-by: Henrique Nakashima <hnakashima@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: I89c81e18273e929910f083399ed169017a6171f5
Reviewed-on: https://pdfium-review.googlesource.com/14091
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|