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

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

Issue 2394273006: Add CSS support for text-decoration-skip (Closed)
Patch Set: Histograms typo fixed, DCHECK Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
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 d7055dced22eb31749feab7432a024cc89284ce5..655189d6c44060608c1ef58c8de1116707ac2a3c 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
+++ b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
@@ -1523,6 +1523,24 @@ static CSSValue* consumeTextDecorationLine(CSSParserTokenRange& range) {
return list;
}
+static CSSValue* consumeTextDecorationSkip(CSSParserTokenRange& range) {
+ CSSValueList* list = CSSValueList::createSpaceSeparated();
+ while (true) {
+ CSSIdentifierValue* ident =
+ consumeIdent<CSSValueObjects, CSSValueInk>(range);
+ if (!ident)
+ break;
+ if (list->hasValue(*ident))
+ return nullptr;
+ list->append(*ident);
+ }
+
+ if (!list->length())
+ return nullptr;
+
+ return list;
+}
+
// none | strict | content | [ layout || style || paint || size ]
static CSSValue* consumeContain(CSSParserTokenRange& range) {
CSSValueID id = range.peek().id();
@@ -3617,6 +3635,9 @@ const CSSValue* CSSPropertyParser::parseSingleValue(
case CSSPropertyWebkitTextDecorationsInEffect:
case CSSPropertyTextDecorationLine:
return consumeTextDecorationLine(m_range);
+ case CSSPropertyTextDecorationSkip:
+ DCHECK(RuntimeEnabledFeatures::css3TextDecorationsEnabled());
+ return consumeTextDecorationSkip(m_range);
case CSSPropertyOffsetAnchor:
return consumeOffsetAnchor(m_range, m_context.mode());
case CSSPropertyOffsetPosition:

Powered by Google App Engine
This is Rietveld 408576698