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

Side by Side 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2003 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 3 * Copyright (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> 5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com>
6 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> 6 * Copyright (C) 2008 Eric Seidel <eric@webkit.org>
7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
8 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. 8 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved.
9 * Copyright (C) 2012 Intel Corporation. All rights reserved. 9 * Copyright (C) 2012 Intel Corporation. All rights reserved.
10 * 10 *
(...skipping 1048 matching lines...) Expand 10 before | Expand all | Expand 10 after
1059 validPrimitive = true; 1059 validPrimitive = true;
1060 else { 1060 else {
1061 RefPtrWillBeRawPtr<CSSValue> val = parseFilter(); 1061 RefPtrWillBeRawPtr<CSSValue> val = parseFilter();
1062 if (val) { 1062 if (val) {
1063 addProperty(propId, val, important); 1063 addProperty(propId, val, important);
1064 return true; 1064 return true;
1065 } 1065 }
1066 return false; 1066 return false;
1067 } 1067 }
1068 break; 1068 break;
1069 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.
1070 case CSSPropertyNavLeft:
1071 case CSSPropertyNavRight:
1072 case CSSPropertyNavUp:
1073 if (id == CSSValueAuto) {
1074 validPrimitive = true;
1075 } else if (value) {
1076 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSep arated();
1077 if (value->unit != CSSPrimitiveValue::CSS_PARSER_IDSEL && value->uni t != CSSPrimitiveValue::CSS_PARSER_HEXCOLOR)
1078 return false;
1079
1080 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
1081 list->append(cssValuePool().createValue(value->string, CSSPrimitiveV alue::CSS_STRING));
1082 value = m_valueList->next();
1083 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.
1084 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
1085 return false;
1086 list->append(cssValuePool().createValue(value->string, CSSPrimit iveValue::CSS_STRING));
1087 }
1088 parsedValue = list.release();
1089 }
1090 break;
1069 case CSSPropertyFlex: { 1091 case CSSPropertyFlex: {
1070 ShorthandScope scope(this, propId); 1092 ShorthandScope scope(this, propId);
1071 if (id == CSSValueNone) { 1093 if (id == CSSValueNone) {
1072 addProperty(CSSPropertyFlexGrow, cssValuePool().createValue(0, CSSPr imitiveValue::CSS_NUMBER), important); 1094 addProperty(CSSPropertyFlexGrow, cssValuePool().createValue(0, CSSPr imitiveValue::CSS_NUMBER), important);
1073 addProperty(CSSPropertyFlexShrink, cssValuePool().createValue(0, CSS PrimitiveValue::CSS_NUMBER), important); 1095 addProperty(CSSPropertyFlexShrink, cssValuePool().createValue(0, CSS PrimitiveValue::CSS_NUMBER), important);
1074 addProperty(CSSPropertyFlexBasis, cssValuePool().createIdentifierVal ue(CSSValueAuto), important); 1096 addProperty(CSSPropertyFlexBasis, cssValuePool().createIdentifierVal ue(CSSValueAuto), important);
1075 return true; 1097 return true;
1076 } 1098 }
1077 return parseFlex(m_valueList.get(), important); 1099 return parseFlex(m_valueList.get(), important);
1078 } 1100 }
(...skipping 7433 matching lines...) Expand 10 before | Expand all | Expand 10 after
8512 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueFill)); 8534 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueFill));
8513 if (!seenStroke) 8535 if (!seenStroke)
8514 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueStroke) ); 8536 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueStroke) );
8515 if (!seenMarkers) 8537 if (!seenMarkers)
8516 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueMarkers )); 8538 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueMarkers ));
8517 8539
8518 return parsedValues.release(); 8540 return parsedValues.release();
8519 } 8541 }
8520 8542
8521 } // namespace WebCore 8543 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698