Chromium Code Reviews| Index: third_party/WebKit/Source/web/WebViewImpl.cpp |
| diff --git a/third_party/WebKit/Source/web/WebViewImpl.cpp b/third_party/WebKit/Source/web/WebViewImpl.cpp |
| index 7be5f1006676c7800988794aeae343f3fe494fa6..dbc95cea10b156ae6382562a2ec2922b3bffd873 100644 |
| --- a/third_party/WebKit/Source/web/WebViewImpl.cpp |
| +++ b/third_party/WebKit/Source/web/WebViewImpl.cpp |
| @@ -3990,14 +3990,17 @@ void WebViewImpl::setSelectionColors(unsigned activeBackgroundColor, |
| #endif |
| } |
| -void WebViewImpl::didCommitLoad(bool isNewNavigation, bool isNavigationWithinPage) |
| +void WebViewImpl::didCommitLoad(HistoryCommitType commitType, bool isNavigationWithinPage) |
| { |
| if (!isNavigationWithinPage) { |
| - m_shouldDispatchFirstVisuallyNonEmptyLayout = true; |
| - m_shouldDispatchFirstLayoutAfterFinishedParsing = true; |
| - m_shouldDispatchFirstLayoutAfterFinishedLoading = true; |
| + if (commitType == StandardCommit || commitType == BackForwardCommit) { |
| + m_shouldDispatchFirstVisuallyNonEmptyLayout = true; |
| + m_shouldDispatchFirstLayoutAfterFinishedParsing = true; |
| + m_shouldDispatchFirstLayoutAfterFinishedLoading = true; |
| + } |
| - if (isNewNavigation) { |
| + if (commitType == StandardCommit) { |
| + // A new session history item should be created for this load. |
| pageScaleConstraintsSet().setNeedsReset(true); |
| m_pageImportanceSignals.onCommitLoad(); |
| } |
| @@ -4298,6 +4301,12 @@ void WebViewImpl::setRootGraphicsLayer(GraphicsLayer* layer) |
| // attempt to paint too early in the next page load. |
| m_layerTreeView->setDeferCommits(true); |
| m_layerTreeView->clearRootLayer(); |
| + |
| + // didMeaningfulLayout() should be dispatched again. |
| + m_shouldDispatchFirstVisuallyNonEmptyLayout = true; |
|
dglazkov
2016/01/15 19:41:48
Interesting! This is a partial revert of https://c
wychen
2016/01/15 22:31:02
This is still needed, for cases like refreshing, o
dglazkov
2016/01/15 22:36:43
Both refresh and redirect will result in a new did
wychen
2016/01/21 01:47:52
Ah. I filtered out HistoryInertCommit in this patc
|
| + m_shouldDispatchFirstLayoutAfterFinishedParsing = true; |
| + m_shouldDispatchFirstLayoutAfterFinishedLoading = true; |
| + |
| visualViewport.clearLayersForTreeView(m_layerTreeView); |
| } |
| } |