Chromium Code Reviews| 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..dbce492dab0526d247c3e8a34e8851baec27d2c1 100644 |
| --- a/xfa/fxfa/app/xfa_fwladapter.cpp |
| +++ b/xfa/fxfa/app/xfa_fwladapter.cpp |
| @@ -18,7 +18,7 @@ FWL_Error CXFA_FWLAdapterWidgetMgr::RepaintWidget(IFWL_Widget* pWidget, |
| if (!pWidget) |
| return FWL_Error::Indefinite; |
| - CXFA_FFField* pField = (CXFA_FFField*)pWidget->GetPrivateData(pWidget); |
| + CXFA_FFField* pField = static_cast<CXFA_FFField*>(pWidget->GetLayoutItem()); |
|
Lei Zhang
2016/05/26 22:43:17
If you static_cast this to a CXFA_FFWidget instead
Tom Sepez
2016/05/27 00:02:14
Done.
|
| if (!pField) |
| return FWL_Error::Indefinite; |
| @@ -31,7 +31,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); |