Index: third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp |
diff --git a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp |
index 304d82fbd3b8b1c4e6423f95f2c05fca79e6325e..6d76e9f6d35af15c869dbcfbfb5d7387d184528a 100644 |
--- a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp |
+++ b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp |
@@ -1505,6 +1505,23 @@ static PassRefPtrWillBeRawPtr<CSSValue> consumeTextDecorationLine(CSSParserToken |
return list.release(); |
} |
+static PassRefPtrWillBeRawPtr<CSSValue> consumeOutlineColor(CSSParserTokenRange& range, const CSSParserContext& context) |
+{ |
+ // Outline color has "invert" as additional keyword. |
+ // Also, we want to allow the special focus color even in HTML Standard parsing mode. |
+ if (range.peek().id() == CSSValueInvert || range.peek().id() == CSSValueWebkitFocusRingColor) |
+ return consumeIdent(range); |
+ return consumeColor(range, context); |
+} |
+ |
+static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> consumeBorderWidth(CSSParserTokenRange& range, CSSParserMode cssParserMode) |
Timothy Loh
2015/11/05 05:08:26
The spec calls this a <line-width> for the border-
|
+{ |
+ CSSValueID id = range.peek().id(); |
+ if (id == CSSValueThin || id == CSSValueMedium || id == CSSValueThick) |
+ return consumeIdent(range); |
+ return consumeLength(range, cssParserMode, ValueRangeNonNegative); |
+} |
+ |
PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseSingleValue(CSSPropertyID unresolvedProperty) |
{ |
CSSPropertyID property = resolveCSSPropertyID(unresolvedProperty); |
@@ -1621,6 +1638,12 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseSingleValue(CSSProperty |
case CSSPropertyWebkitTextDecorationsInEffect: |
case CSSPropertyTextDecorationLine: |
return consumeTextDecorationLine(m_range); |
+ case CSSPropertyOutlineColor: |
+ return consumeOutlineColor(m_range, m_context); |
+ case CSSPropertyOutlineOffset: |
+ return consumeLength(m_range, m_context.mode(), ValueRangeAll); |
+ case CSSPropertyOutlineWidth: |
+ return consumeBorderWidth(m_range, m_context.mode()); |
default: |
return nullptr; |
} |
@@ -2092,6 +2115,8 @@ bool CSSPropertyParser::parseShorthand(CSSPropertyID unresolvedProperty, bool im |
addProperty(CSSPropertyTextDecoration, textDecoration.release(), important); |
return true; |
} |
+ case CSSPropertyOutline: |
+ return consumeShorthandGreedily(outlineShorthand(), important); |
default: |
m_currentShorthand = oldShorthand; |
return false; |