summaryrefslogtreecommitdiff
path: root/xfa/fxfa/cxfa_ffimage.cpp
AgeCommit message (Collapse)Author
2018-06-27Remove CXFA_FField::UnloadWidget().Tom Sepez
It is only called during the destructor, and does things that the destructor would automatically do, like calling into the superclass. So just use destructors. Change-Id: I1196817798eeca99914b44ddee1f75781e682211 Reviewed-on: https://pdfium-review.googlesource.com/36231 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-05-02Use pointer instead of ref for XFA_RectWithoutMargin param.chromium/3418Henrique Nakashima
Removed many null checks since XFA_RectWithoutMargin already checks if the margin is null internally. Change-Id: I21f5101fe38559eb02f4c3aaf081ff29ce293e47 Reviewed-on: https://pdfium-review.googlesource.com/31993 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2018-05-02Pass DPI as CFX_Size in XFA_DrawImage.Henrique Nakashima
Change-Id: Ifbcb727402c1c28a6e8abe02511d6da6828c02f7 Reviewed-on: https://pdfium-review.googlesource.com/31915 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2018-05-02Remove int out params from reference to pointer in CXFA_Node.Henrique Nakashima
Return a CFX_Size instead. Change-Id: I3bef1093fbc887237aa69dc942f878af27b4e8e9 Reviewed-on: https://pdfium-review.googlesource.com/31911 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-01-25Remove empty FF classesDan Sinclair
This CL removes the empty FFDraw and FFSubForm classes and uses the FFWidget base class directly. Change-Id: If65ee85fda78774bb90d6fec60ca5529cc37f3e0 Reviewed-on: https://pdfium-review.googlesource.com/23971 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-23Remove GetWidgetAcc callsDan Sinclair
This CL removes the calls to CXFA_Node::GetWidgetAcc() as they redundantly return the node they were called upon. Change-Id: I46e66cf98137a1dee7cd3fa8bc7d379eb97fded5 Reviewed-on: https://pdfium-review.googlesource.com/23630 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-23Merge CXFA_WidgetAcc into CXFA_Nodechromium/3330Dan Sinclair
This CL merges CXFA_WidgetAcc into CXFA_Node. Change-Id: Iab52ca7f98c9dcd4ab089c61b8f1324a565bf647 Reviewed-on: https://pdfium-review.googlesource.com/23610 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-22Remove unused WidgetPreRemove and WidgetPostAdd paramsDan Sinclair
This CL removes the unused WidgetAcc param from both methods and updates callsites as needed. The include for cxfa_widgetacc.h was removed from fxfa.h and had to be inserted in locations where needed. Change-Id: I55ae9e935a948dff3b6d906b4567665e60530eba Reviewed-on: https://pdfium-review.googlesource.com/23391 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-16Rename CXFA_Value methods for clarityDan Sinclair
This CL marks the methods in CXFA_Value to make it clear which can return nullptr and updates callsites as needed. Change-Id: If1f794bcbbddaa57a1efdd67195df58a77b4373a Reviewed-on: https://pdfium-review.googlesource.com/22773 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2018-01-11Rename GetFormValue to GetFormValueIfExistsDan Sinclair
This CL makes it clear that GetFormValue can return nullptr and fixes up a few callsites as needed. Change-Id: Id2e85b0956a678b5b338b9e2a4d32731fe6c4729 Reviewed-on: https://pdfium-review.googlesource.com/22690 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-10Rename GetPara to GetParaIfExistschromium/3318Dan Sinclair
This CL renames GetPara to make it explicit it can return nullptr. Change-Id: I7c6529c15646b9947964e25a8d28938b38f091d6 Reviewed-on: https://pdfium-review.googlesource.com/22680 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-10Rename GetMargin to GetMarginIfExistsDan Sinclair
This CL makes it explicit that GetMargin may return a nullptr. Change-Id: I46780e8df9e966accc38baf56f8aa5149533db87 Reviewed-on: https://pdfium-review.googlesource.com/22675 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-10Correct spelling for XFA_RectWithoutMarginDan Sinclair
Fix spelling mistake. Change-Id: I1322bf898d8bf558f4d1e8d9b3294cf31f916c87 Reviewed-on: https://pdfium-review.googlesource.com/22671 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-08Change the FFWidgets to store the nodeDan Sinclair
This CL changes the various CXFA_FF* widgets to hold a CXFA_Node instead of a CXFA_WidgetAcc wrapper. Change-Id: I7e31633d5ffd3b61abcdcdfeee7822514c5b28da Reviewed-on: https://pdfium-review.googlesource.com/22410 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-08Move proxy methods from CXFA_WidgetAcc to CXFA_NodeDan Sinclair
This CL moves methods from WidgetAcc which just proxy to CXFA_Node. Change-Id: Icf1006b4be3f91077de411ed1a571b1507117602 Reviewed-on: https://pdfium-review.googlesource.com/22391 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-04Remove CXFA_FFDocView from CXFA_WidgetAcc.Dan Sinclair
This CL removes the CXFA_FFDocView parameter from CXFA_WidgetAcc and passes in the document to the methods which require a document. Change-Id: I7b264caf0ed89d0453ae0b74c27f2ee0f31f61af Reviewed-on: https://pdfium-review.googlesource.com/22260 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-03Fold CXFA_ImageData into CXFA_ImageDan Sinclair
This CL folds the CXFA_ImageData wrapper into CXFA_Image. Change-Id: I36596abc4dff7d17dc6ee13a857a084f41164c7a Reviewed-on: https://pdfium-review.googlesource.com/22190 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-03Fold CXFA_MarginData into CXFA_Marginchromium/3311Dan Sinclair
This CL removes the CXFA_MarginData wrapper and moves the methods directly to CXFA_Margin. Change-Id: I7c9e979fb78d0d356605f1318489daabcb8c32cd Reviewed-on: https://pdfium-review.googlesource.com/22110 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-12-14Fold CXFA_ParaData into CXFA_ParaDan Sinclair
This CL removes the CXFA_ParaData wrapper and folds the code into CXFA_Para. Change-Id: I86d139f1df48dcc80d28c7516b1bda95a59e94bd Reviewed-on: https://pdfium-review.googlesource.com/21270 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-12-14Fold CXFA_ValueData into CXFA_ValueDan Sinclair
The CXFA_ValueData class is a thin wrapper around the CXFA_Value, this CL moves the methods from CXFA_ValueData into CXFA_Value. Change-Id: I2c57e93e5c4675b82af71cf75f2dfc0fb12e4b20 Reviewed-on: https://pdfium-review.googlesource.com/21170 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
2017-11-30Rename XFA_ATTRIBUTEENUM to XFA_AttributeEnum enum classDan Sinclair
This CL changes the enum XFA_ATTRIBUTEENUM to an enum class XFA_AttributeEnum. Methods expecting an int32 have been updated to take or return the XFA_AttrbuteEnum type. Change-Id: I268453949545fe2dd3eae707be4d9cc7edeff763 Reviewed-on: https://pdfium-review.googlesource.com/20070 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-11-21Cleanup CXFA_ParaDataDan Sinclair
This CL fixes the return types and makes the CXFA_ParaData methods const. Change-Id: Ifb63b46e826d9741682d992d7fc1ee37c772fb41 Reviewed-on: https://pdfium-review.googlesource.com/19070 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-11-21Cleanup CXFA_ImageDataDan Sinclair
This CL removes the second constructor parameter which is always true and removes all related conditionals. The methods have been changed to const and return instead of using out parameters. Change-Id: Id6d2aa533a212e961e3b8169eef57b7e868d503e Reviewed-on: https://pdfium-review.googlesource.com/19010 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
2017-11-20Remove CXFA_DataData operator bool overrideDan Sinclair
This CL removes CXFA_DataData::operator bool in favour of an explicit HasValidNode method. This makes the call sites a lot clearer. Change-Id: I6fae14fdeec4674ca7916e21b9e5703070fc3069 Reviewed-on: https://pdfium-review.googlesource.com/18830 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2017-11-07Rename CXFA_Value to CXFA_ValueDatachromium/3262Dan Sinclair
This CL renames CXFA_Value to CXFA_ValueData to show it's part of the data hierarchy. Change-Id: I4693234f503903a2c11d76a56dbbb6de5f0c3718 Reviewed-on: https://pdfium-review.googlesource.com/18018 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-11-07Rename CXFA_Para to CXFA_ParaDataDan Sinclair
This CL renames CXFA_Para to CXFA_ParaData to show it is part of the data hierarchy. Change-Id: I71f58c87416b17d1e59252ca374aad13935fc430 Reviewed-on: https://pdfium-review.googlesource.com/17989 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-11-07Rename CXFA_Margin to CXFA_MarginDataDan Sinclair
This CL renames CXFA_Margin to CXFA_MarginData to reflect the fact this is part of the data hierarchy. Change-Id: I50d82d01fcaf35c621f13b8b68bc04d850ec885a Reviewed-on: https://pdfium-review.googlesource.com/17986 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-11-07Rename CXFA_Image to CXFA_ImageDataDan Sinclair
This CL renames CXFA_Image to CXFA_ImageData to make it clear it's part of the data hierarchy. Change-Id: Ia593ef3c9deb872db11f8246b13ef3c39a90d4c7 Reviewed-on: https://pdfium-review.googlesource.com/17984 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-09-22Fix crash when rendering invalid GIFRyan Harrison
The core fix in this CL is a change to how LWZ decompression works, so that when the min code table size and the color palette size are different, color codes after the end of the defined color palette are considered errors. This CL also introduces a bunch of tweaks to the call return path, since there were multiple locations where the GIF decode failing status was being dropped on the floor, so the end widget would have a bitmap with the default colour in it, instead of nothing. BUG=chromium:616671 Change-Id: Id6f40d552dc24650c91e9903f710ff2fa63bc774 Reviewed-on: https://pdfium-review.googlesource.com/14630 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-09-21Rename CFX_RetainPtr to RetainPtrDan Sinclair
This CL renames CFX_RetainPtr to RetainPtr and places in the fxcrt namespace. Bug: pdfium:898 Change-Id: I8798a9f79cb0840d3f037e8d04937cedd742914e Reviewed-on: https://pdfium-review.googlesource.com/14616 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-08-17Change CXFA_FFWidget::RenderWidget() to take a const CFX_Matrix&.Lei Zhang
Change some related code to take a const CFX_Matrix* since it is not immediately obvious if the matrix can be made into a const-ref. Change-Id: I15c840222b575cc479b1f6f0b6d3b3c0e50d5515 Reviewed-on: https://pdfium-review.googlesource.com/11113 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-07-24Move xfa/fxfa/app to xfa/fxfachromium/3166Dan Sinclair
There currently exists a weird split where some files exist in xfa/fxfa and some files exist in xfa/fxfa/app. This CL removes the app/ folder and moves all files up to the parent directory. Change-Id: I00c87851a1ebc5a7a636eb9a17b58ba3f1708a84 Reviewed-on: https://pdfium-review.googlesource.com/8810 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>