| Index: third_party/WebKit/Source/core/frame/LocalFrame.cpp
|
| diff --git a/third_party/WebKit/Source/core/frame/LocalFrame.cpp b/third_party/WebKit/Source/core/frame/LocalFrame.cpp
|
| index a669f98e0caa9a8c95eb96165f7e766d352d2238..817e40a9c7be61b1cf83a77543fa692e7ee23336 100644
|
| --- a/third_party/WebKit/Source/core/frame/LocalFrame.cpp
|
| +++ b/third_party/WebKit/Source/core/frame/LocalFrame.cpp
|
| @@ -781,7 +781,7 @@ ScrollResult LocalFrame::applyScrollDelta(ScrollGranularity granularity, const F
|
| FloatSize remainingDelta = delta;
|
|
|
| // If this is main frame, allow top controls to scroll first.
|
| - if (shouldScrollTopControls(delta))
|
| + if (shouldScrollTopControls(granularity, delta))
|
| remainingDelta = host()->topControls().scrollBy(remainingDelta);
|
|
|
| if (remainingDelta.isZero())
|
| @@ -794,11 +794,14 @@ ScrollResult LocalFrame::applyScrollDelta(ScrollGranularity granularity, const F
|
| return result;
|
| }
|
|
|
| -bool LocalFrame::shouldScrollTopControls(const FloatSize& delta) const
|
| +bool LocalFrame::shouldScrollTopControls(ScrollGranularity granularity, const FloatSize& delta) const
|
| {
|
| if (!isMainFrame())
|
| return false;
|
|
|
| + if (granularity != ScrollByPixel && granularity != ScrollByPrecisePixel)
|
| + return false;
|
| +
|
| // Always give the delta to the top controls if the scroll is in
|
| // the direction to show the top controls. If it's in the
|
| // direction to hide the top controls, only give the delta to the
|
|
|