summaryrefslogtreecommitdiff
path: root/xfa/fwl/cfwl_listbox.cpp
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-12-08 14:05:14 -0800
committerCommit bot <commit-bot@chromium.org>2016-12-08 14:05:14 -0800
commit43ac44cbf52076fd2354d5276c95d5b4b4a06d64 (patch)
tree28670fc2d1ee83358c717fb43ca7bc9301b2480f /xfa/fwl/cfwl_listbox.cpp
parent53ed03d9d865c312fdaa4434b83ed60619881226 (diff)
downloadpdfium-43ac44cbf52076fd2354d5276c95d5b4b4a06d64.tar.xz
Cleanup CFWL_Widget code to return CFX_RectFs where appropriate
This Cl changes the various Get*Rect methods in CFWL_Widget to return CFX_RectF classes instead of taking an out parameter. The Repaint method is split into Repaint() and RepaintRect() in order to change the param to a const CFX_RectF& from a CFX_RectF*. Review-Url: https://codereview.chromium.org/2560873005
Diffstat (limited to 'xfa/fwl/cfwl_listbox.cpp')
-rw-r--r--xfa/fwl/cfwl_listbox.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/xfa/fwl/cfwl_listbox.cpp b/xfa/fwl/cfwl_listbox.cpp
index c126e5afb5..fafb61f4d2 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;
}