Chromium Code Reviews| 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..e9abe6cc5869c2cf78b5bf3a55d3ea04346d64da 100644 |
| --- a/third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.cpp |
| +++ b/third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.cpp |
| @@ -967,6 +967,16 @@ static bool consumeGradientColorStops(CSSParserTokenRange& range, |
| if (!stop.m_color && !stop.m_offset) |
| return false; |
| gradient->addStop(stop); |
| + |
| + if (!stop.m_color || !stop.m_offset || |
| + !RuntimeEnabledFeatures::multipleColorStopPositionsEnabled()) |
|
fs
2017/04/06 19:58:48
Ponder: Maybe we could have this as a:
if (Runtim
f(malita)
2017/04/06 20:29:42
Done.
|
| + 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. |