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

Unified Diff: third_party/WebKit/Source/core/css/StylePropertySerializer.cpp

Issue 2188343002: Fix serialization of css-wide keywords in custom properties (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: V3 Created 4 years, 5 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/StylePropertySerializer.cpp
diff --git a/third_party/WebKit/Source/core/css/StylePropertySerializer.cpp b/third_party/WebKit/Source/core/css/StylePropertySerializer.cpp
index bb49fdcb73eba225d796584313a83c89dc14e4c5..d4e360357eb034b44e2ca6c174ef6da8ba14b954 100644
--- a/third_party/WebKit/Source/core/css/StylePropertySerializer.cpp
+++ b/third_party/WebKit/Source/core/css/StylePropertySerializer.cpp
@@ -184,7 +184,10 @@ String StylePropertySerializer::getCustomPropertyText(const PropertyValueForSeri
const CSSCustomPropertyDeclaration* value = toCSSCustomPropertyDeclaration(property.value());
result.append(value->name());
result.append(':');
- result.append(value->customCSSText());
Timothy Loh 2016/07/29 01:15:06 I'd rather this line just left as is (looks odd to
rwlbuis 2016/07/29 01:25:17 Well spotted, I had a check on customPropertyValue
+ String customPropertyValue = value->customCSSText();
+ if (!value->value())
+ result.append(' ');
+ result.append(customPropertyValue);
if (property.isImportant())
result.append(" !important");
result.append(';');

Powered by Google App Engine
This is Rietveld 408576698