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

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

Issue 27537009: Avoid always style recalc when removing stylesheets. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 2 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
Index: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index 16a79a962d866b6a80236840416016209358832d..b8c6aa1a228392d60fb44f578e66f9cadee65568 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -5326,4 +5326,22 @@ DocumentLifecycleNotifier* Document::lifecycleNotifier()
return static_cast<DocumentLifecycleNotifier*>(ExecutionContext::lifecycleNotifier());
}
+void Document::removedStyleSheet(StyleSheet* sheet, RecalcStyleTime when, StyleResolverUpdateMode updateMode)
+{
+ if (!isActive())
+ return;
+
+ styleEngine()->modifiedStyleSheet(sheet);
+ styleResolverChanged(when, updateMode);
+}
+
+void Document::modifiedStyleSheet(StyleSheet* sheet, RecalcStyleTime when, StyleResolverUpdateMode updateMode)
+{
+ if (!isActive())
+ return;
+
+ styleEngine()->modifiedStyleSheet(sheet);
+ styleResolverChanged(when, updateMode);
+}
+
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698