Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(420)

Unified Diff: third_party/WebKit/Source/web/WebViewImpl.cpp

Issue 1376003002: Make rendering timeouts work even if paint data received early (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cursor
Patch Set: Rebase that maybe works this time Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 6f670d37d17c972cad3066e025735e459336c8ef..719e53e481e548c21f6b3d7fb0eddd3e2efec49d 100644
--- a/third_party/WebKit/Source/web/WebViewImpl.cpp
+++ b/third_party/WebKit/Source/web/WebViewImpl.cpp
@@ -449,6 +449,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client)
, m_userGestureObserved(false)
, m_shouldDispatchFirstVisuallyNonEmptyLayout(false)
, m_shouldDispatchFirstLayoutAfterFinishedParsing(false)
+ , m_shouldDispatchFirstPaintAfterLoad(false)
, m_displayMode(WebDisplayModeBrowser)
, m_elasticOverscroll(FloatSize())
{
@@ -3867,6 +3868,11 @@ void WebViewImpl::didCommitLoad(bool isNewNavigation, bool isNavigationWithinPag
m_pageImportanceSignals.onCommitLoad();
}
+ if (m_shouldDispatchFirstPaintAfterLoad) {
+ m_shouldDispatchFirstPaintAfterLoad = false;
dcheng 2015/09/30 21:16:03 Why does this dispatch the didFirstPaintAfterLoad(
kenrb 2015/09/30 21:40:41 I've changed the name. The fact that it will queue
+ client()->didFirstPaintAfterLoad();
+ }
+
// Give the visual viewport's scroll layer its initial size.
page()->frameHost().visualViewport().mainFrameDidChangeSize();
@@ -4147,6 +4153,7 @@ void WebViewImpl::setRootGraphicsLayer(GraphicsLayer* layer)
m_layerTreeView->clearRootLayer();
m_shouldDispatchFirstVisuallyNonEmptyLayout = true;
m_shouldDispatchFirstLayoutAfterFinishedParsing = true;
+ m_shouldDispatchFirstPaintAfterLoad = true;
page()->frameHost().visualViewport().clearLayersForTreeView(m_layerTreeView);
}
}

Powered by Google App Engine
This is Rietveld 408576698