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

Unified Diff: Source/core/css/CSSParser-in.cpp

Issue 19555002: Translate viewport related meta tags into @viewport descriptors as suggested by the CSS Device Adap… (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 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
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)

Powered by Google App Engine
This is Rietveld 408576698