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

Unified Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 2823873002: Fixed the paint supression to track only render-blocking stylesheets
Patch Set: Added sim tests Created 3 years, 7 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 | third_party/WebKit/Source/web/tests/WebMeaningfulLayoutsTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/Document.cpp
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
index e59fd92e24388367e640533f8a3d9c6eeb3d1eb2..4bf7a60a4557379a78ca37bf42fddd2394f01a5f 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -2290,7 +2290,7 @@ void Document::LayoutUpdated() {
// of layout thrashing even though that layout might not be followed by
// a paint for many seconds.
if (IsRenderingReady() && body() &&
- !GetStyleEngine().HasPendingScriptBlockingSheets()) {
+ !GetStyleEngine().HasPendingRenderBlockingSheets()) {
rune 2017/05/11 19:40:53 Not sure if I fully wrapped my head around the com
Pat Meenan 2017/05/11 20:25:29 Good point. The main issue with IsRenderingReady
rune 2017/05/11 22:06:10 Thanks for the clarification. Don't you also need
Pat Meenan 2017/05/12 13:24:08 I was largely trying to carry-over the existing be
if (!document_timing_.FirstLayout())
document_timing_.MarkFirstLayout();
}
@@ -2319,7 +2319,7 @@ void Document::ClearFocusedElementTimerFired(TimerBase*) {
void Document::UpdateStyleAndLayoutTreeIgnorePendingStylesheets() {
StyleEngine::IgnoringPendingStylesheet ignoring(GetStyleEngine());
- if (GetStyleEngine().HasPendingScriptBlockingSheets()) {
+ if (GetStyleEngine().HasPendingRenderBlockingSheets()) {
// FIXME: We are willing to attempt to suppress painting with outdated style
// info only once. Our assumption is that it would be dangerous to try to
// stop it a second time, after page content has already been loaded and
@@ -4056,7 +4056,7 @@ void Document::StyleResolverMayHaveChanged() {
}
if (DidLayoutWithPendingStylesheets() &&
- !GetStyleEngine().HasPendingScriptBlockingSheets()) {
+ !GetStyleEngine().HasPendingRenderBlockingSheets()) {
// We need to manually repaint because we avoid doing all repaints in layout
// or style recalc while sheets are still loading to avoid FOUC.
pending_sheet_layout_ = kIgnoreLayoutWithPendingSheets;
« no previous file with comments | « no previous file | third_party/WebKit/Source/web/tests/WebMeaningfulLayoutsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698