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

Unified Diff: Source/core/css/parser/CSSPropertyParser.cpp

Issue 338023002: Added parser part of all shorthand property. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed patch conflict Created 6 years, 6 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
« no previous file with comments | « Source/core/css/CSSValueKeywords.in ('k') | Source/core/frame/UseCounter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/parser/CSSPropertyParser.cpp
diff --git a/Source/core/css/parser/CSSPropertyParser.cpp b/Source/core/css/parser/CSSPropertyParser.cpp
index 4c3d25149345a119e48b66d79f01144bdcbaeba9..7a52d3c09729a883971ac53f8c742810110dbb11 100644
--- a/Source/core/css/parser/CSSPropertyParser.cpp
+++ b/Source/core/css/parser/CSSPropertyParser.cpp
@@ -1611,6 +1611,14 @@ bool CSSPropertyParser::parseValue(CSSPropertyID propId, bool important)
case CSSPropertyUserZoom:
validPrimitive = false;
break;
+
+ case CSSPropertyAll:
+ if (id == CSSValueInitial || id == CSSValueInherit || id == CSSValueUnset) {
+ validPrimitive = true;
+ break;
+ }
+ return false;
+
default:
return parseSVGValue(propId, important);
}
@@ -3072,11 +3080,14 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseAnimationProperty()
CSSParserValue* value = m_valueList->current();
if (value->unit != CSSPrimitiveValue::CSS_IDENT)
return nullptr;
+ // Since all is valid css property keyword, cssPropertyID for all
+ // returns non-null value. We need to check "all" before
+ // cssPropertyID check.
+ if (equalIgnoringCase(value, "all"))
+ return cssValuePool().createIdentifierValue(CSSValueAll);
CSSPropertyID result = cssPropertyID(value->string);
if (result && RuntimeCSSEnabled::isCSSPropertyEnabled(result))
return cssValuePool().createIdentifierValue(result);
- if (equalIgnoringCase(value, "all"))
- return cssValuePool().createIdentifierValue(CSSValueAll);
if (equalIgnoringCase(value, "none"))
return cssValuePool().createIdentifierValue(CSSValueNone);
return nullptr;
@@ -7177,7 +7188,9 @@ bool CSSPropertyParser::parseWillChange(bool important)
CSSPropertyID property = cssPropertyID(currentValue->string);
if (property && RuntimeCSSEnabled::isCSSPropertyEnabled(property)) {
- if (property == CSSPropertyWillChange)
+ // Now "all" is used by both CSSValue and CSSPropertyValue.
+ // Need to return false when currentValue is CSSPropertyAll.
+ if (property == CSSPropertyWillChange || property == CSSPropertyAll)
return false;
values->append(cssValuePool().createIdentifierValue(property));
} else {
« no previous file with comments | « Source/core/css/CSSValueKeywords.in ('k') | Source/core/frame/UseCounter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698