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 8a1a6428c0099c4056ac1fe5ad1c26c682dcacfe..6c051a9d6b239fddda38b79c2f75d0514f9c3184 100644 |
| --- a/Source/core/css/parser/CSSPropertyParser.cpp |
| +++ b/Source/core/css/parser/CSSPropertyParser.cpp |
| @@ -1066,6 +1066,26 @@ bool CSSPropertyParser::parseValue(CSSPropertyID propId, bool important) |
| return false; |
| } |
| break; |
| + case CSSPropertyNavDown: // auto | <id> targetframe | inherit |
| + case CSSPropertyNavLeft: |
| + case CSSPropertyNavRight: |
| + case CSSPropertyNavUp: |
| + if (id == CSSValueAuto) { |
| + validPrimitive = true; |
| + } else if (num == 1 && (value->unit == CSSPrimitiveValue::CSS_STRING || value->unit == CSSPrimitiveValue::CSS_PARSER_HEXCOLOR)) { |
|
fs
2014/04/14 12:32:01
This would accept "foo" (a literal string) as well
Krzysztof Olczyk
2014/04/17 13:48:40
Done.
|
| + value->unit = CSSPrimitiveValue::CSS_STRING; |
|
fs
2014/04/14 12:32:01
Probably better to avoid mutating |value| and just
Krzysztof Olczyk
2014/04/17 13:48:40
This is basically what CSS_PARSER_* primitive valu
fs
2014/04/17 15:33:48
Sure, it's needed for disambiguation, but that doe
|
| + validPrimitive = true; |
| + } else if (num == 2) { |
| + RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated(); |
|
fs
2014/04/14 12:32:01
...WillBeRawPtr
Krzysztof Olczyk
2014/04/17 13:48:40
Done.
|
| + while (value) { |
| + list->append(cssValuePool().createValue(value->string, CSSPrimitiveValue::CSS_STRING)); |
|
fs
2014/04/14 12:32:01
This looks a bit lenient.
Krzysztof Olczyk
2014/04/17 13:48:40
Done.
|
| + value = m_valueList->next(); |
| + } |
| + parsedValue = list.release(); |
| + } else { |
| + return false; |
| + } |
| + break; |
| case CSSPropertyFlex: { |
| ShorthandScope scope(this, propId); |
| if (id == CSSValueNone) { |