Chromium Code Reviews| Index: third_party/WebKit/Source/platform/scroll/Scrollbar.cpp |
| diff --git a/third_party/WebKit/Source/platform/scroll/Scrollbar.cpp b/third_party/WebKit/Source/platform/scroll/Scrollbar.cpp |
| index 84b5b4099679a7c7426243db0c27b62b94999579..253a1925ce53be4a27a18a31f9f621c7897d52a3 100644 |
| --- a/third_party/WebKit/Source/platform/scroll/Scrollbar.cpp |
| +++ b/third_party/WebKit/Source/platform/scroll/Scrollbar.cpp |
| @@ -69,6 +69,7 @@ Scrollbar::Scrollbar(ScrollableArea* scrollableArea, |
| // scrollbars (rather than leaving one dimension of the scrollbar alone when |
| // sizing). |
| int thickness = m_theme.scrollbarThickness(controlSize); |
| + m_themeScrollbarThickness = thickness; |
|
oshima
2016/10/14 23:17:30
don't you have to cache for each controlSize?
malaykeshav
2016/10/14 23:18:54
For a given scrollbar instance the ControlSize doe
|
| if (m_hostWindow) |
| thickness = m_hostWindow->windowToViewportScalar(thickness); |
| Widget::setFrameRect(IntRect(0, 0, thickness, thickness)); |
| @@ -526,8 +527,7 @@ int Scrollbar::scrollbarThickness() const { |
| int thickness = orientation() == HorizontalScrollbar ? height() : width(); |
| if (!thickness || !m_hostWindow) |
| return thickness; |
| - return m_hostWindow->windowToViewportScalar( |
| - m_theme.scrollbarThickness(controlSize())); |
| + return m_hostWindow->windowToViewportScalar(m_themeScrollbarThickness); |
| } |
| bool Scrollbar::isOverlayScrollbar() const { |