Index: Source/core/css/parser/CSSPropertyParser.cpp |
diff --git a/Source/core/css/parser/CSSPropertyParser.cpp b/Source/core/css/parser/CSSPropertyParser.cpp |
index fa55f0a07bd993a8d0e7d0eafb693a7f55a3cd1b..7a9482802aa4769f3d9a16075344dbe23238f2b7 100644 |
--- a/Source/core/css/parser/CSSPropertyParser.cpp |
+++ b/Source/core/css/parser/CSSPropertyParser.cpp |
@@ -1067,6 +1067,40 @@ bool CSSPropertyParser::parseValue(CSSPropertyID propId, bool important) |
return false; |
} |
break; |
+ case CSSPropertyNavDown: // auto | <id> [ current | root | <target-name> ] | inherit |
+ case CSSPropertyNavLeft: |
+ case CSSPropertyNavRight: |
+ case CSSPropertyNavUp: |
+ if (id == CSSValueAuto) { |
+ validPrimitive = true; |
+ } else if (value) { |
Timothy Loh
2014/10/01 13:14:54
value is never null here.
I would move this logic
|
+ if (value->unit != CSSPrimitiveValue::CSS_PARSER_IDSEL && value->unit != CSSPrimitiveValue::CSS_PARSER_HEXCOLOR) |
+ return false; |
+ String selectorText = "#"; |
+ selectorText.append(value->string); |
+ |
+ RefPtrWillBeRawPtr<CSSPrimitiveValue> idSel = cssValuePool().createValue(selectorText, CSSPrimitiveValue::CSS_STRING); |
+ value = m_valueList->next(); |
+ RefPtrWillBeRawPtr<CSSPrimitiveValue> target; |
+ if (value) { |
+ if (value->unit == CSSPrimitiveValue::CSS_IDENT) { |
+ target = parseValidPrimitive(value->id, value); |
Timothy Loh
2014/10/01 13:14:53
Don't you want to check if the id is CSSValueCurre
|
+ } else if (value->unit == CSSPrimitiveValue::CSS_STRING) { |
+ if (value->string.startsWithIgnoringCase("_")) |
+ return false; |
+ target = cssValuePool().createValue(value->string, CSSPrimitiveValue::CSS_STRING); |
+ } |
Timothy Loh
2014/10/01 13:14:53
You'll want to call m_valueList->next() here to in
|
+ } else { |
+ target = cssValuePool().createValue(CSSValueCurrent); |
+ } |
+ |
+ RefPtrWillBeRawPtr<CSSValueList> propertyValue = CSSValueList::createSpaceSeparated(); |
+ propertyValue->append(idSel); |
+ propertyValue->append(target); |
+ addProperty(propId, propertyValue, important); |
Timothy Loh
2014/10/01 13:14:54
Don't addProperty, just break after setting parsed
|
+ return true; |
+ } |
+ break; |
case CSSPropertyFlex: { |
ShorthandScope scope(this, propId); |
if (id == CSSValueNone) { |