Chromium Code Reviews

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

Issue 2547883002: Schedule layout tree update for dirty tree scopes. (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« 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/core/dom/StyleEngine.cpp
diff --git a/third_party/WebKit/Source/core/dom/StyleEngine.cpp b/third_party/WebKit/Source/core/dom/StyleEngine.cpp
index 21d427e964e38999b46095891552cd34ff189bb4..d707d0d2e4e046919580a86a6645da23eb19b8cc 100644
--- a/third_party/WebKit/Source/core/dom/StyleEngine.cpp
+++ b/third_party/WebKit/Source/core/dom/StyleEngine.cpp
@@ -573,6 +573,7 @@ void StyleEngine::markTreeScopeDirty(TreeScope& scope) {
DCHECK(m_styleSheetCollectionMap.contains(&scope));
m_dirtyTreeScopes.add(&scope);
+ document().scheduleLayoutTreeUpdateIfNeeded();
}
void StyleEngine::markDocumentDirty() {
@@ -581,6 +582,8 @@ void StyleEngine::markDocumentDirty() {
viewportRulesChanged();
if (document().importLoader())
document().importsController()->master()->styleEngine().markDocumentDirty();
+ else
+ document().scheduleLayoutTreeUpdateIfNeeded();
}
CSSStyleSheet* StyleEngine::createSheet(Element& element,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine