From d7d584df24fda9c9a28330959cc28f94dc0294e2 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Mon, 22 Jan 2018 18:41:36 +0000 Subject: Add flag to notify if a node widget is ready This CL updates CXFA_Object to have a flag which annotates if the node is ready. Ready means that we've gone through the OnNodeReady call in CXFA_FFNotify. Previously we'd check if the WidgetAcc exists on the node which is created in OnNodeReady. This CL replaces all the points where we check for a WidgetAcc existing with a IsWidgetReady() call. Change-Id: I54e8160269c3104cdae7a516c1814c13bee15130 Reviewed-on: https://pdfium-review.googlesource.com/23190 Reviewed-by: Henrique Nakashima Commit-Queue: dsinclair --- xfa/fxfa/cxfa_widgetacciterator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xfa/fxfa/cxfa_widgetacciterator.cpp') diff --git a/xfa/fxfa/cxfa_widgetacciterator.cpp b/xfa/fxfa/cxfa_widgetacciterator.cpp index ece5604f7d..c92832f029 100644 --- a/xfa/fxfa/cxfa_widgetacciterator.cpp +++ b/xfa/fxfa/cxfa_widgetacciterator.cpp @@ -17,7 +17,7 @@ CXFA_WidgetAcc* CXFA_WidgetAccIterator::MoveToNext() { CXFA_Node* pItem = m_pCurWidgetAcc ? m_ContentIterator.MoveToNext() : m_ContentIterator.GetCurrent(); while (pItem) { - m_pCurWidgetAcc = pItem->GetWidgetAcc(); + m_pCurWidgetAcc = pItem->IsWidgetReady() ? pItem->GetWidgetAcc() : nullptr; if (m_pCurWidgetAcc) return m_pCurWidgetAcc.Get(); pItem = m_ContentIterator.MoveToNext(); -- cgit v1.2.3