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

Unified Diff: sky/engine/core/css/resolver/ScopedStyleResolver.cpp

Issue 838313002: Move StyleResolver code out of ScopedStyleResolver. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 | « sky/engine/core/css/resolver/ScopedStyleResolver.h ('k') | sky/engine/core/css/resolver/StyleResolver.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/css/resolver/ScopedStyleResolver.cpp
diff --git a/sky/engine/core/css/resolver/ScopedStyleResolver.cpp b/sky/engine/core/css/resolver/ScopedStyleResolver.cpp
index 08de8f870e8e95dcb5ce88f50b1470d6dc482d4e..61b199586b44abca32952369c8962380139cfd44 100644
--- a/sky/engine/core/css/resolver/ScopedStyleResolver.cpp
+++ b/sky/engine/core/css/resolver/ScopedStyleResolver.cpp
@@ -31,11 +31,6 @@
#include "sky/engine/core/css/RuleFeature.h"
#include "sky/engine/core/css/StyleRule.h"
#include "sky/engine/core/css/StyleSheetContents.h"
-#include "sky/engine/core/css/resolver/StyleResolver.h"
-#include "sky/engine/core/dom/Document.h"
-#include "sky/engine/core/dom/shadow/ElementShadow.h"
-#include "sky/engine/core/dom/shadow/ShadowRoot.h"
-#include "sky/engine/core/html/HTMLStyleElement.h"
namespace blink {
@@ -44,17 +39,11 @@ ScopedStyleResolver::ScopedStyleResolver(TreeScope& scope)
{
}
-void ScopedStyleResolver::addRulesFromSheet(CSSStyleSheet* cssSheet, StyleResolver* resolver)
+void ScopedStyleResolver::addRulesFromSheet(CSSStyleSheet* cssSheet)
{
m_authorStyleSheets.append(cssSheet);
- unsigned index = m_authorStyleSheets.size() - 1;
- StyleSheetContents* sheet = cssSheet->contents();
-
- AddRuleFlags addRuleFlags = RuleHasNoSpecialState;
- const RuleSet& ruleSet = sheet->ensureRuleSet(addRuleFlags);
- resolver->addMediaQueryResults(ruleSet.viewportDependentMediaQueryResults());
- resolver->processScopedRules(ruleSet, cssSheet, index, treeScope().rootNode());
+ const RuleSet& ruleSet = cssSheet->contents()->ensureRuleSet();
m_features.add(ruleSet.features());
}
« no previous file with comments | « sky/engine/core/css/resolver/ScopedStyleResolver.h ('k') | sky/engine/core/css/resolver/StyleResolver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698