Index: Source/core/css/CSSParser-in.cpp |
diff --git a/Source/core/css/CSSParser-in.cpp b/Source/core/css/CSSParser-in.cpp |
index edbc75075ee64421e897194648fb9f368b0c3791..6dea4f999953ee28d7280f3cd4557a52640168df 100644 |
--- a/Source/core/css/CSSParser-in.cpp |
+++ b/Source/core/css/CSSParser-in.cpp |
@@ -2847,13 +2847,14 @@ bool CSSParser::parseValue(CSSPropertyID propId, bool important) |
// These properties should be handled before in isValidKeywordPropertyAndValue(). |
ASSERT_NOT_REACHED(); |
return false; |
- // Properties bellow are validated inside parseViewportProperty, because we |
+ // Properties below are validated inside parseViewportProperty, because we |
// check for parser state inViewportScope. We need to invalidate if someone |
// adds them outside a @viewport rule. |
case CSSPropertyMaxZoom: |
case CSSPropertyMinZoom: |
case CSSPropertyOrientation: |
case CSSPropertyUserZoom: |
+ case CSSPropertyInternalPriority: |
validPrimitive = false; |
break; |
default: |
@@ -11610,9 +11611,6 @@ unsigned CSSParser::safeUserStringTokenOffset() |
StyleRuleBase* CSSParser::createViewportRule() |
{ |
- if (!RuntimeEnabledFeatures::cssViewportEnabled()) |
- return 0; |
- |
m_allowImportRules = m_allowNamespaceDeclarations = false; |
RefPtr<StyleRuleViewport> rule = StyleRuleViewport::create(); |
@@ -11629,8 +11627,6 @@ StyleRuleBase* CSSParser::createViewportRule() |
bool CSSParser::parseViewportProperty(CSSPropertyID propId, bool important) |
{ |
- ASSERT(RuntimeEnabledFeatures::cssViewportEnabled()); |
- |
CSSParserValue* value = m_valueList->current(); |
if (!value) |
return false; |
@@ -11639,6 +11635,12 @@ bool CSSParser::parseViewportProperty(CSSPropertyID propId, bool important) |
bool validPrimitive = false; |
switch (propId) { |
+ case CSSPropertyInternalPriority: |
+ if (id == CSSValueAuto) |
+ validPrimitive = true; |
+ else |
+ validPrimitive = (!id && validUnit(value, FNumber | FNonNeg)); |
+ break; |
case CSSPropertyMinWidth: // auto | extend-to-zoom | <length> | <percentage> |
case CSSPropertyMaxWidth: |
case CSSPropertyMinHeight: |
@@ -11689,7 +11691,6 @@ bool CSSParser::parseViewportProperty(CSSPropertyID propId, bool important) |
bool CSSParser::parseViewportShorthand(CSSPropertyID propId, CSSPropertyID first, CSSPropertyID second, bool important) |
{ |
- ASSERT(RuntimeEnabledFeatures::cssViewportEnabled()); |
unsigned numValues = m_valueList->size(); |
if (numValues > 2) |