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

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

Issue 1408383010: Parse -webkit-border shorthands in CSSPropertyParser with CSSParserTokens (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reuse consumeLineWidth Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 83558c2b148a40d7b13ff2043a41212b6a5b4163..5d66b86f7a3acbe80def0532a3ec511b9575a018 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
+++ b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
@@ -1596,6 +1596,11 @@ static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> consumeLineWidth(CSSParserToken
return consumeLength(range, cssParserMode, ValueRangeNonNegative);
}
+static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> consumeBorderWidth(CSSParserTokenRange& range, CSSParserMode cssParserMode)
+{
+ return consumeLineWidth(range, cssParserMode);
+}
+
PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseSingleValue(CSSPropertyID unresolvedProperty)
{
CSSPropertyID property = resolveCSSPropertyID(unresolvedProperty);
@@ -1699,9 +1704,18 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseSingleValue(CSSProperty
case CSSPropertyWebkitTextFillColor:
case CSSPropertyWebkitTapHighlightColor:
case CSSPropertyWebkitTextEmphasisColor:
+ case CSSPropertyWebkitBorderStartColor:
+ case CSSPropertyWebkitBorderEndColor:
+ case CSSPropertyWebkitBorderBeforeColor:
+ case CSSPropertyWebkitBorderAfterColor:
return consumeColor(m_range, m_context);
case CSSPropertyColor:
return consumeColor(m_range, m_context, inQuirksMode());
+ case CSSPropertyWebkitBorderStartWidth:
+ case CSSPropertyWebkitBorderEndWidth:
+ case CSSPropertyWebkitBorderBeforeWidth:
+ case CSSPropertyWebkitBorderAfterWidth:
+ return consumeBorderWidth(m_range, m_context.mode());
case CSSPropertyZIndex:
return consumeZIndex(m_range);
case CSSPropertyTextShadow: // CSS2 property, dropped in CSS2.1, back in CSS3, so treat as CSS3
@@ -2210,6 +2224,14 @@ bool CSSPropertyParser::parseShorthand(CSSPropertyID unresolvedProperty, bool im
return consumeShorthandGreedily(webkitTextEmphasisShorthand(), important);
case CSSPropertyOutline:
return consumeShorthandGreedily(outlineShorthand(), important);
+ case CSSPropertyWebkitBorderStart:
+ return consumeShorthandGreedily(webkitBorderStartShorthand(), important);
+ case CSSPropertyWebkitBorderEnd:
+ return consumeShorthandGreedily(webkitBorderEndShorthand(), important);
+ case CSSPropertyWebkitBorderBefore:
+ return consumeShorthandGreedily(webkitBorderBeforeShorthand(), important);
+ case CSSPropertyWebkitBorderAfter:
+ return consumeShorthandGreedily(webkitBorderAfterShorthand(), important);
default:
m_currentShorthand = oldShorthand;
return false;
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698