summaryrefslogtreecommitdiff
path: root/xfa
AgeCommit message (Collapse)Author
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-09Fix errors in BEGIN_FWL_MESSAGE_DEF macrosTom Sepez
The proper way to "wide-stringify" a parameter is by L###arg, not L"## arg ##", which does no replacement. Also remove dubious CloneToEvent() method, and make the proper event in the one place it is called. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1510493005 .
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-07Remove C-Style casts in severl other fwl_...imp.cpp filesTom Sepez
Uncovered bad casts in a couple of places, replaced with correct objects. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1503583003 .
2015-12-04Remove C-Style casts in fwl_{barcode,caret,checkbox,combobox}imp.cppTom Sepez
In the process, found two CFWL_ classes that didn't inherit from the virtual inteface they were allegedly supporting. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1499853003 .
2015-12-04Remove unused Thread class and static members.Tom Sepez
R=thestig@chromium.org Review URL: https://codereview.chromium.org/1500023003 .
2015-12-04Tidy fwl_widgetimp.cpp.Tom Sepez
Remove some dead code. Add missing consts. Convert some integer expressions to bools for return. Remove expression (with bad cast) that can't happen. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1496323004 .
2015-12-04Fix dubious casting in fwl_widgetimp.cpp.Tom Sepez
Remove dead code along the way. BUG=pdfium:300 R=jun_fang@foxitsoftware.com, thestig@chromium.org Review URL: https://codereview.chromium.org/1490093006 .
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-02Add MakeWidgetImpProperties() helper method.Tom Sepez
Remove duplicate code from 10 places. R=ochang@chromium.org Review URL: https://codereview.chromium.org/1486283002 .
2015-12-01Make CFWL_Custom consistenly named.Tom Sepez
It's part of the CFWL_*Imp hierarchy, and hence should be named CFWL_CustomImp. CFWL_Custom would belong to a differnt hierarchy according to naming conventions. R=ochang@chromium.org Review URL: https://codereview.chromium.org/1491723002 .
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 in LoadFont() when non-standard font is used in XFA filesJun Fang
This CL includes the following changes: 1. Add return value for InitFont(). It can indicate a failure in the initialization of non-standard fonts. 2. Change NULL to nullptr. 3. Rewrite several pointer checking. BUG=pdfium:279, pdfium:286 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1465423002 .
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-20XFA: Fix a few fxjse warnings.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1463703002 .
2015-11-20Fix CFWL_WidgetImpDelegate hierarchy.Tom Sepez
Instead of casting to the unrelated IFWL_WidgetDelegate class and hoping that its vtables line up, make CFWL_WidgetImpDelegate inherit from it. We can then remove a lot of casting, even during delete given that it has a virtual dtor. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1458173002 .
2015-11-20Fix Mac compilation at 5500da04e3acTom Sepez
TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1460293002 .
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-18Kill dead IFWL_*::Initialize() variants dead.Tom Sepez
Remove default argument in remaining variants. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1453373006 .
2015-11-18Make IFWL_Target::m_pImpl a private member.Tom Sepez
Remove pointless subclass dtors since CFWL_TargetImpl has a virtual dtor, and can be deleted by the base class. Kept pointless subclass ctors for the moment to hopefully combine with Initialize someday, though they need not do anything since the base class ctor nulls out m_pImpl. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1460883002 .
2015-11-18Fold IFWL_TargetData into IFWL_TargetTom Sepez
IFWL_TargetData was a sibling class to which we illegally cast other IFWL_ classes just to get access to a member, to which they already had access in many cases. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1452403002 .
2015-11-17Rename additional IFWL imp classesTom Sepez
Follow-on from https://codereview.chromium.org/1446393002/ R=thestig@chromium.org Review URL: https://codereview.chromium.org/1457663002 .
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-13XFA: Remove empty files in xfa/src/fgas/src/crt/codepage.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1443563002 .
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-13Make CFWL_WidgetMgr{Delegate} inherit from IFWL_WidgetMgr{Delegate}.Tom Sepez
C-style casting masked a fairly serious botch, where an CFWL_ type would get cast to an IFWL_ type, and later we'd invoke virtual methods against the IFWL_ type. Without the proper inheritance, there's no reason to believe that the vtables for each of these would line up with each other. Fixing the inheritence allows us to remove the c-style casts. I'm guessing these were added to make this compile without having to understand the true nature of the flaw. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1439093003 .
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-09Merge to XFA: Fix all relative includes to core.Lei Zhang
Do some IWYU to fix build errors due to files that have no #includes but just happened to work previously because the #includes were in the right order. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1407423004 . (cherry picked from commit 9e7cd8ffb81c564e1102f6c6459ec0942a0b11ea) Review URL: https://codereview.chromium.org/1425163004 .
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-06XFA: Actually fix all relative includes to third_party.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1413253003 .
2015-11-06Merge to XFA: Fix all relative includes to third_party.Lei Zhang
- In non-standalone builds, use the provided jpeg library. - Run gn format over all the GN files. - Also roll DEPS for buildtools to c2f2598. - And fix XFA's lack of #includes. BUG=541704 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1425153006 . (cherry picked from commit 34bb6c58fe60206a08dc0a1f37b7cfe83e8c762c) Review URL: https://codereview.chromium.org/1434543003 .
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-05Remove harmony proxy from XFAJun Fang
BUG=pdfium:221 R=jochen@chromium.org Review URL: https://codereview.chromium.org/1315803003 .
2015-11-03Remove unused variablesJun Fang
BUG=pdfium:261 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1413343003 .
2015-11-02Fix XFA compilation noise, part 1.Tom Sepez
Mainly: volatile/override/method shadowing. unused variables. intialization list init order. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1422113003 .
2015-10-30XFA: Remove dead code in CBC_BufferedImageLuminanceSource and friends.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1422713007 .
2015-10-30XFA: Remove null CFX_DIBAttribute default argument.Tom Sepez
Add some consts and overrides along the way. Group some statics together. Tidy some unused vars. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1411683005 .