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

Unified Diff: Source/web/WebViewImpl.cpp

Issue 1292143003: Don't resume commits after every layout. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Always resume commits after the main document has finished parsing. Created 5 years, 4 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
« no previous file with comments | « Source/web/WebViewImpl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebViewImpl.cpp
diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp
index 799e600dc5c88da71cd989b129d96abdcc2e5bb2..d8656d6eebae75568f19bd5519ed71be85da2918 100644
--- a/Source/web/WebViewImpl.cpp
+++ b/Source/web/WebViewImpl.cpp
@@ -3884,6 +3884,15 @@ void WebViewImpl::willInsertBody(WebLocalFrameImpl* webframe)
resumeTreeViewCommits();
}
+void WebViewImpl::didFinishDocumentLoad(WebLocalFrameImpl* webframe)
+{
+ if (webframe != mainFrameImpl())
+ return;
+ // If we finished parsing and there's no sheets to load start painting.
+ if (webframe->frame()->document()->isRenderingReady())
+ resumeTreeViewCommits();
+}
+
void WebViewImpl::didRemoveAllPendingStylesheet(WebLocalFrameImpl* webframe)
{
if (webframe != mainFrameImpl())
@@ -3915,10 +3924,6 @@ void WebViewImpl::layoutUpdated(WebLocalFrameImpl* webframe)
if (!m_client || !webframe->frame()->isLocalRoot())
return;
- // If we finished a layout while in deferred commit mode,
- // that means it's time to start producing frames again so un-defer.
- resumeTreeViewCommits();
-
if (m_shouldAutoResize && webframe->frame() && webframe->frame()->view()) {
WebSize frameSize = webframe->frame()->view()->frameRect().size();
if (frameSize != m_size) {
« no previous file with comments | « Source/web/WebViewImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698