| Index: third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp
|
| diff --git a/third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp b/third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp
|
| index 6d5b7a1d6413667c0cf6b8b610cbe2324d75243e..704806e6096c549fcaa01e001b38e1e1e2a79205 100644
|
| --- a/third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp
|
| +++ b/third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp
|
| @@ -60,9 +60,12 @@ struct SameSizeAsScrollableArea {
|
|
|
| static_assert(sizeof(ScrollableArea) == sizeof(SameSizeAsScrollableArea), "ScrollableArea should stay small");
|
|
|
| -int ScrollableArea::pixelsPerLineStep()
|
| +int ScrollableArea::pixelsPerLineStep(HostWindow* host)
|
| {
|
| - return kPixelsPerLineStep;
|
| + if (!host)
|
| + return kPixelsPerLineStep;
|
| + FloatRect tmpRectInViewport = host->windowToViewport(FloatRect(1, 0, 0, 0));
|
| + return kPixelsPerLineStep * tmpRectInViewport.x();
|
| }
|
|
|
| float ScrollableArea::minFractionToStepWhenPaging()
|
| @@ -566,7 +569,7 @@ DoublePoint ScrollableArea::clampScrollPosition(const DoublePoint& scrollPositio
|
|
|
| int ScrollableArea::lineStep(ScrollbarOrientation) const
|
| {
|
| - return pixelsPerLineStep();
|
| + return pixelsPerLineStep(hostWindow());
|
| }
|
|
|
| int ScrollableArea::pageStep(ScrollbarOrientation orientation) const
|
|
|