summaryrefslogtreecommitdiff
path: root/xfa/src/fxfa
AgeCommit message (Collapse)Author
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 .
2015-10-28A crasher due to lacking 'template' node in XFA fileJun Fang
A template node is mandatory in XFA file. Pdfium should ignore processing it when no template node is found in XFA file. BUG=pdfium:216 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1423903002 .
2015-10-27Revert accidental commits to XFA.Tom Sepez
Revert "Add an embedded test case" This reverts commit ec44186fdbca423eddf432be8b5c38914674023a. Revert "Update the format" This reverts commit 1df068061b5bb5e768a623318186523ffd251aaa. Revert "Update .in file" This reverts commit c13090439e1fbfd8a18c358058f137f897a7477b. Revert "Address review comments" This reverts commit 24967515b8be77a79aa1599f8fbf5d3ecbcd1769. TBR=jun_fang@foxitsoftware.com TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1414033007 .
2015-10-27Address review commentsJun Fang
2015-10-27Update the formatJun Fang
2015-10-27Add an embedded test caseJun Fang
2015-10-23Merge to XFA: Cleanup: Remove unused CPDF_Stream::Clone().Lei Zhang
Cloning a CPDF_Stream actually happens via CPDF_Object::Clone(). Transitively, remove: - GetStreamFilter() -- all the filters. Also remove CXFA_FileRead. R=jam@chromium.org Review URL: https://codereview.chromium.org/1288543002 . (cherry picked from commit c9a05f1c90860a97dbe4b8014bc4584bfa3a4580) Review URL: https://codereview.chromium.org/1297463002 .
2015-10-20XFA: Remove cond ? TRUE : FALSE.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1409323003 .
2015-10-02XFA: Remove test for new.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1377853004 .
2015-08-06XFA: clang-format all pdfium code, again.Nico Weber
Also add a presubmit that checks for this so I don't have to keep doing it. No behavior change. Generated by: find . -name '*.cpp' -o -name '*.h' | \ grep -E -v 'third_party|thirdparties|lpng_v163|tiff_v403' | \ xargs ../../buildtools/mac/clang-format -i Then manually merged https://codereview.chromium.org/1269223002/ See thread "tabs vs spaces" on pdfium@googlegroups.com for discussion. BUG=none R=thestig@chromium.org Review URL: https://codereview.chromium.org/1277043002 .
2015-08-05Kill off last uses of FX_NEW in XFA.Tom Sepez
It would seem that this never merged completely. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1277583002 .
2015-08-04XFA: clang-format all pdfium code.Nico Weber
No behavior change. Generated by: find . -name '*.cpp' -o -name '*.h' | \ grep -E -v 'third_party|thirdparties|lpng_v163|tiff_v403' | \ xargs ../../buildtools/mac/clang-format -i Then manually merged https://codereview.chromium.org/1269223002/ See thread "tabs vs spaces" on pdfium@googlegroups.com for discussion. BUG=none
2015-06-19Merge to XFA: Do some IWYU cleanups.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1176333002. (cherry picked from commit 0ef0de55657db8a83372ad8eb22d84c5893afc4c) Review URL: https://codereview.chromium.org/1195943005.
2015-06-19Fix -Wnon-virtual-dtor warnings on the XFA branch.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1183483003.
2015-06-10Merge to XFA: Remove FX_BSTR and FX_WSTR typedefs.Tom Sepez
Nearly automatic merge + re-run script on new files. Original Review URL: https://codereview.chromium.org/1180593004. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1174303002.
2015-06-10Merge to XFA: Remove typdefs for pointer types in fx_system.h.Tom Sepez
Original Review URL: https://codereview.chromium.org/1171733003 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1178613002.
2015-06-09Merge to XFA: Use stdint.h types throughout PDFium.Tom Sepez
Near-automatic merge, plus re-running scripts to update additional usage. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1172793002
2015-06-02Replace XFA_HWIDGET with IXFA_Widget*Tom Sepez
A second case of casting willy-nilly between unrelated structures to provide information hiding. Bad Idea. Remove dozens of casts in the process. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1155273002