Index: third_party/WebKit/Source/core/dom/ShadowTreeStyleSheetCollection.cpp |
diff --git a/third_party/WebKit/Source/core/dom/ShadowTreeStyleSheetCollection.cpp b/third_party/WebKit/Source/core/dom/ShadowTreeStyleSheetCollection.cpp |
index 7f735dd5d9bb6c537f8375d32dcbf24e20def2b5..179eb2c09e3b880371813305ca55c63b7e98c83b 100644 |
--- a/third_party/WebKit/Source/core/dom/ShadowTreeStyleSheetCollection.cpp |
+++ b/third_party/WebKit/Source/core/dom/ShadowTreeStyleSheetCollection.cpp |
@@ -47,6 +47,7 @@ ShadowTreeStyleSheetCollection::ShadowTreeStyleSheetCollection( |
: TreeScopeStyleSheetCollection(shadowRoot) {} |
void ShadowTreeStyleSheetCollection::collectStyleSheets( |
+ StyleEngine& masterEngine, |
StyleSheetCollection& collection) { |
for (Node* n : m_styleSheetCandidateNodes) { |
StyleSheetCandidate candidate(*n); |
@@ -59,16 +60,17 @@ void ShadowTreeStyleSheetCollection::collectStyleSheets( |
collection.appendSheetForList(sheet); |
if (candidate.canBeActivated(nullAtom)) { |
CSSStyleSheet* cssSheet = toCSSStyleSheet(sheet); |
- collection.appendActiveStyleSheet(std::make_pair( |
- cssSheet, document().styleEngine().ruleSetForSheet(*cssSheet))); |
+ collection.appendActiveStyleSheet( |
+ std::make_pair(cssSheet, masterEngine.ruleSetForSheet(*cssSheet))); |
} |
} |
} |
-void ShadowTreeStyleSheetCollection::updateActiveStyleSheets() { |
+void ShadowTreeStyleSheetCollection::updateActiveStyleSheets( |
+ StyleEngine& masterEngine) { |
// StyleSheetCollection is GarbageCollected<>, allocate it on the heap. |
StyleSheetCollection* collection = StyleSheetCollection::create(); |
- collectStyleSheets(*collection); |
+ collectStyleSheets(masterEngine, *collection); |
applyActiveStyleSheetChanges(*collection); |
} |