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

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

Issue 2880303002: Update styleSheets list in import without active style update. (Closed)
Patch Set: Created 3 years, 7 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: third_party/WebKit/Source/core/dom/TreeScopeStyleSheetCollection.cpp
diff --git a/third_party/WebKit/Source/core/dom/TreeScopeStyleSheetCollection.cpp b/third_party/WebKit/Source/core/dom/TreeScopeStyleSheetCollection.cpp
index cfff0c100a87c1ba436ba985e4855b3e9541c43f..a562dad86fa54b77d28064b2e85b79ec0e9ab35d 100644
--- a/third_party/WebKit/Source/core/dom/TreeScopeStyleSheetCollection.cpp
+++ b/third_party/WebKit/Source/core/dom/TreeScopeStyleSheetCollection.cpp
@@ -79,6 +79,21 @@ bool TreeScopeStyleSheetCollection::HasStyleSheets() const {
return false;
}
+void TreeScopeStyleSheetCollection::CollectStyleSheetsForList() {
+ HeapVector<Member<StyleSheet>> new_list;
+ for (Node* node : style_sheet_candidate_nodes_) {
+ StyleSheetCandidate candidate(*node);
+ DCHECK(!candidate.IsXSL());
+ if (candidate.IsImport())
+ continue;
+ if (candidate.IsEnabledAndLoading())
+ continue;
+ if (StyleSheet* sheet = candidate.Sheet())
+ new_list.push_back(sheet);
+ }
+ SwapSheetsForSheetList(new_list);
+}
+
DEFINE_TRACE(TreeScopeStyleSheetCollection) {
visitor->Trace(tree_scope_);
visitor->Trace(style_sheet_candidate_nodes_);

Powered by Google App Engine
This is Rietveld 408576698