summaryrefslogtreecommitdiff
path: root/xfa/fxfa
AgeCommit message (Collapse)Author
2016-07-18Cleanup fgas/crt.dsinclair
This CL removes unused methods and default parameters from the fgas/crt code. Review-Url: https://codereview.chromium.org/2162503003
2016-07-18Pass element hash and name into CXFA_Object constructor.dsinclair
Providing the element hash and name in the constructor allows us to remove the calls to XFA_GetElementByID in the get methods. Review-Url: https://codereview.chromium.org/2101403002
2016-07-18Remove foxit app related setter and getter APIs in XFA codeweili
No need to get or set foxit app type, name, and version, thus remove all these APIs and implementation. Review-Url: https://codereview.chromium.org/2050913002
2016-07-12Rename fxjse/ to fxjs/ update files to match class names.dsinclair
This Cl moves the fxjse/ directory to fxjs/ in anticipation of merging in fpdfsdk/jsapi. In the process the filenames are updated to better match the class contents. Static methods are moved to anonymous namespaces as possible. Review-Url: https://codereview.chromium.org/2136213002
2016-07-11Cleanup CXFA_SimpleParser.dsinclair
This CL moves the static methods to an anonymous namespace and cleans up various formatting issues. Review-Url: https://codereview.chromium.org/2138833002
2016-07-11Cleanup ownership of parser membersdsinclair
Change m_pXMLDoc and m_pStream in CXFA_SimpleParser to be a unique_ptr. This allows removing the CloseParser() call from CXFA_DocumentParser as the items will get cleaned up automatically. Review-Url: https://codereview.chromium.org/2131653002
2016-07-11Break xfa_parser_imp apartdsinclair
This CL splits the three parsers into individual files to make working with the code easier. Review-Url: https://codereview.chromium.org/2129963002
2016-07-11Remove IXFA_Parser, cleanup XFA parser code.dsinclair
The IXFA_Parser only created a CXFA_SimpleParser, the CXFA_DocumentParser is only created in one spot and doesn't need all the IXFA_Parser methods. This CL removes IXFA_Parser, instantiates the CXFA_SimpleParser where needed and cleans up surrounding code. Review-Url: https://codereview.chromium.org/2123133004
2016-07-11Cleanup redundant method names.dsinclair
This CL cleans up a bunch of method names which are redundant with the class names or code location. Review-Url: https://codereview.chromium.org/2132513003
2016-07-07Cleanup xfa_document_datamerge filesdsinclair
This CL moves the static methods into an anonymous namespace, removes default parameters and moves some other methods only used by this file into the anonymous namespace. Review-Url: https://codereview.chromium.org/2122373003
2016-07-07Break xfa_basic_data up to smaller filesdsinclair
xfa_basic_data is a large (>7k lines) file that is difficult to navigate. This CL breaks the file up into smaller files more logical files. Review-Url: https://codereview.chromium.org/2123343002
2016-07-01Clean up parts of CPDF_CIDFont.thestig
Also remove some if statements that are always true/false. Review-Url: https://codereview.chromium.org/2094073002
2016-06-30Convert some methods to std::lower_bound and std::find_if.dsinclair
This CL updates XFA_GetElementTypeForName() to use std::lower_bound instead of a custom binary search implementation to find the element info. XFA_GetPropertyOfElement() is changed to use std::find_if. Previously it was using a custom binary search implementation. Changing this to non-binary search will allow having the items in g_XFAElementPropertyData be out of XFA_Element order. There are at most 19 items that need to be searched and often 1 or 2. Review-Url: https://codereview.chromium.org/2107093004
2016-06-28Change CXFA_Node::GetClassName to returnchromium/2786chromium/2784dsinclair
CXFA_Node::GetClassName currently takes an out parameter and returns void. This CL updates the signature to return the value and require no parameters. Review-Url: https://codereview.chromium.org/2104963002
2016-06-23Use some FXSYS methods instead of duplicatingdsinclair
This CL uses the FXSYS_isDecimalDigit in place of a few custom IsDigit methods. It also creates an iswspace and some fractional math helper methods to share some code. Review-Url: https://codereview.chromium.org/2094453004
2016-06-23Pass needed value to CXFA_Node constructordsinclair
Currently the CXFA_Node constructor will call out to lookup the object type for a given element type. There is only one called of this constructor and it already has the object type so just pass it through instead of getting the element data a second time. Review-Url: https://codereview.chromium.org/2092853002
2016-06-23Remove NULL in xfa/dsinclair
This CL converts all NULL's to nullptr. All instances of comparison to nullptr have been removed. Review-Url: https://codereview.chromium.org/2095653002
2016-06-23Change XFA_GetElementByName to XFA_GetElementTypeForNamedsinclair
This method was only ever used to get the XFA_Element type for the given element name. Changed to make the signature match the usage. Review-Url: https://codereview.chromium.org/2095733002
2016-06-23Cleanup some variable namings.chromium/2778dsinclair
This CL cleans up some variable namings from the XFA_Element enum change. Review-Url: https://codereview.chromium.org/2093663002
2016-06-23Remove IsOrdinaryList; rename to OrdinaryList to Listdsinclair
IsOrdinaryList is no longer used, removed. Rename list item as Ordinary doesn't hold any meaning. Review-Url: https://codereview.chromium.org/2079393006
2016-06-23Remove CXFA_OrdinaryObject classdsinclair
The CXFA_OrdinaryObject class no longer has any functionality but is just wraps CXFA_Object and sets the object type for the sub classes. This Cl removes the class and has the subclass set the object type themselves. This CL also renames the OrdinaryObject type to just Object. Review-Url: https://codereview.chromium.org/2082343003
2016-06-22Update GetClassID to GetElementTypedsinclair
The GetClassID method actually returns the XFA_Element, change the name of the method to be more suggestive of the return value. The GetClassID was sort-of polymorphich and would call down to subclasses. This CL changes the data to be stored on the CXFA_Object class and just returns what is set. The values are set in the constructor as needed. Review-Url: https://codereview.chromium.org/2082573007
2016-06-22Remove unused GetScriptObjHash().dsinclair
Method is never called, remove it and the data variable it uses as it will no longer be used. Review-Url: https://codereview.chromium.org/2088173003
2016-06-21Convert XFA_ELEMENT to an enum classdsinclair
This CL changes XFA_ELEMENT From an enum to an enum class. The type name was updated to XFA_Element. Review-Url: https://codereview.chromium.org/2089443002
2016-06-20Change func(void) to func()weili
Since PDFium is compiled as C++ code, the void keyword is not needed. BUG=pdfium:519 Review-Url: https://codereview.chromium.org/2084603003
2016-06-20Split the XFA_OBJECTTYPE enum into two parts.dsinclair
Currently the object type and the node flags are both mixed into the single XFA_OBJECTTYPE_* enum. These two things are un-related and should not share a single type. This Cl creates an XFA_ObjectType enum class and a XFA_NodeFlag enum to hold the two types. Accessors are added to determine if the flags are set (or called where they already existed. Review-Url: https://codereview.chromium.org/2083453003
2016-06-16Remove unused XFA_GetElementChildren.dsinclair
This CL removes the method and the backing data. Review-Url: https://codereview.chromium.org/2079493002
2016-06-16Cleanup FWL RenderWidget method parameters.dsinclair
This CL removes the default values from pMatrix and dwStatus as they are always set and removes the iRotate parameter as it is never set and never used. Review-Url: https://codereview.chromium.org/2071903002
2016-06-16Make code compile with clang_use_chrome_plugin (part V)chromium/2770weili
This change mainly contains files in xfa/fxfa directory. This is part of the efforts to make PDFium code compilable by Clang chromium style plugins. 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/2071683002
2016-06-16Cleanup XML parser code.dsinclair
This Cl removes the CFDE_XMLSAXParser and CFDE_XMLDOMParser along with the ::LoadXML() method which would create them, it was never called. It also cleans up the use of virtual in the various XML classes. Review-Url: https://codereview.chromium.org/2067253002
2016-06-15Make code compile with clang_use_chrome_plugin (part IV)weili
This change mainly contains files in fpdfsdk/ directory. This is part of the efforts to make PDFium code compilable by Clang chromium style plugins. 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 plus removing an unused file and splitting cxfa_eventparam out from fxfa.h BUG=pdfium:469 Review-Url: https://codereview.chromium.org/2062313002
2016-06-14Cleanup ownership in CXFA_ScriptContext.dsinclair
This Cl substitutes some unique_ptrs for various bits of manual memory management in CXFA_ScriptContext. Review-Url: https://codereview.chromium.org/2062113002
2016-06-14Add fuzzer for FDE CSS syntax parser.dsinclair
This CL adds a fuzzer for the CSS Syntax parser in XFA. BUG=chromium:587126 Review-Url: https://codereview.chromium.org/2068513002
2016-06-13Optionally skip image type detection in progressive decoder.dsinclair
The progressive decoder will attempt to verify that the provided image type matches the actual image content. We need to disable this check when running the fuzzer in order to target the fuzzing to specific decoders otherwise each fuzzer will end up fuzzing all of the decoders. BUG=chromium:587126 Review-Url: https://codereview.chromium.org/2061733002
2016-06-09Avoid casts via correct types in fgas_textbreaktsepez
FLW_DATEINFO cast not required. Review-Url: https://codereview.chromium.org/2053963002
2016-06-09Remove more casts, part 7.tsepez
Replacing a void* member in CFX_SAXItem saves lots of casts. Review-Url: https://codereview.chromium.org/2051233002
2016-06-09Move xfa/fxjse/ to fxjse/dsinclair
This makes it clear that fxjse/ is a standalone component and should not be entangled with other xfa/ components. BUG=pdfium:506 Review-Url: https://codereview.chromium.org/2056663004
2016-06-09Change CFXJSE_Context::GetGlobalObject to returndsinclair
This Cl changes CFXJSE_Context::GetGlobalObject to return a std::unique_ptr<CFXJSE_Value> instead of accepting a CFXJSE_Value out parameter. All usages created the CFXJSE_Value with the same runtime as the caller. Review-Url: https://codereview.chromium.org/2056733003
2016-06-09Convert CFXJSE_Value::ToString to return.dsinclair
ThiS Cl updates CFXJSE_Value::ToString() to return a CFX_ByteString instead of taking an out parameter. It also adds a ToStringC() and ToWideString() to hide the common conversions that are done on the string value. Review-Url: https://codereview.chromium.org/2044293004
2016-06-09xfa_fm2jscontext method cleanup - pt IX of IXdsinclair
Clean up ::ExtractDouble, ::ValueToDouble, ::ValueToFloat, ::ValueToInteger, ::ParseResolveResult, ::ResolveObjects, ::GetObjectByName, ::unfoldArgs, ::simpleValueCompare, ::ValueIsNull, ::concat_fm_object, ::fm_var_filter, ::get_fm_value, ::is_fm_array, ::is_fm_object, ::eval_translation, ::dotdot_accessor and ::dot_accessor Review-Url: https://codereview.chromium.org/2053583003
2016-06-09Use static_cast<CXFA_WidgetAcc*> in xfa.tsepez
Remove a few other unused casts, simplify. Review-Url: https://codereview.chromium.org/2052593003
2016-06-08xfa_fm2jscontext method cleanup - pt VIIIdsinclair
Cleanup ::logical_not_operator, ::negative_operator, ::positive_operator, ::divide_operator, ::multiple_operator, ::minus_operator, ::plus_operator, ::greaterequal_operator, ::greater_operator, ::lessequal_operator, ::less_operator, ::fm_ref_equal, ::notequality_operator, ::equality_operator, ::logical_and_operator, ::logical_or_operator, ::assign_value_operator, ::Put, ::Post, ::Get, ::TrillionUS and ::WordUS. Review-Url: https://codereview.chromium.org/2046123004
2016-06-08xfa_fm2jscontext method cleanup - pt VIIdsinclair
This CL formats ::WordNum, ::Upper, ::Uuid, ::Substr, ::Stuff, ::Str, ::Space, ::RTrim, ::Right, ::Replace, ::Parse, ::Ltrim, ::Lower, ::Len, ::Left, ::Format, ::HTMLSTR2Code, ::HTMLCode2STR, ::EncodeXML, ::EncodeHTML, ::EncodeURL and ::Encode. Review-Url: https://codereview.chromium.org/2047103004
2016-06-08Remove more FXJSE c-method wrappers.dsinclair
This Cl cleans up a bunch of the FXJSE_* methods and moves others into the classes where they most make sense. Review-Url: https://codereview.chromium.org/2045883004
2016-06-08Fix GetPageIndex() for dynamic XFA documents.thestig
BUG=614211 Review-Url: https://codereview.chromium.org/2045013004
2016-06-07Remove various FXJSE Value methods.dsinclair
This CL removes the FXJSE_Value_Set*, FXJSE_Value_To*, FXJSE_Value_Get* and FXJSE_Value_Delete* methods. Review-Url: https://codereview.chromium.org/2043153002
2016-06-07Remove dead code in CFGAS_FontMgrImp.thestig
And also CFGAS_StdFontMgrImp. Review-Url: https://codereview.chromium.org/2033673002
2016-06-07Replace IFGAS_Font with underlying concrete typethestig
Review-Url: https://codereview.chromium.org/2037563002
2016-06-07xfa_fm2jscontext method cleanup - pt VIchromium/2763dsinclair
Cleans up ::DecodeXML, ::DecodeHTML, ::DecodeURL, ::Decode, ::Concat, ::At, ::UnitValue, ::UnitType, ::Ref, ::Eval, ::If, ::Within. Review-Url: https://codereview.chromium.org/2043133002
2016-06-07Remove casts to same type in xfa_script_imp.cpptsepez
Review-Url: https://codereview.chromium.org/2046133002