diff options
author | Tom Sepez <tsepez@chromium.org> | 2017-03-06 14:00:07 -0800 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-03-06 22:24:25 +0000 |
commit | 312ce172c276089309214a027450241edb2aa399 (patch) | |
tree | 9143bde61367041afe042b0e5a0658119a2070bf /xfa/fxfa/app | |
parent | 22c70125a888930effa9d10d6afc4f8188d94691 (diff) | |
download | pdfium-312ce172c276089309214a027450241edb2aa399.tar.xz |
Remove CFX_StackTemplate in xfa_utils.h.
Tree traversal doesn't require a stack as we always have
parent pointers in nodes.
Break the code into smaller units to help make more
comprehensible what is going on.
Remove init methods and force callers to pass us root
in the constructor.
The operations are complicated by the lack of a last child
or previous sibling pointer in our nodes.
Change-Id: Ia32bb44354352686cb79ccd67fe8aa5cd5ccef58
Reviewed-on: https://pdfium-review.googlesource.com/2913
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/app')
-rw-r--r-- | xfa/fxfa/app/xfa_ffpageview.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/xfa/fxfa/app/xfa_ffpageview.cpp b/xfa/fxfa/app/xfa_ffpageview.cpp index 7ae5493ba6..caff52c6c0 100644 --- a/xfa/fxfa/app/xfa_ffpageview.cpp +++ b/xfa/fxfa/app/xfa_ffpageview.cpp @@ -146,15 +146,15 @@ IXFA_WidgetIterator* CXFA_FFPageView::CreateWidgetIterator( } CXFA_FFPageWidgetIterator::CXFA_FFPageWidgetIterator(CXFA_FFPageView* pPageView, - uint32_t dwFilter) { - m_pPageView = pPageView; - m_dwFilter = dwFilter; - m_sIterator.Init(pPageView); + uint32_t dwFilter) + : m_pPageView(pPageView), m_dwFilter(dwFilter), m_sIterator(pPageView) { m_bIgnorerelevant = m_pPageView->GetDocView()->GetDoc()->GetXFADoc()->GetCurVersionMode() < XFA_VERSION_205; } + CXFA_FFPageWidgetIterator::~CXFA_FFPageWidgetIterator() {} + void CXFA_FFPageWidgetIterator::Reset() { m_sIterator.Reset(); } @@ -432,8 +432,7 @@ void CXFA_FFTabOrderPageWidgetIterator::OrderContainer( } void CXFA_FFTabOrderPageWidgetIterator::CreateSpaceOrderWidgetArray( std::vector<CXFA_FFWidget*>* WidgetArray) { - CXFA_LayoutItemIterator sIterator; - sIterator.Init(m_pPageView); + CXFA_LayoutItemIterator sIterator(m_pPageView); auto pParam = pdfium::MakeUnique<CXFA_TabParam>(); bool bCurrentItem = false; bool bContentArea = false; |