Age | Commit message (Collapse) | Author |
|
This CL removes the bProto param as it was never set and inlines the
value where needed in the methods. The default value was removed from
bUseDefault and inlined into callsites as needed.
Change-Id: I773261d19aa3799bc607e7df482b5f5e5217bee6
Reviewed-on: https://pdfium-review.googlesource.com/17533
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL removes the default param from TryInteger and inlines into the
call sites.
Change-Id: If3325c717a1127d4dcf665a12980925877988a9c
Reviewed-on: https://pdfium-review.googlesource.com/17531
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL removes the default values from CJX_Node::SetContent and inlines
at the call sites.
Change-Id: I9daf3c3e0010540773c276aa4c4e5c357e91b3b2
Reviewed-on: https://pdfium-review.googlesource.com/17530
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL removes the GetProperty default value and inlines into the
callers.
Change-Id: I0e18f27b51046fdf37ddc57f34a31154729c8db0
Reviewed-on: https://pdfium-review.googlesource.com/17510
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL removes the default parameters from SetAttributeValue and
inlines into the call sites as needed.
Change-Id: Ibb4e4747141a49c2367743421254c251aff71eeb
Reviewed-on: https://pdfium-review.googlesource.com/17490
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL moves the default value to CJX_Node::GetAttribute to the call
sites and removes the default.
Change-Id: I2b875e3c612b91ca67af106e271b040cc51c56ef
Reviewed-on: https://pdfium-review.googlesource.com/17470
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
The bNotify value has been moved into the call sites and the default
removed.
Change-Id: Ifd2c0252b0f1421f7fc244d69e6f6bddc80e5591
Reviewed-on: https://pdfium-review.googlesource.com/17450
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
The attribute is always false, removed and simplified the code.
Change-Id: Ic20ffe8d91fc3fcd66835e1bc2b1bce3da69be16
Reviewed-on: https://pdfium-review.googlesource.com/17316
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL creates a CJX_ThisProxy which is created by CXFA_ThisProxy. This
allows CJX_Object constructor to be protected.
Change-Id: Ie6865c82c29cd1d129faa487c9021a63310c78a6
Reviewed-on: https://pdfium-review.googlesource.com/17314
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL moves the JS methods from the CScript classes into CJX
representations. The methods are proxied to the CJX versions.
Change-Id: Ic5f380228614a60238fbcf9e0d04d942fae395be
Reviewed-on: https://pdfium-review.googlesource.com/17313
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL moves the JS from CXFA_NodeList to CJX_NodeList and proxies the
JS calls.
Change-Id: Ic2295ce2140321748bfe5f851e00da32d4332ce0
Reviewed-on: https://pdfium-review.googlesource.com/17312
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
When CreateInstance, GetCount, GetItem, RemoveItem and InsertItem were
moved out of the anonymous namespace they were not updated to remove the
first parameter. This Cl removes the first parameter and uses the
CXFA_Node as the thing to operate on.
Change-Id: I1b6dc956844786c8ba88ae508547c9cf6e91242a
Reviewed-on: https://pdfium-review.googlesource.com/17311
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL moves the javascript code from CXFA_Object to CJX_Object. The
Script_* methods are proxied to CJX_Object.
The ownership of the CJX_ object was removed from CXFA_Node and moved up
to CXFA_Object.
Change-Id: I58d286e6bb0151aa88d4f673bc7729987417bde6
Reviewed-on: https://pdfium-review.googlesource.com/17310
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL moves JS code out of CXFA_Node and places it into fxjs/cjx_node.
The CXFA_Node then has a CJX_Node as a member and, currently, proxies JS
calls to the CJX_Node member.
Change-Id: Ic5b95184c8fd2347f0bdcfbccfa89bb6b52835b6
Reviewed-on: https://pdfium-review.googlesource.com/17290
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|