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

Side by Side Diff: third_party/WebKit/Source/core/css/parser/CSSParserFastPaths.cpp

Issue 2520873002: [css-ui] Add support for caret-color property (Closed)
Patch Set: Patch for landing applying suggested changes Created 4 years 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/css/parser/CSSParserFastPaths.h" 5 #include "core/css/parser/CSSParserFastPaths.h"
6 6
7 #include "core/StylePropertyShorthand.h" 7 #include "core/StylePropertyShorthand.h"
8 #include "core/css/CSSColorValue.h" 8 #include "core/css/CSSColorValue.h"
9 #include "core/css/CSSFunctionValue.h" 9 #include "core/css/CSSFunctionValue.h"
10 #include "core/css/CSSIdentifierValue.h" 10 #include "core/css/CSSIdentifierValue.h"
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 } 131 }
132 132
133 if (number < 0 && !acceptsNegativeNumbers) 133 if (number < 0 && !acceptsNegativeNumbers)
134 return nullptr; 134 return nullptr;
135 135
136 return CSSPrimitiveValue::create(number, unit); 136 return CSSPrimitiveValue::create(number, unit);
137 } 137 }
138 138
139 static inline bool isColorPropertyID(CSSPropertyID propertyId) { 139 static inline bool isColorPropertyID(CSSPropertyID propertyId) {
140 switch (propertyId) { 140 switch (propertyId) {
141 case CSSPropertyCaretColor:
141 case CSSPropertyColor: 142 case CSSPropertyColor:
142 case CSSPropertyBackgroundColor: 143 case CSSPropertyBackgroundColor:
143 case CSSPropertyBorderBottomColor: 144 case CSSPropertyBorderBottomColor:
144 case CSSPropertyBorderLeftColor: 145 case CSSPropertyBorderLeftColor:
145 case CSSPropertyBorderRightColor: 146 case CSSPropertyBorderRightColor:
146 case CSSPropertyBorderTopColor: 147 case CSSPropertyBorderTopColor:
147 case CSSPropertyFill: 148 case CSSPropertyFill:
148 case CSSPropertyFloodColor: 149 case CSSPropertyFloodColor:
149 case CSSPropertyLightingColor: 150 case CSSPropertyLightingColor:
150 case CSSPropertyOutlineColor: 151 case CSSPropertyOutlineColor:
(...skipping 1049 matching lines...) Expand 10 before | Expand all | Expand 10 after
1200 if (isColorPropertyID(propertyID)) 1201 if (isColorPropertyID(propertyID))
1201 return parseColor(string, parserMode); 1202 return parseColor(string, parserMode);
1202 if (CSSValue* keyword = parseKeywordValue(propertyID, string, parserMode)) 1203 if (CSSValue* keyword = parseKeywordValue(propertyID, string, parserMode))
1203 return keyword; 1204 return keyword;
1204 if (CSSValue* transform = parseSimpleTransform(propertyID, string)) 1205 if (CSSValue* transform = parseSimpleTransform(propertyID, string))
1205 return transform; 1206 return transform;
1206 return nullptr; 1207 return nullptr;
1207 } 1208 }
1208 1209
1209 } // namespace blink 1210 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/StyleAutoColor.h ('k') | third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698