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

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

Issue 1380363005: Find a better place for setting Layout/Paint hook related flags. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b708684218ae54a865aeae4eeb2b26bc81067bdf..aaae12c8c6983414012c430a304fe752f3665f82 100644
--- a/third_party/WebKit/Source/web/WebViewImpl.cpp
+++ b/third_party/WebKit/Source/web/WebViewImpl.cpp
@@ -3880,9 +3880,14 @@ void WebViewImpl::setSelectionColors(unsigned activeBackgroundColor,
void WebViewImpl::didCommitLoad(bool isNewNavigation, bool isNavigationWithinPage)
{
- if (isNewNavigation && !isNavigationWithinPage) {
- pageScaleConstraintsSet().setNeedsReset(true);
- m_pageImportanceSignals.onCommitLoad();
+ if (!isNavigationWithinPage) {
+ m_shouldDispatchFirstVisuallyNonEmptyLayout = true;
+ m_shouldDispatchFirstLayoutAfterFinishedParsing = true;
+
+ if (isNewNavigation) {
+ pageScaleConstraintsSet().setNeedsReset(true);
+ m_pageImportanceSignals.onCommitLoad();
Alexander Semashko 2015/10/05 13:11:11 As a side question, do these two lines need to be
bokan 2015/10/05 18:03:30 I can only speak to the setNeedsReset on pageScale
+ }
}
// Give the visual viewport's scroll layer its initial size.
@@ -4163,8 +4168,6 @@ void WebViewImpl::setRootGraphicsLayer(GraphicsLayer* layer)
// attempt to paint too early in the next page load.
m_layerTreeView->setDeferCommits(true);
m_layerTreeView->clearRootLayer();
- m_shouldDispatchFirstVisuallyNonEmptyLayout = true;
- m_shouldDispatchFirstLayoutAfterFinishedParsing = true;
page()->frameHost().visualViewport().clearLayersForTreeView(m_layerTreeView);
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698