summaryrefslogtreecommitdiff
path: root/xfa/fxfa/cxfa_ffnotify.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2018-01-18 21:02:37 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-01-18 21:02:37 +0000
commitbbd02f1cd05f55cabee8fbd23a645ac69ac32574 (patch)
tree7932068c2548ed977e235b8ef38d36317a560c8e /xfa/fxfa/cxfa_ffnotify.cpp
parent4aadb708642003404e666026bb6d390b5989e2b4 (diff)
downloadpdfium-bbd02f1cd05f55cabee8fbd23a645ac69ac32574.tar.xz
Move XFA_IsCreateWidget to CXFA_Object
This CL removes the free XFA_IsCreateWidget method and moves the functionality into CXFA_Object::HasCreatedUIWidget to clarify the purpose. Change-Id: Icca1f49238040b5d87fbb4eb33340f9309f5e2f3 Reviewed-on: https://pdfium-review.googlesource.com/23133 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'xfa/fxfa/cxfa_ffnotify.cpp')
-rw-r--r--xfa/fxfa/cxfa_ffnotify.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/xfa/fxfa/cxfa_ffnotify.cpp b/xfa/fxfa/cxfa_ffnotify.cpp
index 1322461875..3f41620030 100644
--- a/xfa/fxfa/cxfa_ffnotify.cpp
+++ b/xfa/fxfa/cxfa_ffnotify.cpp
@@ -113,11 +113,11 @@ CXFA_ContainerLayoutItem* CXFA_FFNotify::OnCreateContainerLayoutItem(
CXFA_ContentLayoutItem* CXFA_FFNotify::OnCreateContentLayoutItem(
CXFA_Node* pNode) {
- XFA_Element eType = pNode->GetElementType();
- ASSERT(eType != XFA_Element::ContentArea && eType != XFA_Element::PageArea);
+ ASSERT(pNode->GetElementType() != XFA_Element::ContentArea);
+ ASSERT(pNode->GetElementType() != XFA_Element::PageArea);
// We only need to create the widget for certain types of objects.
- if (!XFA_IsCreateWidget(eType))
+ if (!pNode->HasCreatedUIWidget())
return new CXFA_ContentLayoutItem(pNode);
CXFA_FFWidget* pWidget;
@@ -343,13 +343,12 @@ void CXFA_FFNotify::OnNodeReady(CXFA_Node* pNode) {
if (!pDocView)
return;
- XFA_Element eType = pNode->GetElementType();
- if (XFA_IsCreateWidget(eType)) {
+ if (pNode->HasCreatedUIWidget()) {
pNode->CreateWidgetAcc();
return;
}
- switch (eType) {
+ switch (pNode->GetElementType()) {
case XFA_Element::BindItems:
pDocView->AddBindItem(static_cast<CXFA_BindItems*>(pNode));
break;