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 82dda72e3686a62958a196917ddb15b19d43076c..7596bafd44fb3068bf13a3f0808e0f9b787b872d 100644 |
--- a/third_party/WebKit/Source/core/css/StylePropertySerializer.cpp |
+++ b/third_party/WebKit/Source/core/css/StylePropertySerializer.cpp |
@@ -192,6 +192,17 @@ String StylePropertySerializer::getCustomPropertyText(const PropertyValueForSeri |
return result.toString(); |
} |
+static String getApplyAtRuleText(const CSSValue* value, bool isNotFirstDecl) |
+{ |
+ StringBuilder result; |
+ if (isNotFirstDecl) |
+ result.append(' '); |
+ result.appendLiteral("@apply "); |
+ result.append(toCSSCustomIdentValue(value)->value()); |
+ result.append(';'); |
+ return result.toString(); |
+} |
+ |
String StylePropertySerializer::getPropertyText(CSSPropertyID propertyID, const String& value, bool isImportant, bool isNotFirstDecl) const |
{ |
StringBuilder result; |
@@ -367,6 +378,9 @@ String StylePropertySerializer::asText() const |
case CSSPropertyAll: |
result.append(getPropertyText(propertyID, property.value()->cssText(), property.isImportant(), numDecls++)); |
continue; |
+ case CSSPropertyApplyAtRule: |
+ result.append(getApplyAtRuleText(property.value(), numDecls++)); |
+ continue; |
default: |
break; |
} |