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 9a507a3893c44883644fdc262fdded61f0a5c292..b9806e31d9cc41df5b8d75979399a6e6c87c72ce 100644 |
| --- a/third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.cpp |
| +++ b/third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.cpp |
| @@ -1458,6 +1458,20 @@ CSSIdentifierValue* ConsumeShapeBox(CSSParserTokenRange& range) { |
| CSSValueMarginBox>(range); |
| } |
| +void AddListValueOptimized(CSSValue*& list, CSSValue* value) { |
|
suzyh_UTC10 (ex-contributor)
2017/06/05 00:49:20
No action required, since this is not new to your
Bugs Nash
2017/06/05 01:20:50
this is required because we need to change what th
|
| + if (list) { |
| + if (!list->IsBaseValueList()) { |
| + CSSValue* first_value = list; |
| + list = CSSValueList::CreateCommaSeparated(); |
| + ToCSSValueList(list)->Append(*first_value); |
| + } |
| + ToCSSValueList(list)->Append(*value); |
| + } else { |
| + // To conserve memory we don't actually wrap a single value in a list. |
| + list = value; |
| + } |
| +} |
| + |
| } // namespace CSSPropertyParserHelpers |
| } // namespace blink |