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

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

Issue 2546393002: Make setNeedsActiveStyleUpdate mark treescope dirty only. (Closed)
Patch Set: 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/StyleEngine.cpp
diff --git a/third_party/WebKit/Source/core/dom/StyleEngine.cpp b/third_party/WebKit/Source/core/dom/StyleEngine.cpp
index d707d0d2e4e046919580a86a6645da23eb19b8cc..96fdf19884ac339d4a6946ebebbcabf884c62937 100644
--- a/third_party/WebKit/Source/core/dom/StyleEngine.cpp
+++ b/third_party/WebKit/Source/core/dom/StyleEngine.cpp
@@ -185,23 +185,11 @@ void StyleEngine::removePendingSheet(Node& styleSheetCandidateNode,
document().didRemoveAllPendingStylesheet();
}
-void StyleEngine::setNeedsActiveStyleUpdate(
- StyleSheet* sheet,
- StyleResolverUpdateMode updateMode) {
- // resolverChanged() is called for inactive non-master documents because
- // import documents are inactive documents. resolverChanged() for imports
- // will call resolverChanged() for the master document and update the active
- // stylesheets including the ones from the import.
+void StyleEngine::setNeedsActiveStyleUpdate(TreeScope& treeScope) {
if (!document().isActive() && isMaster())
return;
- if (sheet && document().isActive()) {
- Node* node = sheet->ownerNode();
- if (node && node->isConnected())
- markTreeScopeDirty(node->treeScope());
- }
-
- resolverChanged(updateMode);
+ markTreeScopeDirty(treeScope);
}
void StyleEngine::addStyleSheetCandidateNode(Node& node) {

Powered by Google App Engine
This is Rietveld 408576698