| 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 a22acee19d764e04fa887b5d83d551d39a3cd0c5..5368e426f5b4ecb0b67ec11485a4132ff5653492 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
|
|
|