summaryrefslogtreecommitdiff
path: root/xfa
AgeCommit message (Collapse)Author
2016-06-09remove redundant CFX_Matrix* cast in one-d barcodechromium/2766chromium/2765tsepez
Review-Url: https://codereview.chromium.org/2055103002
2016-06-09Avoid casts via correct types in fgas_textbreaktsepez
FLW_DATEINFO cast not required. Review-Url: https://codereview.chromium.org/2053963002
2016-06-09Get rid of NULLs in xfa/fxbarcode/thestig
Review-Url: https://codereview.chromium.org/2048983002
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-09Remove C-style casts in xfa/fde.tsepez
Review-Url: https://codereview.chromium.org/2040323004
2016-06-09Fix crash in CXFA_Node::TryUserData() (speculative)tsepez
Fix is speculative because I can't repro locally, but I know the current code is wrong. I fixed this intially in https://codereview.chromium.org/2015143005/ I then broke it again in https://codereview.chromium.org/2019333006/ There is another spot where we are still casting through void*, and the CXFA_Node*'s alignment is getting messed up when it fails to adjust for it's vtable. Using CFXJSE_HostObject consistently avoids the issue. Adding a virtual dtor to CFXJSE_HostObject might skirt the issue, but I want to be able to wrap simple objects without that penalty if desired. BUG=616339 Review-Url: https://codereview.chromium.org/2055473004
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
2016-06-07Remove some casts to same type in cfx_graphics.cpptsepez
Review-Url: https://codereview.chromium.org/2048663004
2016-06-07Fix more code which has shadow variablesweili
The code has local variables that shadow struct or class member variables. Also, when this happens, different variable names should be used instead of namespaces. These were discovered by /Wshadow warning flag in Clang. Review-Url: https://codereview.chromium.org/2034253003
2016-06-07Get rid of NULLs in core/thestig
Review-Url: https://codereview.chromium.org/2032613003
2016-06-07Remove FDE_HVISUALOBJ.dsinclair
This CL removes the FDE_HVISUALOBJ in favour of the concrete FDE_TEXTEDITPIECE class. The parameter was removed from any method which didn't use it and the non-implemented methods were removed. Review-Url: https://codereview.chromium.org/2047693002
2016-06-07xfa_fm2jscontext method cleanup - pt Vdsinclair
Cleans up ::Oneof, ::HasValue, ::Exists, ::Choose, ::Term, ::Rate, ::PV, ::PPmt, ::Pmt, ::NPV, ::IPmt, ::FV, ::CTerm and ::Apr Review-Url: https://codereview.chromium.org/2042843003
2016-06-06Remove unused CFDE_TxtEdtEngine::SetBufChunkSize().tsepez
In turn, CFDE_TxtEdtBuf::SetChunkSize becomes unused. Review-Url: https://codereview.chromium.org/2042743003
2016-06-06Remove FWL_HTIMER in favor of IWFL_TimerInfotsepez
Review-Url: https://codereview.chromium.org/2037573003
2016-06-06Clean up C-Style casts in CBC_CodeBase and subclassestsepez
Make the parent class own the reader/writer via unique_ptrs. De-virtualize some methods with no overrides. Review-Url: https://codereview.chromium.org/2037573005
2016-06-06Remove FDE_HDEVICESTATE.dsinclair
The value returned is always NULL and when passed as a param is never used. Review-Url: https://codereview.chromium.org/2044623002
2016-06-06xfa_fm2jscontext method cleanup - pt IVdsinclair
This Cl cleans up ::Num2AllTime, ::GetLocalTimeFormat, ::GetLocalDateFormat, ::DateString2Num, ::GetGMTime, ::IsoTime2Local, ::IsoDate2Local, ::Local2IsoTime, ::Local2IsoDate, ::IsIsoDateTimeFormat, ::IsIsoTimeFormat, ::IsIsoDateFormat, ::TimeFmt, ::Time2Num, ::Time, ::Num2Time, ::Num2GMTime, ::Num2Date, ::LocalTimeFmt and ::LocalDateFmt Review-Url: https://codereview.chromium.org/2043743002
2016-06-06Make GetDevFont() return a CFX_Font* instead of void*tsepez
Then we can remove a bunch of casts. Review-Url: https://codereview.chromium.org/2033243004
2016-06-03Rename CFX_GEFont to CFGAS_GEFonttsepez
It implements IFGAS_Font and is unrelated to CFX Fonts, except as a wrapper. Review-Url: https://codereview.chromium.org/2037753005
2016-06-03Rename IFX_FontMgr to IFGAS_FontMgrtsepez
Avoid confusion with CFX_FontMgr, which does not inherit from IFX_FontMgr, and lives in a different layer of code. Do the same CFX_ -> CFGAS_ transformation for the concrete classes that implement IFGAS_FontMgr. Review-Url: https://codereview.chromium.org/2039463003
2016-06-03Fix more bugs found by /analyze toolweili
Three more bugs are discovered: -- potientially used freed pointer; -- potientially used uninitialized variable; -- Used '&&' instead of bitwise operator '&' BUG=chromium:613623, chromium:427616 Review-Url: https://codereview.chromium.org/2040503002
2016-06-03Rename IFX_Font to IFGAS_Fonttsepez
Avoid confusion with CFX_Font, which is defined in fxcrt, and does not inherit from nor bear any resemblence to IFX_Font. Review-Url: https://codereview.chromium.org/2036173003
2016-06-03Remove two unused opaque handle typestsepez
Review-Url: https://codereview.chromium.org/2038913002
2016-06-02Remove FXJSE_Value_ToObject and call methods directlydsinclair
This Cl removes the global FXJSE_Value_ToObject method and adds individual methods on CXFA_Value to do the needed conversions. Review-Url: https://codereview.chromium.org/2026993003
2016-06-02Fix all the code which has duplicate variable declarationsweili
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
2016-06-02Replace FWL_HLISTITEM with class IFWL_ListItem {}tsepez
Make CFWL_ classes inherit from IFWL_ListItem. Replace reinterpret_casts with static_casts. Review-Url: https://codereview.chromium.org/2029923002
2016-06-02Change ThrowScriptErrorMessage() to just ThrowException().dsinclair
Shorter and easier to remember. Review-Url: https://codereview.chromium.org/2029043002
2016-06-01Change CFX_Font::GetPsName() to return a CFX_ByteString.thestig
So everyone can avoid doing Byte to WideString conversions. Also remove CFX_GEFont::GetPsName() and deduplicate a couple of GetPsName() calls. Review-Url: https://codereview.chromium.org/2019173002
2016-06-01xfa_fm2jscontext method cleanup - pt IIIdsinclair
Cleanup ::Min, ::Mod, ::Round, ::Date2Num, ::DateFmt and ::ISoTime2Num. Review-Url: https://codereview.chromium.org/2028063002
2016-06-01Remove unused LoadString values, cleanup remaining strings.dsinclair
These strings are not used anywhere, remove the defines and the strings. For the remaining strings, cleanup the contents. Review-Url: https://codereview.chromium.org/2020353004
2016-06-01Stop casting struct CFXJSE_ArgumentsImpl to unrelated class CFXJSE_Argumentstsepez
Remove the 'Impl entirely, and put the details into the class itself. Review-Url: https://codereview.chromium.org/2036513002
2016-06-01Don't use array for only one compatible mode scripttsepez
Also, don't invent an enum that has one possible value that is always set. Review-Url: https://codereview.chromium.org/2028343002
2016-06-01Clean up part of CXFA_Node classweili
Mainly clean up Script_NodeClass_Xxx() functions. There are no behavior or API changes. The clean up mainly includes moving static functions into namespace, remove unnecessary conditions or braces, changing NULL->nullptr and local FX_BOOL->bool. Review-Url: https://codereview.chromium.org/2018733002
2016-06-01Track shared isolates better in FXJSE.tsepez
Fix the asymmetry between creating only some isolates and releasing all of them, even the shared ones, by being more careful not to trash those we didn't create. Review-Url: https://codereview.chromium.org/2025193002
2016-06-01Remove use of v8:Lockerstsepez
The entire code base is single-threaded, hence the lockers ought not be required. Review-Url: https://codereview.chromium.org/2026933002
2016-06-01Fix some signed/unsigned comparisons in xfa_fm2jscontext.cppochang
Looks like this causes compile warnings on ARM where wchar_t is unsigned. Review-Url: https://codereview.chromium.org/2023173002
2016-06-01Remove XFA_HFM2JSCONTEXT.dsinclair
This CL removes XFA_HFM2JSCONTEXT and the supporting code. XFA_HFM2JSCONTEXT was replaced by CXFA_FM2JSContext. The translate method was moved to CXFA_FM2JSContext. Review-Url: https://codereview.chromium.org/2024833003