Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(274)

Unified Diff: xfa/fxfa/app/xfa_fwladapter.cpp

Issue 2010923002: Add opaque "layout item" to widgets for caller's use. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Cast to FFWidget. Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fxfa/app/xfa_fftextedit.cpp ('k') | xfa/fxfa/app/xfa_fwltheme.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxfa/app/xfa_fwladapter.cpp
diff --git a/xfa/fxfa/app/xfa_fwladapter.cpp b/xfa/fxfa/app/xfa_fwladapter.cpp
index 4a0828b5ef9b506d0170485b5f9216056a80239b..ea63d84dfb9cae34d639915829c3a3a2e9aca1b1 100644
--- a/xfa/fxfa/app/xfa_fwladapter.cpp
+++ b/xfa/fxfa/app/xfa_fwladapter.cpp
@@ -18,11 +18,12 @@ FWL_Error CXFA_FWLAdapterWidgetMgr::RepaintWidget(IFWL_Widget* pWidget,
if (!pWidget)
return FWL_Error::Indefinite;
- CXFA_FFField* pField = (CXFA_FFField*)pWidget->GetPrivateData(pWidget);
- if (!pField)
+ CXFA_FFWidget* pFFWidget =
+ static_cast<CXFA_FFWidget*>(pWidget->GetLayoutItem());
+ if (!pFFWidget)
return FWL_Error::Indefinite;
- pField->AddInvalidateRect(nullptr);
+ pFFWidget->AddInvalidateRect(nullptr);
return FWL_Error::Succeeded;
}
@@ -31,7 +32,8 @@ FX_BOOL CXFA_FWLAdapterWidgetMgr::GetPopupPos(IFWL_Widget* pWidget,
FX_FLOAT fMaxHeight,
const CFX_RectF& rtAnchor,
CFX_RectF& rtPopup) {
- CXFA_FFWidget* pFFWidget = (CXFA_FFWidget*)(pWidget->GetPrivateData(pWidget));
+ CXFA_FFWidget* pFFWidget =
+ static_cast<CXFA_FFWidget*>(pWidget->GetLayoutItem());
CFX_Matrix mt;
pFFWidget->GetRotateMatrix(mt);
CFX_RectF rtRotateAnchor(rtAnchor);
« no previous file with comments | « xfa/fxfa/app/xfa_fftextedit.cpp ('k') | xfa/fxfa/app/xfa_fwltheme.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698