summaryrefslogtreecommitdiff
path: root/xfa/src/fxfa
AgeCommit message (Collapse)Author
2016-02-03Make CXFA_Data sub-classes ctors explicit.Tom Sepez
Remove implicit CXFA_Node* operator. Add bool() operator. Remove IsExistInXML() which duplicates bool operator. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1663313002 .
2016-02-03Add CFXA_Object helper methods.Tom Sepez
Mark some ctors explicit. Rename GetXFANode to GetXFAObject to match its return type, since it is cast to node in many places. BUG=pdfium:384 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1662063002 .
2016-02-02XFA: Fix a crashier in SetFocus()Jun Fang
BUG=pdfium:374 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1640233004 .
2016-02-01Fix AddressSanitizer: heap-buffer-overflow in ValidateCanonicalTime()Jun Fang
BUG=pdfium:378 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1652933002 .
2016-01-29Merge to XFA: Member function name refactoringWei Li
This is needed by Cl 1634373003 as the name collision with virtual functions will be shown as warnings on Linux. Also, it is better to use different names for different cases. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1644633003 . (cherry picked from commit d45e7a51904164fb22049f0a7a80d2a94c06936b) Review URL: https://codereview.chromium.org/1648233002 .
2016-01-27XFA: Remove dead AddDoRecord code.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1640033002 .
2016-01-26Fix DOS newlinesTom Sepez
R=thestig@chromium.org Review URL: https://codereview.chromium.org/1636873004 .
2016-01-26Merge to XFA: War on #defines, part 1.Tom Sepez
Contains additional XFA-specific changes. Original Review URL: https://codereview.chromium.org/1632143002 . (cherry picked from commit 66a9dc9dd65ed2b9c7ede448d046b770140f16d5) R=thestig@chromium.org Review URL: https://codereview.chromium.org/1636503006 .
2016-01-25XFA: Fix a bunch of pointless returns.chromium/2637chromium/2636chromium/2635chromium/2634chromium/2633chromium/2632Lei Zhang
And a few other nits. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1635853002 .
2016-01-20Remove CFX_CMapByteStringToPtr usage in XFA.Tom Sepez
R=ochang@chromium.org Review URL: https://codereview.chromium.org/1573243003 .
2016-01-20Remove _FXFA_USEGASFONTMGR_ (always true).Tom Sepez
Small tidying. R=ochang@chromium.org Review URL: https://codereview.chromium.org/1601023004 .
2016-01-20Remove dubious cast in CXFA_ScriptContext::AddJSBuiltinObject()Jun Fang
BUG=pdfium:354 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1580773002 .
2016-01-12Fix an assertion failure in CFX_RTFBreak::SetLineWidth()Jun Fang
BUG=pdfium:347 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1573893002 .
2016-01-11XFA: Fix memory leakage on LinuxJun Fang
BUG=pdfium:348 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1579503002 .
2016-01-11Merge to XFA: Switch most min/max macros to std::min/max.Lei Zhang
Fix lint errors along the way. R=tsepez@chromium.org TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1567343002 . (cherry picked from commit 9adfbb0920a258e916003b1ee9515e97879db82a) Review URL: https://codereview.chromium.org/1577503002 .
2016-01-11Merge to XFA: Use std::map as CPDF_Dictionary's underlying store.Oliver Chang
Replaces CFX_CMapByteStringToPtr. XFA still uses CFX_CMapByteStringToPtr so it's not completely removed just yet. Adds begin()/end() to CPDF_Dictionary and removes the GetStartPos()/GetNextElement() functions to traverse the dictionary. Callers are changed accordingly. AddValue() is also removed. TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1541703003 . (cherry picked from commit 14f39950451bb9c2a11fbc7173fd47367410f80f) Review URL: https://codereview.chromium.org/1576033002 .
2016-01-08XFA: Remove many relative includes in xfa/Lei Zhang
Also remove useless files. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1570743002 .
2016-01-07Fix writing to read-only region in CXFA_TextParser::GetHorScale().Jun Fang
The reference count didn't increase when a computed style object was referred. BUG=pdfium:281 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1527263002 .
2015-12-22Rename LayoutWidget() to PerformLayout()Jun Fang
BUG=pdfium:333 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1537413002 .
2015-12-17Remove FDE_Alloc in favor of FX_Alloc.Tom Sepez
R=thestig@chromium.org Review URL: https://codereview.chromium.org/1521163002 .
2015-12-14Merge to XFA: Remove FX_BSTRC.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1521563002 . (cherry picked from commit 1956a174020686f91cd3b34294e91f4560fe45aa) Review URL: https://codereview.chromium.org/1526823002 .
2015-12-11Fix a crasher in CXFA_FFDocView::SetFocus()Jun Fang
When some layout items are released, applications should be notified. It usually happens when there are layout changes. BUG=pdfium:303 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1502133002 .
2015-12-11XFA: avoid multiplications in FX_AllocsTom Sepez
In some cases, we can use the safe FX_Alloc2D, in others there's an extra multiplication by the size of the type. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1519233002 .
2015-12-10Fix compiling warnings on Linux (part2)Jun Fang
BUG=pdfium:261 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1500313002 .
2015-12-10Merge to XFA: Remove CFX_AffineMatrix/CPDF_MatrixTom Sepez
Review URL: https://codereview.chromium.org/1513363002 . (cherry picked from commit f32c969bce6743fca1e7ff796b54a1692d26d7f0) R=thestig@chromium.org Review URL: https://codereview.chromium.org/1519693002 .
2015-12-09Fix heap-use-after-free in CXFA_PDFFontMgr::~CXFA_PDFFontMgr()Jun Fang
BUG=pdfium:306 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1506423002 .
2015-12-09FWL refcounts never incremented (part 2).Tom Sepez
Re-introduce create methods that actually create the corresponding impl so we don't have ifaces without impls. Remove per-subclass Initialize() methods. Remove unused ctors. BUG=pdfium:282 R=jun_fang@foxitsoftware.com, thestig@chromium.org Review URL: https://codereview.chromium.org/1453473002 .
2015-12-09Re-land "Rename CFWL_Thread classes to ThreadImp"Tom Sepez
This reverts commit 5e4f290e939ded90a518ff8eab1db59930655e11. BUG= R=thestig@chromium.org Review URL: https://codereview.chromium.org/1502063005 .
2015-12-08FWL refcounts never incremented (part 1)Tom Sepez
BUG=pdfium:282 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1509203002 .
2015-12-07Revert "Rename CFWL_Thread classes to ThreadImp"Tom Sepez
This reverts commit 6fa20c60c6ed551af55bfc879668eaac5c237805. Reason for revert: broke tests TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1507893002 .
2015-12-07Rename CFWL_Thread classes to ThreadImpTom Sepez
This matches the 3-level parallel hierarchy convention used elsewhere in FWL. Remove dead code along the way. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1503503003 .
2015-12-02Fix XFA build under chromium checkoutTom Sepez
Add () to suppress gcc-style error about assignment in conditionals. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1491403002 .
2015-12-02Remove _FWL_RETURN_IF_ macrosTom Sepez
These hide early returns from the casual reader, hide the inversion of the condition under test from the reader, prevent the folding of conditions into a single statement, and take up more characters than the if() itself. R=ochang@chromium.org Review URL: https://codereview.chromium.org/1494683002 .
2015-12-01Fix a crasher due to recursion in CXFA_WidgetAcc::ExecuteScript()Jun Fang
BUG=pdfium:292 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1486573002 .
2015-12-01Use c++ style casts in CPWL_Color::CPWL_Color()Jun Fang
BUG=pdfium:281 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1481503002 .
2015-11-27Fix a crasher caused by an invalid index in CXFA_LayoutPageMgr::GetPage()Jun Fang
BUG=pdfium:289 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1472383003 .
2015-11-25Fix a crasher in rendering rich text in XFA filesJun Fang
Increase ref number of pStyle when it's being used. In this way, it won't be released when it's being used. BUG=pdfium:267 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1468123003 .
2015-11-25Refactor CXFA_FFPageView::GetWidgetByPosJun Fang
BUG=pdfium:276 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1438333005 .
2015-11-23Make CXFA_ContainerLayoutItem inherit from IXFA_LayoutPage.Tom Sepez
IFXA_LayoutPage now a pure virtual interface, with its code moving to CXFA_ContainerLayoutItem's implementaton of it. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1466103002 .
2015-11-20Merge to XFA: Remove CFX_Matrix::Reset()Tom Sepez
Original Review URL: https://codereview.chromium.org/1459243002 . (cherry picked from commit 6fc00fafcbac1fd5edd767fe2d4a8e4a9ef52806) R=thestig@chromium.org Review URL: https://codereview.chromium.org/1461703008 .
2015-11-17Make FWL_ classes more consistently named.Tom Sepez
Rename IFWL_Target::m_pData to m_pImpl since it points to CFWL_*Imp classes. Rename CFWL_Widget:m_pImp to m_pIface since it points to IFWL_* interface classes. Here, the concrete classes have pointers to the corresponding interfaces, rather than inheriting from them, and this is likely due to someone not understanding virtual inheritance (since this code has the diamond problem in spades). Rename CFWL_Target to CWFL_TargetImp since it is the root of the CFWL_*Imp hierarchy, and is pointed to by the m_pImpl slot. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1446393002 .
2015-11-13Add AsLayoutItem()/ToLayoutItem() functions.Tom Sepez
Also protect the LayoutItem constructor, as !m_bIsContent implies the object can be cast to the container class, so ensure we don't make any of parent class. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1441243005 .
2015-11-13Rename LayoutItemImpl classes to LayoutItem.Tom Sepez
There is no longer a LayoutItem/LayoutItemImpl distinction. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1441423002 .
2015-11-13Fold CXFA_LayoutItem into CXFA_LayoutItemImpl.Tom Sepez
Fixes illegal casting between unrelated types, and removes about 30 explicit casts that are no longer required. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1441183002 .
2015-11-12Remove two unused IXFA interfaces.Tom Sepez
R=thestig@chromium.org Review URL: https://codereview.chromium.org/1439083002 .
2015-11-11XFA: Use c++ style casts elsewhere in xfa_ffnotify.cppTom Sepez
Added FIXMEs to the spots where danger lurks. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1438553003 .
2015-11-10Fix invalid cast in CXFA_FFNotify::OnLayoutItemRemoving().Tom Sepez
There's a re-interpretation followed by a pointer-adjusting static cast required here, not just a blatant re-interpretation. BUG=pdfium:271 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1431313005 .
2015-11-09fix an embedder test in XFA branch.Wei Li
The merge https://codereview.chromium.org/1411403012/ broken build since there are one more embedder test in XFA branch. Fix this test in this CL. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1415163008 .
2015-11-05Fix XFA compilation warnings, part 2Tom Sepez
Mostly unused variables, unused private members, or initialization order. Added a few missing initializers for pointer members along the way. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1414903004 .
2015-11-03Remove unused variablesJun Fang
BUG=pdfium:261 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1413343003 .