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

Side by Side Diff: xfa/fwl/core/cfwl_widget.cpp

Issue 2555253002: Split CFWL_Widget::GetWidgetRect into two parts (Closed)
Patch Set: Rebase to master 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/core/cfwl_widget.h ('k') | no next file » | 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/fwl/core/cfwl_widget.h" 7 #include "xfa/fwl/core/cfwl_widget.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <utility> 10 #include <utility>
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 bool CFWL_Widget::IsInstance(const CFX_WideStringC& wsClass) const { 64 bool CFWL_Widget::IsInstance(const CFX_WideStringC& wsClass) const {
65 return false; 65 return false;
66 } 66 }
67 67
68 void CFWL_Widget::GetWidgetRect(CFX_RectF& rect, bool bAutoSize) { 68 void CFWL_Widget::GetWidgetRect(CFX_RectF& rect, bool bAutoSize) {
69 if (!bAutoSize) { 69 if (!bAutoSize) {
70 rect = m_pProperties->m_rtWidget; 70 rect = m_pProperties->m_rtWidget;
71 return; 71 return;
72 } 72 }
73 InflateWidgetRect(rect);
74 }
73 75
76 void CFWL_Widget::InflateWidgetRect(CFX_RectF& rect) {
74 if (HasEdge()) { 77 if (HasEdge()) {
75 FX_FLOAT fEdge = GetEdgeWidth(); 78 FX_FLOAT fEdge = GetEdgeWidth();
76 rect.Inflate(fEdge, fEdge); 79 rect.Inflate(fEdge, fEdge);
77 } 80 }
78 if (HasBorder()) { 81 if (HasBorder()) {
79 FX_FLOAT fBorder = GetBorderSize(true); 82 FX_FLOAT fBorder = GetBorderSize(true);
80 rect.Inflate(fBorder, fBorder); 83 rect.Inflate(fBorder, fBorder);
81 } 84 }
82 } 85 }
83 86
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after
717 } 720 }
718 default: 721 default:
719 break; 722 break;
720 } 723 }
721 } 724 }
722 725
723 void CFWL_Widget::OnProcessEvent(CFWL_Event* pEvent) {} 726 void CFWL_Widget::OnProcessEvent(CFWL_Event* pEvent) {}
724 727
725 void CFWL_Widget::OnDrawWidget(CFX_Graphics* pGraphics, 728 void CFWL_Widget::OnDrawWidget(CFX_Graphics* pGraphics,
726 const CFX_Matrix* pMatrix) {} 729 const CFX_Matrix* pMatrix) {}
OLDNEW
« no previous file with comments | « xfa/fwl/core/cfwl_widget.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698