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

Unified Diff: xfa/fwl/cfwl_listbox.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.cpp ('k') | xfa/fwl/cfwl_monthcalendar.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fwl/cfwl_listbox.cpp
diff --git a/xfa/fwl/cfwl_listbox.cpp b/xfa/fwl/cfwl_listbox.cpp
index 30c160a24802967869387859540bc2f7b6cd0163..de5538af76de543c5c5c08289aefa4c4964f2adb 100644
--- a/xfa/fwl/cfwl_listbox.cpp
+++ b/xfa/fwl/cfwl_listbox.cpp
@@ -385,7 +385,7 @@ bool CFWL_ListBox::ScrollToVisible(CFWL_ListItem* pItem) {
m_pVertScrollBar->SetPos(fPosY);
m_pVertScrollBar->SetTrackPos(fPosY);
- Repaint(&m_rtClient);
+ RepaintRect(m_rtClient);
return true;
}
@@ -554,7 +554,7 @@ CFX_SizeF CFWL_ListBox::CalcSize(bool bAutoSize) {
if (!m_pProperties->m_pThemeProvider)
return fs;
- GetClientRect(m_rtClient);
+ m_rtClient = GetClientRect();
m_rtConent = m_rtClient;
CFX_RectF rtUIMargin;
rtUIMargin.Set(0, 0, 0, 0);
@@ -841,7 +841,7 @@ void CFWL_ListBox::OnFocusChanged(CFWL_Message* pMsg, bool bSet) {
else
m_pProperties->m_dwStates &= ~(FWL_WGTSTATE_Focused);
- Repaint(&m_rtClient);
+ RepaintRect(m_rtClient);
}
void CFWL_ListBox::OnLButtonDown(CFWL_MessageMouse* pMsg) {
@@ -883,7 +883,7 @@ void CFWL_ListBox::OnLButtonDown(CFWL_MessageMouse* pMsg) {
SetFocusItem(pItem);
ScrollToVisible(pItem);
SetGrab(true);
- Repaint(&m_rtClient);
+ RepaintRect(m_rtClient);
}
void CFWL_ListBox::OnLButtonUp(CFWL_MessageMouse* pMsg) {
@@ -945,7 +945,7 @@ void CFWL_ListBox::OnVK(CFWL_ListItem* pItem, bool bShift, bool bCtrl) {
CFX_RectF rtInvalidate;
rtInvalidate.Set(0, 0, m_pProperties->m_rtWidget.width,
m_pProperties->m_rtWidget.height);
- Repaint(&rtInvalidate);
+ RepaintRect(rtInvalidate);
}
bool CFWL_ListBox::OnScroll(CFWL_ScrollBar* pScrollBar,
@@ -998,7 +998,7 @@ bool CFWL_ListBox::OnScroll(CFWL_ScrollBar* pScrollBar,
if (iCurPos != fPos) {
pScrollBar->SetPos(fPos);
pScrollBar->SetTrackPos(fPos);
- Repaint(&m_rtClient);
+ RepaintRect(m_rtClient);
}
return true;
}
« no previous file with comments | « xfa/fwl/cfwl_form.cpp ('k') | xfa/fwl/cfwl_monthcalendar.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698