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

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

Issue 17450016: Implementation of CSS3 nav-up/down/left/right properties from CSS3 UI. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased once again to master, fixed layout test. Created 6 years, 8 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/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) {

Powered by Google App Engine
This is Rietveld 408576698