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 ed502005d576616f98a37ef741888b1540a603e0..6ee0e1753a7cb01abd347b17b35bd4c0c6da23d4 100644 |
| --- a/third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.cpp |
| +++ b/third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.cpp |
| @@ -1173,7 +1173,19 @@ static CSSValue* consumePaint(CSSParserTokenRange& args, |
| Vector<RefPtr<CSSVariableData>> variableData; |
| while (!args.atEnd()) { |
| if (args.peek().type() != CommaToken) { |
| - argumentTokens.push_back(args.consumeIncludingWhitespace()); |
| + if (args.peek().getBlockType() != CSSParserToken::BlockStart) { |
|
meade_UTC10
2017/02/16 02:44:59
There's a lot of nested ifs in this while loop now
renjieliu1
2017/02/16 04:38:42
Done.
|
| + argumentTokens.push_back(args.consumeIncludingWhitespace()); |
| + } else { |
| + // Encounter function block. |
| + argumentTokens.push_back(args.peek()); |
|
meade_UTC10
2017/02/16 02:44:59
So this pushes an open brace, then the contents of
renjieliu1
2017/02/16 04:38:42
I totally agree that's what we should do, however,
|
| + CSSParserTokenRange contents = args.consumeBlock(); |
| + while (!contents.atEnd()) { |
| + argumentTokens.push_back(contents.consume()); |
| + } |
| + // Assume it is a function. |
|
meade_UTC10
2017/02/16 02:44:59
This comment is confusing, suggest removing it.
renjieliu1
2017/02/16 04:38:42
Done.
|
| + argumentTokens.push_back( |
| + CSSParserToken(RightParenthesisToken, CSSParserToken::BlockEnd)); |
| + } |
| } else { |
| if (!addCSSPaintArgument(argumentTokens, &variableData)) |
| return nullptr; |