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

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: Applied code review suggestions. Also rebased. 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 e89861130584f9fd6fe30e0908a7b17ff465b241..34bce7e12158c15b5cefd7c5c960e45cd7972217 100644
--- a/Source/core/css/parser/CSSPropertyParser.cpp
+++ b/Source/core/css/parser/CSSPropertyParser.cpp
@@ -1066,6 +1066,28 @@ bool CSSPropertyParser::parseValue(CSSPropertyID propId, bool important)
return false;
}
break;
+ case CSSPropertyNavDown: // auto | <id> targetframe | inherit
fs 2014/04/17 15:33:48 "auto | <id> [ current | root | <target-name> ]? |
Krzysztof Olczyk 2014/09/30 15:41:46 Done.
+ case CSSPropertyNavLeft:
+ case CSSPropertyNavRight:
+ case CSSPropertyNavUp:
+ if (id == CSSValueAuto) {
+ validPrimitive = true;
+ } else if (value) {
+ RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
+ if (value->unit != CSSPrimitiveValue::CSS_PARSER_IDSEL && value->unit != CSSPrimitiveValue::CSS_PARSER_HEXCOLOR)
+ return false;
+
+ value->unit = CSSPrimitiveValue::CSS_STRING;
fs 2014/04/17 15:33:48 Now I just think that this is unnecessary - what a
Krzysztof Olczyk 2014/09/30 15:41:46 Because: 1) CSS_PARSER_HEXCOLOR won't be a nice ty
+ list->append(cssValuePool().createValue(value->string, CSSPrimitiveValue::CSS_STRING));
+ value = m_valueList->next();
+ if (value && value->unit == CSSPrimitiveValue::CSS_STRING) {
fs 2014/04/17 15:33:48 How about the current and root keywords? (Also con
Krzysztof Olczyk 2014/09/30 15:41:47 Right. Done.
+ if (value->string.startsWithIgnoringCase("_"))
fs 2014/04/17 15:33:48 What's the other case version of _? =P
Krzysztof Olczyk 2014/09/30 15:41:47 :) I just can't see other non-case-ignoring versi
+ return false;
+ list->append(cssValuePool().createValue(value->string, CSSPrimitiveValue::CSS_STRING));
+ }
+ parsedValue = list.release();
+ }
+ break;
case CSSPropertyFlex: {
ShorthandScope scope(this, propId);
if (id == CSSValueNone) {

Powered by Google App Engine
This is Rietveld 408576698