| 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 ac828570aa8f107104881ca849dd288015bab93f..093facbf333d6928d93dcf44de4faa5428067460 100644
|
| --- a/third_party/WebKit/Source/core/frame/LocalFrame.cpp
|
| +++ b/third_party/WebKit/Source/core/frame/LocalFrame.cpp
|
| @@ -775,7 +775,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())
|
| @@ -788,11 +788,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
|
|
|