| 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 85c73df4a0db2517f8a404a18985d24c889f91ff..e2df524c5b30e79aab837bc13b00b5901bc64831 100644
|
| --- a/third_party/WebKit/Source/core/frame/VisualViewport.cpp
|
| +++ b/third_party/WebKit/Source/core/frame/VisualViewport.cpp
|
| @@ -96,13 +96,22 @@ void VisualViewport::updateStyleAndLayoutIgnorePendingStylesheets()
|
| document->updateStyleAndLayoutIgnorePendingStylesheets();
|
| }
|
|
|
| -void VisualViewport::enqueueChangedEvent()
|
| +void VisualViewport::enqueueScrollEvent()
|
| {
|
| if (!RuntimeEnabledFeatures::visualViewportAPIEnabled())
|
| return;
|
|
|
| if (Document* document = mainFrame()->document())
|
| - document->enqueueVisualViewportChangedEvent();
|
| + document->enqueueVisualViewportScrollEvent();
|
| +}
|
| +
|
| +void VisualViewport::enqueueResizeEvent()
|
| +{
|
| + if (!RuntimeEnabledFeatures::visualViewportAPIEnabled())
|
| + return;
|
| +
|
| + if (Document* document = mainFrame()->document())
|
| + document->enqueueVisualViewportResizeEvent();
|
| }
|
|
|
| void VisualViewport::setSize(const IntSize& size)
|
| @@ -124,7 +133,7 @@ void VisualViewport::setSize(const IntSize& size)
|
| if (!mainFrame())
|
| return;
|
|
|
| - enqueueChangedEvent();
|
| + enqueueResizeEvent();
|
|
|
| bool autosizerNeedsUpdating = widthDidChange
|
| && mainFrame()->settings()
|
| @@ -291,6 +300,7 @@ void VisualViewport::setScaleAndLocation(float scale, const FloatPoint& location
|
| m_scale = scale;
|
| valuesChanged = true;
|
| frameHost().chromeClient().pageScaleFactorChanged();
|
| + enqueueResizeEvent();
|
| }
|
|
|
| FloatPoint clampedOffset(clampOffsetToBoundaries(location));
|
| @@ -308,6 +318,8 @@ void VisualViewport::setScaleAndLocation(float scale, const FloatPoint& location
|
| document->enqueueScrollEventForNode(document);
|
| }
|
|
|
| + enqueueScrollEvent();
|
| +
|
| mainFrame()->loader().client()->didChangeScrollOffset();
|
| valuesChanged = true;
|
| }
|
| @@ -315,8 +327,6 @@ void VisualViewport::setScaleAndLocation(float scale, const FloatPoint& location
|
| if (!valuesChanged)
|
| return;
|
|
|
| - enqueueChangedEvent();
|
| -
|
| InspectorInstrumentation::didUpdateLayout(mainFrame());
|
| mainFrame()->loader().saveScrollState();
|
|
|
|
|