diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2018-01-04 15:43:00 -0500 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-01-04 21:03:11 +0000 |
commit | b7e315c203c2af29ae56c2a6287547bc702c4cd3 (patch) | |
tree | 4965b798ff7aa821ebd803458ba7f53bc0d5d039 /xfa/fxfa/cxfa_ffnotify.cpp | |
parent | 24d779283af803077d8377fbdc49d9d07da335e7 (diff) | |
download | pdfium-b7e315c203c2af29ae56c2a6287547bc702c4cd3.tar.xz |
Remove CXFA_FFDocView from CXFA_WidgetAcc.
This CL removes the CXFA_FFDocView parameter from CXFA_WidgetAcc and
passes in the document to the methods which require a document.
Change-Id: I7b264caf0ed89d0453ae0b74c27f2ee0f31f61af
Reviewed-on: https://pdfium-review.googlesource.com/22260
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/cxfa_ffnotify.cpp')
-rw-r--r-- | xfa/fxfa/cxfa_ffnotify.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/xfa/fxfa/cxfa_ffnotify.cpp b/xfa/fxfa/cxfa_ffnotify.cpp index 1897a4e58f..193c31162e 100644 --- a/xfa/fxfa/cxfa_ffnotify.cpp +++ b/xfa/fxfa/cxfa_ffnotify.cpp @@ -189,14 +189,15 @@ void CXFA_FFNotify::StartFieldDrawLayout(CXFA_Node* pItem, if (!pAcc) return; - pAcc->StartWidgetLayout(fCalcWidth, fCalcHeight); + pAcc->StartWidgetLayout(m_pDoc.Get(), fCalcWidth, fCalcHeight); } bool CXFA_FFNotify::FindSplitPos(CXFA_Node* pItem, int32_t iBlockIndex, float& fCalcHeightPos) { CXFA_WidgetAcc* pAcc = pItem->GetWidgetAcc(); - return pAcc && pAcc->FindSplitPos(iBlockIndex, fCalcHeightPos); + return pAcc && + pAcc->FindSplitPos(m_pDoc->GetDocView(), iBlockIndex, fCalcHeightPos); } bool CXFA_FFNotify::RunScript(CXFA_Script* pScript, CXFA_Node* pFormItem) { @@ -213,7 +214,8 @@ bool CXFA_FFNotify::RunScript(CXFA_Script* pScript, CXFA_Node* pFormItem) { int32_t iRet; bool bRet; - std::tie(iRet, bRet) = pWidgetAcc->ExecuteBoolScript(pScript, &EventParam); + std::tie(iRet, bRet) = + pWidgetAcc->ExecuteBoolScript(pDocView, pScript, &EventParam); return iRet == XFA_EVENTERROR_Success && bRet; } @@ -337,8 +339,7 @@ void CXFA_FFNotify::OnNodeReady(CXFA_Node* pNode) { XFA_Element eType = pNode->GetElementType(); if (XFA_IsCreateWidget(eType)) { - pNode->JSObject()->SetWidgetAcc( - pdfium::MakeUnique<CXFA_WidgetAcc>(pDocView, pNode)); + pNode->JSObject()->SetWidgetAcc(pdfium::MakeUnique<CXFA_WidgetAcc>(pNode)); return; } switch (eType) { |