Index: Source/core/css/CSSParser-in.cpp |
diff --git a/Source/core/css/CSSParser-in.cpp b/Source/core/css/CSSParser-in.cpp |
index 70e52b4e6cee77bfab2cd116094c4a1d0c4db770..5483a39e00b290c00ab9d9edf6f90714d0a51901 100644 |
--- a/Source/core/css/CSSParser-in.cpp |
+++ b/Source/core/css/CSSParser-in.cpp |
@@ -2838,13 +2838,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: |
@@ -11406,9 +11407,6 @@ unsigned CSSParser::safeUserStringTokenOffset() |
StyleRuleBase* CSSParser::createViewportRule() |
{ |
- if (!RuntimeEnabledFeatures::cssViewportEnabled()) |
- return 0; |
- |
m_allowImportRules = m_allowNamespaceDeclarations = false; |
RefPtr<StyleRuleViewport> rule = StyleRuleViewport::create(); |
@@ -11425,8 +11423,6 @@ StyleRuleBase* CSSParser::createViewportRule() |
bool CSSParser::parseViewportProperty(CSSPropertyID propId, bool important) |
{ |
- ASSERT(RuntimeEnabledFeatures::cssViewportEnabled()); |
- |
CSSParserValue* value = m_valueList->current(); |
if (!value) |
return false; |
@@ -11435,8 +11431,18 @@ bool CSSParser::parseViewportProperty(CSSPropertyID propId, bool important) |
bool validPrimitive = false; |
switch (propId) { |
- case CSSPropertyMinWidth: // auto | <length> | <percentage> |
- case CSSPropertyMaxWidth: |
+ case CSSPropertyInternalPriority: |
+ if (id == CSSValueAuto) |
+ validPrimitive = true; |
+ else |
+ validPrimitive = (!id && validUnit(value, FNumber | FNonNeg)); |
+ break; |
+ case CSSPropertyMinWidth: // auto | extend-to-zoom | <length> | <percentage> |
+ if (id == CSSValueExtendToZoom) { |
+ validPrimitive = true; |
+ break; |
+ } |
+ case CSSPropertyMaxWidth: // auto | <length> | <percentage> |
case CSSPropertyMinHeight: |
case CSSPropertyMaxHeight: |
if (id == CSSValueAuto) |
@@ -11485,7 +11491,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) |