diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2018-01-08 14:30:00 -0500 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-01-08 20:03:36 +0000 |
commit | 0c53b008b4f2f7a790f756d706a00e8de98dfedd (patch) | |
tree | 7e8a3e6c22792f8ee4e79c85a808ce6ea346dac1 /xfa/fxfa/cxfa_fftext.cpp | |
parent | 2f265dbf12831dece93a6a932fd99e5737cd1afd (diff) | |
download | pdfium-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_fftext.cpp')
-rw-r--r-- | xfa/fxfa/cxfa_fftext.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/xfa/fxfa/cxfa_fftext.cpp b/xfa/fxfa/cxfa_fftext.cpp index baeb8fde43..e395621760 100644 --- a/xfa/fxfa/cxfa_fftext.cpp +++ b/xfa/fxfa/cxfa_fftext.cpp @@ -20,7 +20,7 @@ #include "xfa/fxfa/parser/cxfa_margin.h" #include "xfa/fxgraphics/cxfa_graphics.h" -CXFA_FFText::CXFA_FFText(CXFA_WidgetAcc* pDataAcc) : CXFA_FFDraw(pDataAcc) {} +CXFA_FFText::CXFA_FFText(CXFA_Node* pNode) : CXFA_FFDraw(pNode) {} CXFA_FFText::~CXFA_FFText() {} @@ -35,13 +35,13 @@ void CXFA_FFText::RenderWidget(CXFA_Graphics* pGS, CXFA_FFWidget::RenderWidget(pGS, mtRotate, dwStatus); - CXFA_TextLayout* pTextLayout = m_pDataAcc->GetTextLayout(); + CXFA_TextLayout* pTextLayout = m_pNode->GetWidgetAcc()->GetTextLayout(); if (!pTextLayout) return; CFX_RenderDevice* pRenderDevice = pGS->GetRenderDevice(); CFX_RectF rtText = GetRectWithoutRotate(); - CXFA_Margin* margin = m_pDataAcc->GetNode()->GetMargin(); + CXFA_Margin* margin = m_pNode->GetMargin(); if (margin) { CXFA_LayoutItem* pItem = this; if (!pItem->GetPrev() && !pItem->GetNext()) { @@ -66,13 +66,13 @@ void CXFA_FFText::RenderWidget(CXFA_Graphics* pGS, } bool CXFA_FFText::IsLoaded() { - CXFA_TextLayout* pTextLayout = m_pDataAcc->GetTextLayout(); + CXFA_TextLayout* pTextLayout = m_pNode->GetWidgetAcc()->GetTextLayout(); return pTextLayout && !pTextLayout->m_bHasBlock; } bool CXFA_FFText::PerformLayout() { CXFA_FFDraw::PerformLayout(); - CXFA_TextLayout* pTextLayout = m_pDataAcc->GetTextLayout(); + CXFA_TextLayout* pTextLayout = m_pNode->GetWidgetAcc()->GetTextLayout(); if (!pTextLayout) return false; if (!pTextLayout->m_bHasBlock) @@ -86,7 +86,7 @@ bool CXFA_FFText::PerformLayout() { pItem = pItem->GetFirst(); while (pItem) { CFX_RectF rtText = pItem->GetRect(false); - CXFA_Margin* margin = m_pDataAcc->GetNode()->GetMargin(); + CXFA_Margin* margin = m_pNode->GetMargin(); if (margin) { if (!pItem->GetPrev()) rtText.height -= margin->GetTopInset(); @@ -139,7 +139,7 @@ FWL_WidgetHit CXFA_FFText::OnHitTest(const CFX_PointF& point) { } const wchar_t* CXFA_FFText::GetLinkURLAtPoint(const CFX_PointF& point) { - CXFA_TextLayout* pTextLayout = m_pDataAcc->GetTextLayout(); + CXFA_TextLayout* pTextLayout = m_pNode->GetWidgetAcc()->GetTextLayout(); if (!pTextLayout) return nullptr; |