From bbd02f1cd05f55cabee8fbd23a645ac69ac32574 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Thu, 18 Jan 2018 21:02:37 +0000 Subject: 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 Reviewed-by: Ryan Harrison --- xfa/fxfa/cxfa_ffnotify.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'xfa/fxfa/cxfa_ffnotify.cpp') 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(pNode)); break; -- cgit v1.2.3