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

Unified Diff: Source/core/css/resolver/ScopedStyleResolver.cpp

Issue 579253002: Change StyleResolver::document() to be private (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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
« no previous file with comments | « Source/core/css/resolver/ScopedStyleResolver.h ('k') | Source/core/css/resolver/StyleResolver.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/resolver/ScopedStyleResolver.cpp
diff --git a/Source/core/css/resolver/ScopedStyleResolver.cpp b/Source/core/css/resolver/ScopedStyleResolver.cpp
index 720cc2e1d06417ae08d6aef7f8dd3fee64420744..1a05e978e708f76a80fffa1fe2f6c691a6f9d66b 100644
--- a/Source/core/css/resolver/ScopedStyleResolver.cpp
+++ b/Source/core/css/resolver/ScopedStyleResolver.cpp
@@ -68,16 +68,10 @@ ScopedStyleResolver* ScopedStyleResolver::parent() const
return 0;
}
-void ScopedStyleResolver::addRulesFromSheet(CSSStyleSheet* cssSheet, const MediaQueryEvaluator& medium, StyleResolver* resolver)
+unsigned ScopedStyleResolver::appendCSSStyleSheet(CSSStyleSheet* cssSheet)
{
m_authorStyleSheets.append(cssSheet);
- unsigned index = m_authorStyleSheets.size() - 1;
- StyleSheetContents* sheet = cssSheet->contents();
-
- AddRuleFlags addRuleFlags = resolver->document().securityOrigin()->canRequest(sheet->baseURL()) ? RuleHasDocumentSecurityOrigin : RuleHasNoSpecialState;
- const RuleSet& ruleSet = sheet->ensureRuleSet(medium, addRuleFlags);
- resolver->addMediaQueryResults(ruleSet.viewportDependentMediaQueryResults());
- resolver->processScopedRules(ruleSet, cssSheet, index, treeScope().rootNode());
+ return m_authorStyleSheets.size() - 1;
}
void ScopedStyleResolver::collectFeaturesTo(RuleFeatureSet& features, HashSet<const StyleSheetContents*>& visitedSharedStyleSheetContents) const
« no previous file with comments | « Source/core/css/resolver/ScopedStyleResolver.h ('k') | Source/core/css/resolver/StyleResolver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698