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

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

Issue 1913833002: Current work-in-progress crbug.com/567021 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed html import issue. Created 4 years 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/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 8a394b442085bdb71681852e61ec9f615ff941ec..cc83b1f9fb1c95a38cd9253f7b616f5276f03575 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -568,8 +568,11 @@ MediaQueryMatcher& Document::mediaQueryMatcher() {
}
void Document::mediaQueryAffectingValueChanged() {
- m_evaluateMediaQueriesOnStyleRecalc = true;
styleEngine().mediaQueryAffectingValueChanged();
+ if (needsLayoutTreeUpdate())
+ m_evaluateMediaQueriesOnStyleRecalc = true;
+ else
+ evaluateMediaQueryList();
InspectorInstrumentation::mediaQueryResultChanged(this);
}
@@ -2215,8 +2218,9 @@ void Document::updateStyleAndLayoutTreeIgnorePendingStylesheets() {
if (bodyElement && !bodyElement->layoutObject() &&
m_pendingSheetLayout == NoLayoutWithPendingSheets) {
m_pendingSheetLayout = DidLayoutWithPendingSheets;
- styleEngine().resolverChanged(FullStyleUpdate);
- } else if (m_hasNodesWithPlaceholderStyle) {
+ styleEngine().markAllTreeScopesDirty();
+ }
+ if (m_hasNodesWithPlaceholderStyle) {
// If new nodes have been added or style recalc has been done with style
// sheets still pending, some nodes may not have had their real style
// calculated yet. Normally this gets cleaned when style sheets arrive
@@ -3763,8 +3767,6 @@ void Document::notifyResizeForViewportUnits() {
}
void Document::styleResolverMayHaveChanged() {
- styleEngine().resolverChanged(AnalyzedStyleUpdate);
-
if (hasNodesWithPlaceholderStyle()) {
setNeedsStyleRecalc(SubtreeStyleChange,
StyleChangeReasonForTracing::create(
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.h ('k') | third_party/WebKit/Source/core/dom/DocumentStyleSheetCollection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698