| Index: third_party/WebKit/Source/core/loader/FrameLoader.cpp
|
| diff --git a/third_party/WebKit/Source/core/loader/FrameLoader.cpp b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
|
| index 24b4a63d43c5123611eee2045d8400145599a277..d00788375e1777320690be32430200d15521c850 100644
|
| --- a/third_party/WebKit/Source/core/loader/FrameLoader.cpp
|
| +++ b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
|
| @@ -1442,6 +1442,7 @@ void FrameLoader::restoreScrollPositionAndViewState() {
|
| }
|
|
|
| VisualViewport& visualViewport = m_frame->host()->visualViewport();
|
| + float originalScale = visualViewport.scale();
|
| if (shouldRestoreScale && shouldRestoreScroll) {
|
| visualViewport.setScaleAndLocation(m_currentItem->pageScaleFactor(),
|
| FloatPoint(visualViewportOffset));
|
| @@ -1450,6 +1451,9 @@ void FrameLoader::restoreScrollPositionAndViewState() {
|
| } else if (shouldRestoreScroll) {
|
| visualViewport.setLocation(FloatPoint(visualViewportOffset));
|
| }
|
| + // If necessary, notify client we've restored page scale.
|
| + if (shouldRestoreScale && (originalScale != visualViewport.scale()))
|
| + client()->didRestorePageScaleFactorOnLoad(visualViewport.scale());
|
|
|
| if (ScrollingCoordinator* scrollingCoordinator =
|
| m_frame->page()->scrollingCoordinator())
|
|
|