summaryrefslogtreecommitdiff
path: root/xfa/fxfa/cxfa_ffpageview.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2018-01-08 14:30:00 -0500
committerChromium commit bot <commit-bot@chromium.org>2018-01-08 20:03:36 +0000
commit0c53b008b4f2f7a790f756d706a00e8de98dfedd (patch)
tree7e8a3e6c22792f8ee4e79c85a808ce6ea346dac1 /xfa/fxfa/cxfa_ffpageview.cpp
parent2f265dbf12831dece93a6a932fd99e5737cd1afd (diff)
downloadpdfium-0c53b008b4f2f7a790f756d706a00e8de98dfedd.tar.xz
Change the FFWidgets to store the node
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>
Diffstat (limited to 'xfa/fxfa/cxfa_ffpageview.cpp')
-rw-r--r--xfa/fxfa/cxfa_ffpageview.cpp18
1 files changed, 7 insertions, 11 deletions
diff --git a/xfa/fxfa/cxfa_ffpageview.cpp b/xfa/fxfa/cxfa_ffpageview.cpp
index 3fecf2e495..39f4dbe03b 100644
--- a/xfa/fxfa/cxfa_ffpageview.cpp
+++ b/xfa/fxfa/cxfa_ffpageview.cpp
@@ -70,11 +70,10 @@ bool PageWidgetFilter(CXFA_FFWidget* pWidget,
uint32_t dwFilter,
bool bTraversal,
bool bIgnorerelevant) {
- CXFA_WidgetAcc* pWidgetAcc = pWidget->GetDataAcc();
+ CXFA_Node* pNode = pWidget->GetNode();
if (!!(dwFilter & XFA_WidgetStatus_Focused) &&
- (!pWidgetAcc->GetNode() ||
- pWidgetAcc->GetNode()->GetElementType() != XFA_Element::Field)) {
+ (!pNode || pNode->GetElementType() != XFA_Element::Field)) {
return false;
}
@@ -310,8 +309,7 @@ bool CXFA_FFTabOrderPageWidgetIterator::SetCurrentWidget(
CXFA_FFWidget* CXFA_FFTabOrderPageWidgetIterator::GetTraverseWidget(
CXFA_FFWidget* pWidget) {
- CXFA_WidgetAcc* pAcc = pWidget->GetDataAcc();
- CXFA_Traversal* pTraversal = pAcc->GetNode()->GetChild<CXFA_Traversal>(
+ CXFA_Traversal* pTraversal = pWidget->GetNode()->GetChild<CXFA_Traversal>(
0, XFA_Element::Traversal, false);
if (pTraversal) {
CXFA_Traverse* pTraverse =
@@ -345,7 +343,7 @@ void CXFA_FFTabOrderPageWidgetIterator::CreateTabOrderWidgetArray() {
nWidgetCount) {
if (!pdfium::ContainsValue(m_TabOrderWidgetArray, hWidget)) {
m_TabOrderWidgetArray.push_back(hWidget);
- CXFA_WidgetAcc* pWidgetAcc = hWidget->GetDataAcc();
+ CXFA_WidgetAcc* pWidgetAcc = hWidget->GetNode()->GetWidgetAcc();
if (pWidgetAcc->GetUIType() == XFA_Element::ExclGroup) {
auto it = std::find(SpaceOrderWidgetArray.begin(),
SpaceOrderWidgetArray.end(), hWidget);
@@ -355,13 +353,11 @@ void CXFA_FFTabOrderPageWidgetIterator::CreateTabOrderWidgetArray() {
while (true) {
CXFA_FFWidget* pRadio =
SpaceOrderWidgetArray[iWidgetIndex % nWidgetCount];
- if (pRadio->GetDataAcc()->GetNode()->GetExclGroup() !=
- pWidgetAcc->GetNode()) {
+ if (pRadio->GetNode()->GetExclGroup() != pWidgetAcc->GetNode())
break;
- }
- if (!pdfium::ContainsValue(m_TabOrderWidgetArray, hWidget)) {
+ if (!pdfium::ContainsValue(m_TabOrderWidgetArray, hWidget))
m_TabOrderWidgetArray.push_back(pRadio);
- }
+
iWidgetIndex++;
}
}