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

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: Land patch upload resulted in python error Created 7 years, 5 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 d8c93160b43a79aea8da740a727fa8009faae696..b214bf9807a2dceb9523c8b4d1f52f909384b66f 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:
@@ -11403,9 +11404,6 @@ unsigned CSSParser::safeUserStringTokenOffset()
StyleRuleBase* CSSParser::createViewportRule()
{
- if (!RuntimeEnabledFeatures::cssViewportEnabled())
- return 0;
-
m_allowImportRules = m_allowNamespaceDeclarations = false;
RefPtr<StyleRuleViewport> rule = StyleRuleViewport::create();
@@ -11422,8 +11420,6 @@ StyleRuleBase* CSSParser::createViewportRule()
bool CSSParser::parseViewportProperty(CSSPropertyID propId, bool important)
{
- ASSERT(RuntimeEnabledFeatures::cssViewportEnabled());
-
CSSParserValue* value = m_valueList->current();
if (!value)
return false;
@@ -11432,6 +11428,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:
@@ -11482,7 +11484,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