Index: Source/core/css/CSSParser-in.cpp |
diff --git a/Source/core/css/CSSParser-in.cpp b/Source/core/css/CSSParser-in.cpp |
index 96048ad6378fa89c22acff59ab0776ee858f9200..d982e514d1ab1920f44b0b2f025fa3af10e73b10 100644 |
--- a/Source/core/css/CSSParser-in.cpp |
+++ b/Source/core/css/CSSParser-in.cpp |
@@ -1717,7 +1717,8 @@ bool CSSParser::parseValue(CSSPropertyID propId, bool important) |
} |
if (inViewport()) { |
- if (!RuntimeEnabledFeatures::cssViewportEnabled()) |
+ // Allow @viewport rules from UA stylesheets even if the feature is disabled. |
+ if (!RuntimeEnabledFeatures::cssViewportEnabled() && m_context.mode != UASheetMode) |
kenneth.r.christiansen
2013/09/04 11:39:01
This is a behavior change, but *only* for the UASh
|
return false; |
return parseViewportProperty(propId, important); |
@@ -11634,7 +11635,8 @@ unsigned CSSParser::safeUserStringTokenOffset() |
StyleRuleBase* CSSParser::createViewportRule() |
{ |
- if (!RuntimeEnabledFeatures::cssViewportEnabled()) |
+ // Allow @viewport rules from UA stylesheets even if the feature is disabled. |
+ if (!RuntimeEnabledFeatures::cssViewportEnabled() && m_context.mode != UASheetMode) |
kenneth.r.christiansen
2013/09/04 11:39:01
same
|
return 0; |
m_allowImportRules = m_allowNamespaceDeclarations = false; |
@@ -11653,7 +11655,7 @@ StyleRuleBase* CSSParser::createViewportRule() |
bool CSSParser::parseViewportProperty(CSSPropertyID propId, bool important) |
{ |
- ASSERT(RuntimeEnabledFeatures::cssViewportEnabled()); |
+ ASSERT(RuntimeEnabledFeatures::cssViewportEnabled() || m_context.mode == UASheetMode); |
kenneth.r.christiansen
2013/09/04 11:39:01
same
|
CSSParserValue* value = m_valueList->current(); |
if (!value) |
@@ -11713,7 +11715,7 @@ bool CSSParser::parseViewportProperty(CSSPropertyID propId, bool important) |
bool CSSParser::parseViewportShorthand(CSSPropertyID propId, CSSPropertyID first, CSSPropertyID second, bool important) |
{ |
- ASSERT(RuntimeEnabledFeatures::cssViewportEnabled()); |
+ ASSERT(RuntimeEnabledFeatures::cssViewportEnabled() || m_context.mode == UASheetMode); |
kenneth.r.christiansen
2013/09/04 11:39:01
Same
|
unsigned numValues = m_valueList->size(); |
if (numValues > 2) |