Chromium Code Reviews| 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()); |
|
kenrb
2017/01/24 17:13:27
I am not clear on why this is necessary. Does this
wjmaclean
2017/01/24 18:24:26
Hmm, I don't think so, otherwise one would not exp
kenrb
2017/01/24 18:47:30
What I meant was, if the frames have been destroye
|
| if (ScrollingCoordinator* scrollingCoordinator = |
| m_frame->page()->scrollingCoordinator()) |