Chromium Code Reviews| Index: Source/core/css/parser/CSSPropertyParser.cpp |
| diff --git a/Source/core/css/parser/CSSPropertyParser.cpp b/Source/core/css/parser/CSSPropertyParser.cpp |
| index a36a7c2e161c768092e069d40aa87cdbeb8b78d2..e55d173301b06fda3bb3edaf8c0d31ad735fccdc 100644 |
| --- a/Source/core/css/parser/CSSPropertyParser.cpp |
| +++ b/Source/core/css/parser/CSSPropertyParser.cpp |
| @@ -1641,6 +1641,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); |
| } |
| @@ -3118,11 +3126,14 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseAnimationProperty(Anima |
| 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")) { |
| context.commitAnimationPropertyKeyword(); |
| return cssValuePool().createIdentifierValue(CSSValueNone); |
| @@ -7266,7 +7277,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) |
|
esprehn
2014/05/30 00:59:22
Does the spec say that will-change: all doesn't wo
tasak
2014/06/04 09:37:41
I looked at the below "swith~case" and found that
|
| return false; |
| values->append(cssValuePool().createIdentifierValue(property)); |
| } else { |