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

Side by Side Diff: xfa/fxfa/app/xfa_fwladapter.cpp

Issue 2559643004: Change layout item in CFWL_Widget type from void (Closed)
Patch Set: Created 4 years 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 unified diff | Download patch
« no previous file with comments | « xfa/fwl/cfwl_widget.h ('k') | xfa/fxfa/app/xfa_fwltheme.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "xfa/fxfa/app/xfa_fwladapter.h" 7 #include "xfa/fxfa/app/xfa_fwladapter.h"
8 8
9 #include "xfa/fxfa/app/xfa_fffield.h" 9 #include "xfa/fxfa/app/xfa_fffield.h"
10 #include "xfa/fxfa/xfa_ffdoc.h" 10 #include "xfa/fxfa/xfa_ffdoc.h"
11 11
12 CXFA_FWLAdapterWidgetMgr::CXFA_FWLAdapterWidgetMgr() {} 12 CXFA_FWLAdapterWidgetMgr::CXFA_FWLAdapterWidgetMgr() {}
13 13
14 CXFA_FWLAdapterWidgetMgr::~CXFA_FWLAdapterWidgetMgr() {} 14 CXFA_FWLAdapterWidgetMgr::~CXFA_FWLAdapterWidgetMgr() {}
15 15
16 void CXFA_FWLAdapterWidgetMgr::RepaintWidget(CFWL_Widget* pWidget) { 16 void CXFA_FWLAdapterWidgetMgr::RepaintWidget(CFWL_Widget* pWidget) {
17 if (!pWidget) 17 if (!pWidget)
18 return; 18 return;
19 19
20 CXFA_FFWidget* pFFWidget = 20 CXFA_FFWidget* pFFWidget = pWidget->GetLayoutItem();
21 static_cast<CXFA_FFWidget*>(pWidget->GetLayoutItem());
22 if (!pFFWidget) 21 if (!pFFWidget)
23 return; 22 return;
24 23
25 pFFWidget->AddInvalidateRect(nullptr); 24 pFFWidget->AddInvalidateRect(nullptr);
26 } 25 }
27 26
28 bool CXFA_FWLAdapterWidgetMgr::GetPopupPos(CFWL_Widget* pWidget, 27 bool CXFA_FWLAdapterWidgetMgr::GetPopupPos(CFWL_Widget* pWidget,
29 FX_FLOAT fMinHeight, 28 FX_FLOAT fMinHeight,
30 FX_FLOAT fMaxHeight, 29 FX_FLOAT fMaxHeight,
31 const CFX_RectF& rtAnchor, 30 const CFX_RectF& rtAnchor,
32 CFX_RectF& rtPopup) { 31 CFX_RectF& rtPopup) {
33 CXFA_FFWidget* pFFWidget = 32 CXFA_FFWidget* pFFWidget = pWidget->GetLayoutItem();
34 static_cast<CXFA_FFWidget*>(pWidget->GetLayoutItem());
35 CFX_Matrix mt; 33 CFX_Matrix mt;
36 pFFWidget->GetRotateMatrix(mt); 34 pFFWidget->GetRotateMatrix(mt);
37 CFX_RectF rtRotateAnchor(rtAnchor); 35 CFX_RectF rtRotateAnchor(rtAnchor);
38 mt.TransformRect(rtRotateAnchor); 36 mt.TransformRect(rtRotateAnchor);
39 pFFWidget->GetDoc()->GetDocEnvironment()->GetPopupPos( 37 pFFWidget->GetDoc()->GetDocEnvironment()->GetPopupPos(
40 pFFWidget, fMinHeight, fMaxHeight, rtRotateAnchor, rtPopup); 38 pFFWidget, fMinHeight, fMaxHeight, rtRotateAnchor, rtPopup);
41 return true; 39 return true;
42 } 40 }
OLDNEW
« no previous file with comments | « xfa/fwl/cfwl_widget.h ('k') | xfa/fxfa/app/xfa_fwltheme.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698