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

Unified Diff: Source/core/css/CSSParser-in.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: Added tests Created 7 years, 5 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/CSSParser-in.cpp
diff --git a/Source/core/css/CSSParser-in.cpp b/Source/core/css/CSSParser-in.cpp
index e296682288bf121fad35e03714927589e9312e0a..70a061a3f7054488594fa535a75a79a2176a3c0f 100644
--- a/Source/core/css/CSSParser-in.cpp
+++ b/Source/core/css/CSSParser-in.cpp
@@ -7,6 +7,7 @@
* Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/)
* Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved.
* Copyright (C) 2012 Intel Corporation. All rights reserved.
+ * Copyright (C) 2013 Opera Software ASA. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -2282,6 +2283,27 @@ bool CSSParser::parseValue(CSSPropertyID propId, bool important)
validPrimitive = true;
break;
+ case CSSPropertyNavDown: // auto | <id> targetframe | inherit
+ case CSSPropertyNavLeft:
+ case CSSPropertyNavRight:
+ case CSSPropertyNavUp:
+ if (id == CSSValueAuto) {
+ value->unit = CSSPrimitiveValue::CSS_STRING;
+ validPrimitive = true;
+ } else if (num == 1 && (value->unit == CSSPrimitiveValue::CSS_STRING || value->unit == CSSPrimitiveValue::CSS_PARSER_HEXCOLOR)) {
+ value->unit = CSSPrimitiveValue::CSS_STRING;
+ validPrimitive = true;
+ } else if (num == 2) {
+ RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
+ while (value) {
+ list->append(cssValuePool().createValue(value->string, CSSPrimitiveValue::CSS_STRING));
+ value = m_valueList->next();
+ }
+ parsedValue = list.release();
+ } else {
+ return false;
esprehn 2013/08/08 03:39:40 indent is wrong
Krzysztof Olczyk 2013/12/04 13:56:50 Done.
+ }
+ break;
case CSSPropertyFlex: {
ShorthandScope scope(this, propId);
if (id == CSSValueNone) {

Powered by Google App Engine
This is Rietveld 408576698