diff options
Diffstat (limited to 'chromium/third_party/blink/renderer/core/layout/layout_scrollbar_theme.cc')
-rw-r--r-- | chromium/third_party/blink/renderer/core/layout/layout_scrollbar_theme.cc | 33 |
1 files changed, 14 insertions, 19 deletions
diff --git a/chromium/third_party/blink/renderer/core/layout/layout_scrollbar_theme.cc b/chromium/third_party/blink/renderer/core/layout/layout_scrollbar_theme.cc index 39a27295a70..c358de3b4a6 100644 --- a/chromium/third_party/blink/renderer/core/layout/layout_scrollbar_theme.cc +++ b/chromium/third_party/blink/renderer/core/layout/layout_scrollbar_theme.cc @@ -39,10 +39,9 @@ LayoutScrollbarTheme* LayoutScrollbarTheme::GetLayoutScrollbarTheme() { return &theme; } -void LayoutScrollbarTheme::ButtonSizesAlongTrackAxis( - const ScrollbarThemeClient& scrollbar, - int& before_size, - int& after_size) { +void LayoutScrollbarTheme::ButtonSizesAlongTrackAxis(const Scrollbar& scrollbar, + int& before_size, + int& after_size) { IntRect first_button = BackButtonRect(scrollbar, kBackButtonStartPart); IntRect second_button = ForwardButtonRect(scrollbar, kForwardButtonStartPart); IntRect third_button = BackButtonRect(scrollbar, kBackButtonEndPart); @@ -56,7 +55,7 @@ void LayoutScrollbarTheme::ButtonSizesAlongTrackAxis( } } -bool LayoutScrollbarTheme::HasButtons(const ScrollbarThemeClient& scrollbar) { +bool LayoutScrollbarTheme::HasButtons(const Scrollbar& scrollbar) { int start_size; int end_size; ButtonSizesAlongTrackAxis(scrollbar, start_size, end_size); @@ -65,31 +64,27 @@ bool LayoutScrollbarTheme::HasButtons(const ScrollbarThemeClient& scrollbar) { : scrollbar.Height()); } -bool LayoutScrollbarTheme::HasThumb(const ScrollbarThemeClient& scrollbar) { +bool LayoutScrollbarTheme::HasThumb(const Scrollbar& scrollbar) { return TrackLength(scrollbar) - ThumbLength(scrollbar) >= 0; } -int LayoutScrollbarTheme::MinimumThumbLength( - const ScrollbarThemeClient& scrollbar) { +int LayoutScrollbarTheme::MinimumThumbLength(const Scrollbar& scrollbar) { return ToLayoutScrollbar(scrollbar).MinimumThumbLength(); } -IntRect LayoutScrollbarTheme::BackButtonRect( - const ScrollbarThemeClient& scrollbar, - ScrollbarPart part_type, - bool) { +IntRect LayoutScrollbarTheme::BackButtonRect(const Scrollbar& scrollbar, + ScrollbarPart part_type, + bool) { return ToLayoutScrollbar(scrollbar).ButtonRect(part_type); } -IntRect LayoutScrollbarTheme::ForwardButtonRect( - const ScrollbarThemeClient& scrollbar, - ScrollbarPart part_type, - bool) { +IntRect LayoutScrollbarTheme::ForwardButtonRect(const Scrollbar& scrollbar, + ScrollbarPart part_type, + bool) { return ToLayoutScrollbar(scrollbar).ButtonRect(part_type); } -IntRect LayoutScrollbarTheme::TrackRect(const ScrollbarThemeClient& scrollbar, - bool) { +IntRect LayoutScrollbarTheme::TrackRect(const Scrollbar& scrollbar, bool) { if (!HasButtons(scrollbar)) return scrollbar.FrameRect(); @@ -101,7 +96,7 @@ IntRect LayoutScrollbarTheme::TrackRect(const ScrollbarThemeClient& scrollbar, } IntRect LayoutScrollbarTheme::ConstrainTrackRectToTrackPieces( - const ScrollbarThemeClient& scrollbar, + const Scrollbar& scrollbar, const IntRect& rect) { IntRect back_rect = ToLayoutScrollbar(scrollbar).TrackPieceRectWithMargins( kBackTrackPart, rect); |