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

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

Issue 330043002: Simplified code for styleResolverChanged. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 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 | Source/core/dom/DocumentStyleSheetCollection.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index d3ff7e416ef064d37ab0cf9a617667826fd9bde1..55e477fca45fd5b23b1f76dcaa12d5fdf52fa7ab 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -3445,19 +3445,16 @@ void Document::styleResolverChanged(StyleResolverUpdateMode updateMode)
if (!m_styleEngine)
return;
- StyleResolverChange change = m_styleEngine->resolverChanged(updateMode);
- if (change.needsRepaint()) {
+ m_styleEngine->resolverChanged(updateMode);
+
+ if (didLayoutWithPendingStylesheets() && haveStylesheetsLoaded()) {
// We need to manually repaint because we avoid doing all repaints in layout or style
// recalc while sheets are still loading to avoid FOUC.
m_pendingSheetLayout = IgnoreLayoutWithPendingSheets;
renderView()->repaintViewAndCompositedLayers();
}
- if (!change.needsStyleRecalc())
- return;
-
m_evaluateMediaQueriesOnStyleRecalc = true;
- setNeedsStyleRecalc(SubtreeStyleChange);
}
void Document::styleResolverMayHaveChanged()
« no previous file with comments | « no previous file | Source/core/dom/DocumentStyleSheetCollection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698