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

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

Issue 2897833004: Refactored out need to pass property ID in background list parsing. (Closed)
Patch Set: changed enum to enum class and addressed comments Created 3 years, 7 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/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

Powered by Google App Engine
This is Rietveld 408576698