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

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

Issue 2520873002: [css-ui] Add support for caret-color property (Closed)
Patch Set: Fix tests that were listing all the CSS properties 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/CSSPropertyParserHelpers.h" 5 #include "core/css/parser/CSSPropertyParserHelpers.h"
6 6
7 #include "core/css/CSSCalculationValue.h" 7 #include "core/css/CSSCalculationValue.h"
8 #include "core/css/CSSColorValue.h" 8 #include "core/css/CSSColorValue.h"
9 #include "core/css/CSSCrossfadeValue.h" 9 #include "core/css/CSSCrossfadeValue.h"
10 #include "core/css/CSSGradientValue.h" 10 #include "core/css/CSSGradientValue.h"
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 return nullptr; 509 return nullptr;
510 return consumeIdent(range); 510 return consumeIdent(range);
511 } 511 }
512 RGBA32 color = Color::transparent; 512 RGBA32 color = Color::transparent;
513 if (!parseHexColor(range, color, acceptQuirkyColors) && 513 if (!parseHexColor(range, color, acceptQuirkyColors) &&
514 !parseColorFunction(range, color)) 514 !parseColorFunction(range, color))
515 return nullptr; 515 return nullptr;
516 return CSSColorValue::create(color); 516 return CSSColorValue::create(color);
517 } 517 }
518 518
519 CSSValue* consumeAutoOrColor(CSSParserTokenRange& range,
520 CSSParserMode cssParserMode) {
521 if (range.peek().id() == CSSValueAuto)
522 return consumeIdent(range);
523 return consumeColor(range, cssParserMode);
524 }
525
519 static CSSValue* consumePositionComponent(CSSParserTokenRange& range, 526 static CSSValue* consumePositionComponent(CSSParserTokenRange& range,
520 CSSParserMode cssParserMode, 527 CSSParserMode cssParserMode,
521 UnitlessQuirk unitless, 528 UnitlessQuirk unitless,
522 bool& horizontalEdge, 529 bool& horizontalEdge,
523 bool& verticalEdge) { 530 bool& verticalEdge) {
524 if (range.peek().type() != IdentToken) 531 if (range.peek().type() != IdentToken)
525 return consumeLengthOrPercent(range, cssParserMode, ValueRangeAll, 532 return consumeLengthOrPercent(range, cssParserMode, ValueRangeAll,
526 unitless); 533 unitless);
527 534
528 CSSValueID id = range.peek().id(); 535 CSSValueID id = range.peek().id();
(...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after
1230 1237
1231 // https://drafts.csswg.org/css-shapes-1/#typedef-shape-box 1238 // https://drafts.csswg.org/css-shapes-1/#typedef-shape-box
1232 CSSIdentifierValue* consumeShapeBox(CSSParserTokenRange& range) { 1239 CSSIdentifierValue* consumeShapeBox(CSSParserTokenRange& range) {
1233 return consumeIdent<CSSValueContentBox, CSSValuePaddingBox, CSSValueBorderBox, 1240 return consumeIdent<CSSValueContentBox, CSSValuePaddingBox, CSSValueBorderBox,
1234 CSSValueMarginBox>(range); 1241 CSSValueMarginBox>(range);
1235 } 1242 }
1236 1243
1237 } // namespace CSSPropertyParserHelpers 1244 } // namespace CSSPropertyParserHelpers
1238 1245
1239 } // namespace blink 1246 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698