diff options
author | dsinclair <dsinclair@chromium.org> | 2016-12-08 14:05:14 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-12-08 14:05:14 -0800 |
commit | 43ac44cbf52076fd2354d5276c95d5b4b4a06d64 (patch) | |
tree | 28670fc2d1ee83358c717fb43ca7bc9301b2480f /xfa/fwl/cfwl_scrollbar.cpp | |
parent | 53ed03d9d865c312fdaa4434b83ed60619881226 (diff) | |
download | pdfium-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_scrollbar.cpp')
-rw-r--r-- | xfa/fwl/cfwl_scrollbar.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/xfa/fwl/cfwl_scrollbar.cpp b/xfa/fwl/cfwl_scrollbar.cpp index d6124c6515..a8e4447263 100644 --- a/xfa/fwl/cfwl_scrollbar.cpp +++ b/xfa/fwl/cfwl_scrollbar.cpp @@ -157,7 +157,7 @@ void CFWL_ScrollBar::Layout() { part.m_pWidget = this; m_fMinThumb = *static_cast<FX_FLOAT*>( pTheme->GetCapacity(&part, CFWL_WidgetCapacity::Size)); - GetClientRect(m_rtClient); + m_rtClient = GetClientRect(); CalcButtonLen(); CalcMinButtonRect(m_rtMinBtn); CalcMaxButtonRect(m_rtMaxBtn); @@ -433,7 +433,7 @@ void CFWL_ScrollBar::DoMouseDown(int32_t iItem, return; iState = CFWL_PartState_Pressed; - Repaint(&rtItem); + RepaintRect(rtItem); } void CFWL_ScrollBar::DoMouseUp(int32_t iItem, @@ -447,7 +447,7 @@ void CFWL_ScrollBar::DoMouseUp(int32_t iItem, return; iState = iNewState; - Repaint(&rtItem); + RepaintRect(rtItem); OnScroll(CFWL_EventScroll::Code::EndScroll, m_fTrackPos); } @@ -463,7 +463,7 @@ void CFWL_ScrollBar::DoMouseMove(int32_t iItem, return; iState = iNewState; - Repaint(&rtItem); + RepaintRect(rtItem); } else if ((2 == iItem) && (m_iThumbButtonState == CFWL_PartState_Pressed)) { FX_FLOAT fPos = GetTrackPointPos(fx, fy); m_fTrackPos = fPos; @@ -478,7 +478,7 @@ void CFWL_ScrollBar::DoMouseLeave(int32_t iItem, return; iState = CFWL_PartState_Normal; - Repaint(&rtItem); + RepaintRect(rtItem); } void CFWL_ScrollBar::DoMouseHover(int32_t iItem, @@ -488,7 +488,7 @@ void CFWL_ScrollBar::DoMouseHover(int32_t iItem, return; iState = CFWL_PartState_Hovered; - Repaint(&rtItem); + RepaintRect(rtItem); } CFWL_ScrollBar::Timer::Timer(CFWL_ScrollBar* pToolTip) : CFWL_Timer(pToolTip) {} |