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

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

Issue 975933002: Return reference from styleEngine() accessor. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « Source/core/dom/ShadowTreeStyleSheetCollection.h ('k') | Source/core/dom/StyleElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/ShadowTreeStyleSheetCollection.cpp
diff --git a/Source/core/dom/ShadowTreeStyleSheetCollection.cpp b/Source/core/dom/ShadowTreeStyleSheetCollection.cpp
index 77073daa94f38fbd13c64abcaea80c0b03747464..a717f8e5a74167252cdb16a3d5c1bbee986b37df 100644
--- a/Source/core/dom/ShadowTreeStyleSheetCollection.cpp
+++ b/Source/core/dom/ShadowTreeStyleSheetCollection.cpp
@@ -45,7 +45,7 @@ ShadowTreeStyleSheetCollection::ShadowTreeStyleSheetCollection(ShadowRoot& shado
{
}
-void ShadowTreeStyleSheetCollection::collectStyleSheets(StyleEngine* engine, StyleSheetCollection& collection)
+void ShadowTreeStyleSheetCollection::collectStyleSheets(StyleEngine& engine, StyleSheetCollection& collection)
{
for (Node* n : m_styleSheetCandidateNodes) {
StyleSheetCandidate candidate(*n);
@@ -61,16 +61,16 @@ void ShadowTreeStyleSheetCollection::collectStyleSheets(StyleEngine* engine, Sty
// FIXME: clarify how PREFERRED or ALTERNATE works in shadow trees.
// Should we set preferred/selected stylesheets name in shadow trees and
// use the name in document?
- if (candidate.hasPreferrableName(engine->preferredStylesheetSetName()))
- engine->selectStylesheetSetName(candidate.title());
+ if (candidate.hasPreferrableName(engine.preferredStylesheetSetName()))
+ engine.selectStylesheetSetName(candidate.title());
collection.appendSheetForList(sheet);
- if (candidate.canBeActivated(engine->preferredStylesheetSetName()))
+ if (candidate.canBeActivated(engine.preferredStylesheetSetName()))
collection.appendActiveStyleSheet(toCSSStyleSheet(sheet));
}
}
-void ShadowTreeStyleSheetCollection::updateActiveStyleSheets(StyleEngine* engine, StyleResolverUpdateMode updateMode)
+void ShadowTreeStyleSheetCollection::updateActiveStyleSheets(StyleEngine& engine, StyleResolverUpdateMode updateMode)
{
StyleSheetCollection collection;
collectStyleSheets(engine, collection);
@@ -78,7 +78,7 @@ void ShadowTreeStyleSheetCollection::updateActiveStyleSheets(StyleEngine* engine
StyleSheetChange change;
analyzeStyleSheetChange(updateMode, collection, change);
- if (StyleResolver* styleResolver = engine->resolver()) {
+ if (StyleResolver* styleResolver = engine.resolver()) {
if (change.styleResolverUpdateType != Additive) {
// We should not destroy StyleResolver when we find any stylesheet update in a shadow tree.
// In this case, we will reset rulesets created from style elements in the shadow tree.
« no previous file with comments | « Source/core/dom/ShadowTreeStyleSheetCollection.h ('k') | Source/core/dom/StyleElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698