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

Unified Diff: Source/core/css/RuleSet.cpp

Issue 16646002: Move the CSS Device Adaptation @viewport rule support behind a runtime flag (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: For landing Created 7 years, 6 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/CSSViewportRule.idl ('k') | Source/core/css/StyleRule.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/RuleSet.cpp
diff --git a/Source/core/css/RuleSet.cpp b/Source/core/css/RuleSet.cpp
index 580a00440f8b6dce1a487579dc5d6b23a7c1fc78..d283692743f9e3779db269bbc1445f8059a02e98 100644
--- a/Source/core/css/RuleSet.cpp
+++ b/Source/core/css/RuleSet.cpp
@@ -33,6 +33,7 @@
#include <wtf/MemoryInstrumentationHashSet.h>
#include <wtf/MemoryInstrumentationVector.h>
#include "HTMLNames.h"
+#include "RuntimeEnabledFeatures.h"
#include "core/css/CSSFontSelector.h"
#include "core/css/CSSKeyframesRule.h"
#include "core/css/CSSSelector.h"
@@ -341,14 +342,12 @@ void RuleSet::addChildRules(const Vector<RefPtr<StyleRuleBase> >& rules, const M
}
else if (rule->isHostRule())
resolver->ensureScopedStyleResolver(scope->shadowHost())->addHostRule(static_cast<StyleRuleHost*>(rule), hasDocumentSecurityOrigin, scope);
-#if ENABLE(CSS_DEVICE_ADAPTATION)
- else if (rule->isViewportRule() && resolver) {
+ else if (RuntimeEnabledFeatures::cssViewportEnabled() && rule->isViewportRule() && resolver) {
// @viewport should not be scoped.
if (!isDocumentScope(scope))
continue;
resolver->viewportStyleResolver()->addViewportRule(static_cast<StyleRuleViewport*>(rule));
}
-#endif
else if (rule->isSupportsRule() && static_cast<StyleRuleSupports*>(rule)->conditionIsSupported())
addChildRules(static_cast<StyleRuleSupports*>(rule)->childRules(), medium, resolver, scope, hasDocumentSecurityOrigin, addRuleFlags);
}
« no previous file with comments | « Source/core/css/CSSViewportRule.idl ('k') | Source/core/css/StyleRule.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698