summaryrefslogtreecommitdiff
path: root/xfa/fxfa/cxfa_ffwidget.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2018-01-04 13:40:07 -0500
committerChromium commit bot <commit-bot@chromium.org>2018-01-04 18:58:11 +0000
commit4a1de7211af344f6acc784f4fe346ef8c8da7bd1 (patch)
tree563ae3e7eda4a4d440e0c2246319e385f96948b9 /xfa/fxfa/cxfa_ffwidget.cpp
parentc1e5756a43020665855d9d309c47b9dfe625b54f (diff)
downloadpdfium-4a1de7211af344f6acc784f4fe346ef8c8da7bd1.tar.xz
Change CXFA_WidgetAcc::GetNextWidget to not require the FFDocView
This CL changes GetNextWidget to assume that a valid parameter is passed to the method. For callers which passed nullptr, we change to get a vaild initial widget from the doc view directly. Change-Id: I50c06082831645f62339ade59d5026f546e07840 Reviewed-on: https://pdfium-review.googlesource.com/22254 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/cxfa_ffwidget.cpp')
-rw-r--r--xfa/fxfa/cxfa_ffwidget.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/xfa/fxfa/cxfa_ffwidget.cpp b/xfa/fxfa/cxfa_ffwidget.cpp
index 82ed1aeffe..2f4dcb4755 100644
--- a/xfa/fxfa/cxfa_ffwidget.cpp
+++ b/xfa/fxfa/cxfa_ffwidget.cpp
@@ -36,6 +36,7 @@
#include "xfa/fxfa/parser/cxfa_edge.h"
#include "xfa/fxfa/parser/cxfa_fill.h"
#include "xfa/fxfa/parser/cxfa_image.h"
+#include "xfa/fxfa/parser/cxfa_layoutprocessor.h"
#include "xfa/fxfa/parser/cxfa_margin.h"
#include "xfa/fxfa/parser/cxfa_node.h"
#include "xfa/fxgraphics/cxfa_gecolor.h"
@@ -1282,7 +1283,9 @@ CXFA_FFWidget* CXFA_FFWidget::GetParent() {
CXFA_WidgetAcc* pParentWidgetAcc =
static_cast<CXFA_WidgetAcc*>(pParentNode->GetWidgetAcc());
if (pParentWidgetAcc) {
- return pParentWidgetAcc->GetNextWidget(nullptr);
+ CXFA_LayoutProcessor* layout = GetDocView()->GetXFALayout();
+ return static_cast<CXFA_FFWidget*>(
+ layout->GetLayoutItem(pParentWidgetAcc->GetNode()));
}
}
return nullptr;