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

Unified Diff: sky/engine/core/css/StyleSheetContents.cpp

Issue 807703003: Remove @media rules. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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/StyleSheetContents.h ('k') | sky/engine/core/css/parser/BisonCSSParser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/css/StyleSheetContents.cpp
diff --git a/sky/engine/core/css/StyleSheetContents.cpp b/sky/engine/core/css/StyleSheetContents.cpp
index 77fd6697d286071a7f02afb7bb8025dd4b21b613..6b89ae86b0055c5c3fc9a8b635191419998d1b76 100644
--- a/sky/engine/core/css/StyleSheetContents.cpp
+++ b/sky/engine/core/css/StyleSheetContents.cpp
@@ -36,8 +36,7 @@
namespace blink {
StyleSheetContents::StyleSheetContents(const CSSParserContext& context)
- : m_hasMediaQueries(false)
- , m_parserContext(context)
+ : m_parserContext(context)
{
}
@@ -50,16 +49,9 @@ StyleSheetContents::~StyleSheetContents()
void StyleSheetContents::parserAppendRule(PassRefPtr<StyleRuleBase> rule)
{
- if (rule->isMediaRule())
- setHasMediaQueries();
m_childRules.append(rule);
}
-void StyleSheetContents::setHasMediaQueries()
-{
- m_hasMediaQueries = true;
-}
-
bool StyleSheetContents::parseString(const String& sheetText)
{
CSSParserContext context(parserContext(), UseCounter::getFrom(this));
@@ -92,11 +84,11 @@ void StyleSheetContents::shrinkToFit()
m_childRules.shrinkToFit();
}
-RuleSet& StyleSheetContents::ensureRuleSet(const MediaQueryEvaluator& medium, AddRuleFlags addRuleFlags)
+RuleSet& StyleSheetContents::ensureRuleSet(AddRuleFlags addRuleFlags)
{
if (!m_ruleSet) {
m_ruleSet = RuleSet::create();
- m_ruleSet->addRulesFromSheet(this, medium, addRuleFlags);
+ m_ruleSet->addRulesFromSheet(this, addRuleFlags);
}
return *m_ruleSet.get();
}
« no previous file with comments | « sky/engine/core/css/StyleSheetContents.h ('k') | sky/engine/core/css/parser/BisonCSSParser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698