Index: third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.cpp |
diff --git a/third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.cpp b/third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.cpp |
index 4f6e0cecc6c56aba31b4fc746fdb41599975ef8b..5156758a1c05bfb2377bb6b2df89427ed2d3e9a6 100644 |
--- a/third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.cpp |
+++ b/third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.cpp |
@@ -967,6 +967,17 @@ static bool consumeGradientColorStops(CSSParserTokenRange& range, |
if (!stop.m_color && !stop.m_offset) |
return false; |
gradient->addStop(stop); |
+ |
+ if (RuntimeEnabledFeatures::multipleColorStopPositionsEnabled()) { |
+ if (!stop.m_color || !stop.m_offset) |
+ continue; |
+ |
+ // Optional second position. |
+ stop.m_offset = consumePositionFunc(range, cssParserMode, ValueRangeAll, |
+ UnitlessQuirk::Forbid); |
+ if (stop.m_offset) |
+ gradient->addStop(stop); |
+ } |
} while (consumeCommaIncludingWhitespace(range)); |
// The last color stop cannot be a color hint. |