| 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 a0cf00d408c4abffd97e7ebf5ae735fdc54c4c80..f79cdd89d63dae424a9ad66b06d9d03829f2887c 100644
|
| --- a/third_party/WebKit/Source/platform/scroll/Scrollbar.cpp
|
| +++ b/third_party/WebKit/Source/platform/scroll/Scrollbar.cpp
|
| @@ -26,7 +26,6 @@
|
| #include "platform/scroll/Scrollbar.h"
|
|
|
| #include <algorithm>
|
| -#include "platform/HostWindow.h"
|
| #include "platform/PlatformGestureEvent.h"
|
| #include "platform/PlatformMouseEvent.h"
|
| #include "platform/graphics/paint/CullRect.h"
|
| @@ -41,22 +40,21 @@
|
|
|
| namespace blink {
|
|
|
| -PassRefPtrWillBeRawPtr<Scrollbar> Scrollbar::create(ScrollableArea* scrollableArea, ScrollbarOrientation orientation, ScrollbarControlSize size, HostWindow* hostWindow)
|
| -{
|
| - return adoptRefWillBeNoop(new Scrollbar(scrollableArea, orientation, size, hostWindow));
|
| +PassRefPtrWillBeRawPtr<Scrollbar> Scrollbar::create(ScrollableArea* scrollableArea, ScrollbarOrientation orientation, ScrollbarControlSize size)
|
| +{
|
| + return adoptRefWillBeNoop(new Scrollbar(scrollableArea, orientation, size));
|
| }
|
|
|
| PassRefPtrWillBeRawPtr<Scrollbar> Scrollbar::createForTesting(ScrollableArea* scrollableArea, ScrollbarOrientation orientation, ScrollbarControlSize size, ScrollbarTheme* theme)
|
| {
|
| - return adoptRefWillBeNoop(new Scrollbar(scrollableArea, orientation, size, nullptr, theme));
|
| -}
|
| -
|
| -Scrollbar::Scrollbar(ScrollableArea* scrollableArea, ScrollbarOrientation orientation, ScrollbarControlSize controlSize, HostWindow* hostWindow, ScrollbarTheme* theme)
|
| + return adoptRefWillBeNoop(new Scrollbar(scrollableArea, orientation, size, theme));
|
| +}
|
| +
|
| +Scrollbar::Scrollbar(ScrollableArea* scrollableArea, ScrollbarOrientation orientation, ScrollbarControlSize controlSize, ScrollbarTheme* theme)
|
| : m_scrollableArea(scrollableArea)
|
| , m_orientation(orientation)
|
| , m_controlSize(controlSize)
|
| , m_theme(theme ? *theme : ScrollbarTheme::theme())
|
| - , m_hostWindow(hostWindow)
|
| , m_visibleSize(0)
|
| , m_totalSize(0)
|
| , m_currentPos(0)
|
| @@ -80,8 +78,6 @@
|
| // scrollbar thickness and use it when sizing scrollbars (rather than leaving one dimension of the scrollbar
|
| // alone when sizing).
|
| int thickness = m_theme.scrollbarThickness(controlSize);
|
| - if (m_hostWindow)
|
| - thickness = m_hostWindow->screenToViewport(thickness);
|
| Widget::setFrameRect(IntRect(0, 0, thickness, thickness));
|
|
|
| m_currentPos = scrollableAreaCurrentPos();
|
| @@ -475,15 +471,6 @@
|
| setNeedsPaintInvalidation();
|
| }
|
|
|
| -int Scrollbar::scrollbarThickness() const
|
| -{
|
| - int thickness = orientation() == HorizontalScrollbar ? height() : width();
|
| - if (!thickness || !m_hostWindow)
|
| - return thickness;
|
| - return m_hostWindow->screenToViewport(m_theme.scrollbarThickness(controlSize()));
|
| -}
|
| -
|
| -
|
| bool Scrollbar::isOverlayScrollbar() const
|
| {
|
| return m_theme.usesOverlayScrollbars();
|
|
|