summaryrefslogtreecommitdiff
path: root/xfa/fxfa/cxfa_ffimage.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-06-27 17:54:50 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-06-27 17:54:50 +0000
commitd78a964c31f303e828453ee189d4998558bac8e1 (patch)
treefe74133529c24a276616bbb2e34a0986da1bbe4a /xfa/fxfa/cxfa_ffimage.cpp
parent9e12f14814722c0c0d46d4968f636b5e1a72a1e7 (diff)
downloadpdfium-d78a964c31f303e828453ee189d4998558bac8e1.tar.xz
Remove CXFA_FField::UnloadWidget().
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>
Diffstat (limited to 'xfa/fxfa/cxfa_ffimage.cpp')
-rw-r--r--xfa/fxfa/cxfa_ffimage.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/xfa/fxfa/cxfa_ffimage.cpp b/xfa/fxfa/cxfa_ffimage.cpp
index cb4990eb81..cc640cef3b 100644
--- a/xfa/fxfa/cxfa_ffimage.cpp
+++ b/xfa/fxfa/cxfa_ffimage.cpp
@@ -18,7 +18,7 @@
CXFA_FFImage::CXFA_FFImage(CXFA_Node* pNode) : CXFA_FFWidget(pNode) {}
CXFA_FFImage::~CXFA_FFImage() {
- CXFA_FFImage::UnloadWidget();
+ GetNode()->SetImageImage(nullptr);
}
bool CXFA_FFImage::IsLoaded() {
@@ -29,12 +29,7 @@ bool CXFA_FFImage::LoadWidget() {
if (GetNode()->GetImageImage())
return true;
- return GetNode()->LoadImageImage(GetDoc()) ? CXFA_FFWidget::LoadWidget()
- : false;
-}
-
-void CXFA_FFImage::UnloadWidget() {
- GetNode()->SetImageImage(nullptr);
+ return GetNode()->LoadImageImage(GetDoc()) && CXFA_FFWidget::LoadWidget();
}
void CXFA_FFImage::RenderWidget(CXFA_Graphics* pGS,