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

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

Issue 2081633002: Reject invert for outline-color at parse time. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: New attempt. Created 4 years, 6 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 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/CSSPropertyParser.h" 5 #include "core/css/parser/CSSPropertyParser.h"
6 6
7 #include "core/StylePropertyShorthand.h" 7 #include "core/StylePropertyShorthand.h"
8 #include "core/css/CSSBasicShapeValues.h" 8 #include "core/css/CSSBasicShapeValues.h"
9 #include "core/css/CSSBorderImage.h" 9 #include "core/css/CSSBorderImage.h"
10 #include "core/css/CSSContentDistributionValue.h" 10 #include "core/css/CSSContentDistributionValue.h"
(...skipping 1562 matching lines...) Expand 10 before | Expand all | Expand 10 after
1573 } 1573 }
1574 if (fill) 1574 if (fill)
1575 return fill; 1575 return fill;
1576 if (shape) 1576 if (shape)
1577 return shape; 1577 return shape;
1578 return nullptr; 1578 return nullptr;
1579 } 1579 }
1580 1580
1581 static CSSValue* consumeOutlineColor(CSSParserTokenRange& range, CSSParserMode c ssParserMode) 1581 static CSSValue* consumeOutlineColor(CSSParserTokenRange& range, CSSParserMode c ssParserMode)
1582 { 1582 {
1583 // Outline color has "invert" as additional keyword. 1583 // Allow the special focus color even in HTML Standard parsing mode.
1584 // Also, we want to allow the special focus color even in HTML Standard pars ing mode. 1584 if (range.peek().id() == CSSValueWebkitFocusRingColor)
1585 if (range.peek().id() == CSSValueInvert || range.peek().id() == CSSValueWebk itFocusRingColor)
1586 return consumeIdent(range); 1585 return consumeIdent(range);
1587 return consumeColor(range, cssParserMode); 1586 return consumeColor(range, cssParserMode);
1588 } 1587 }
1589 1588
1590 static CSSPrimitiveValue* consumeLineWidth(CSSParserTokenRange& range, CSSParser Mode cssParserMode, UnitlessQuirk unitless) 1589 static CSSPrimitiveValue* consumeLineWidth(CSSParserTokenRange& range, CSSParser Mode cssParserMode, UnitlessQuirk unitless)
1591 { 1590 {
1592 CSSValueID id = range.peek().id(); 1591 CSSValueID id = range.peek().id();
1593 if (id == CSSValueThin || id == CSSValueMedium || id == CSSValueThick) 1592 if (id == CSSValueThin || id == CSSValueMedium || id == CSSValueThick)
1594 return consumeIdent(range); 1593 return consumeIdent(range);
1595 return consumeLength(range, cssParserMode, ValueRangeNonNegative, unitless); 1594 return consumeLength(range, cssParserMode, ValueRangeNonNegative, unitless);
(...skipping 3560 matching lines...) Expand 10 before | Expand all | Expand 10 after
5156 case CSSPropertyGridTemplate: 5155 case CSSPropertyGridTemplate:
5157 return consumeGridTemplateShorthand(CSSPropertyGridTemplate, important); 5156 return consumeGridTemplateShorthand(CSSPropertyGridTemplate, important);
5158 case CSSPropertyGrid: 5157 case CSSPropertyGrid:
5159 return consumeGridShorthand(important); 5158 return consumeGridShorthand(important);
5160 default: 5159 default:
5161 return false; 5160 return false;
5162 } 5161 }
5163 } 5162 }
5164 5163
5165 } // namespace blink 5164 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/css/outline-invert.html ('k') | third_party/WebKit/Source/core/dom/TextLinkColors.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698