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

Unified Diff: xfa/fwl/cfwl_form.cpp

Issue 2560873005: Cleanup CFWL_Widget code to return CFX_RectFs where appropriate (Closed)
Patch Set: Review feedback 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fwl/cfwl_form.h ('k') | xfa/fwl/cfwl_listbox.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fwl/cfwl_form.cpp
diff --git a/xfa/fwl/cfwl_form.cpp b/xfa/fwl/cfwl_form.cpp
index 624957163f0a79045d008e20b99637b3de2cab92..4d978a503aca7105fc282e69b5b2edc3dec90d0c 100644
--- a/xfa/fwl/cfwl_form.cpp
+++ b/xfa/fwl/cfwl_form.cpp
@@ -80,9 +80,10 @@ bool CFWL_Form::IsInstance(const CFX_WideStringC& wsClass) const {
return CFWL_Widget::IsInstance(wsClass);
}
-void CFWL_Form::GetClientRect(CFX_RectF& rect) {
- rect = m_pProperties->m_rtWidget;
+CFX_RectF CFWL_Form::GetClientRect() {
+ CFX_RectF rect = m_pProperties->m_rtWidget;
rect.Offset(-rect.left, -rect.top);
+ return rect;
}
void CFWL_Form::Update() {
@@ -384,11 +385,11 @@ void CFWL_Form::SetWorkAreaRect() {
return;
m_bSetMaximize = true;
- Repaint(&m_rtRelative);
+ RepaintRect(m_rtRelative);
}
void CFWL_Form::Layout() {
- GetRelativeRect(m_rtRelative);
+ m_rtRelative = GetRelativeRect();
#ifndef FWL_UseMacSystemBorder
ResetSysBtn();
@@ -519,7 +520,7 @@ void CFWL_Form::OnLButtonDown(CFWL_MessageMouse* pMsg) {
return;
pPressBtn->SetPressed();
- Repaint(&pPressBtn->m_rtBtn);
+ RepaintRect(pPressBtn->m_rtBtn);
}
void CFWL_Form::OnLButtonUp(CFWL_MessageMouse* pMsg) {
@@ -535,7 +536,7 @@ void CFWL_Form::OnLButtonUp(CFWL_MessageMouse* pMsg) {
if (m_bMaximized) {
SetWidgetRect(m_rtRestore);
Update();
- Repaint(nullptr);
+ Repaint();
} else {
SetWorkAreaRect();
Update();
@@ -598,7 +599,7 @@ void CFWL_Form::OnMouseMove(CFWL_MessageMouse* pMsg) {
#endif
if (!rtInvalidate.IsEmpty())
- Repaint(&rtInvalidate);
+ RepaintRect(rtInvalidate);
}
void CFWL_Form::OnMouseLeave(CFWL_MessageMouse* pMsg) {
@@ -607,7 +608,7 @@ void CFWL_Form::OnMouseLeave(CFWL_MessageMouse* pMsg) {
return;
pHover->SetNormal();
- Repaint(&pHover->m_rtBtn);
+ RepaintRect(pHover->m_rtBtn);
}
void CFWL_Form::OnLButtonDblClk(CFWL_MessageMouse* pMsg) {
« no previous file with comments | « xfa/fwl/cfwl_form.h ('k') | xfa/fwl/cfwl_listbox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698