| Index: third_party/WebKit/Source/core/frame/VisualViewport.cpp
|
| diff --git a/third_party/WebKit/Source/core/frame/VisualViewport.cpp b/third_party/WebKit/Source/core/frame/VisualViewport.cpp
|
| index 27d28a57431ab7d5584dcbb09901899c7f6e79c9..b13c3b0c43bfa85d046121437ee380efda5b999e 100644
|
| --- a/third_party/WebKit/Source/core/frame/VisualViewport.cpp
|
| +++ b/third_party/WebKit/Source/core/frame/VisualViewport.cpp
|
| @@ -253,6 +253,14 @@
|
| // First try to use the anchor's delta to scroll the FrameView.
|
| FloatSize anchorDeltaUnusedByScroll = anchorDelta;
|
|
|
| + if (!frameHost().settings().invertViewportScrollOrder()) {
|
| + FrameView* view = mainFrame()->view();
|
| + DoublePoint oldPosition = view->scrollPositionDouble();
|
| + view->scrollBy(DoubleSize(anchorDelta.width(), anchorDelta.height()), UserScroll);
|
| + DoublePoint newPosition = view->scrollPositionDouble();
|
| + anchorDeltaUnusedByScroll -= toFloatSize(newPosition - oldPosition);
|
| + }
|
| +
|
| // Manually bubble any remaining anchor delta up to the visual viewport.
|
| FloatPoint newLocation(location() + anchorDeltaUnusedByScroll);
|
| setScaleAndLocation(newPageScale, newLocation);
|
|
|