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

Unified Diff: Source/core/css/CSSValueList.cpp

Issue 16736004: Stylesheet rule.cssText of content property should be quoted when the value is string. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 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
« no previous file with comments | « Source/core/css/CSSValueList.h ('k') | Source/core/css/StylePropertySerializer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSValueList.cpp
diff --git a/Source/core/css/CSSValueList.cpp b/Source/core/css/CSSValueList.cpp
index 1a6adf92aae4518e15ad96533f07ed4bc96b9ab2..c293b209ff07d8ba79856a1bb216df6621ae1430 100644
--- a/Source/core/css/CSSValueList.cpp
+++ b/Source/core/css/CSSValueList.cpp
@@ -97,7 +97,7 @@ PassRefPtr<CSSValueList> CSSValueList::copy()
return newList.release();
}
-String CSSValueList::customCssText() const
+String CSSValueList::customCssText(CssTextFormattingFlags formattingFlag) const
{
StringBuilder result;
String separator;
@@ -119,7 +119,10 @@ String CSSValueList::customCssText() const
for (unsigned i = 0; i < size; i++) {
if (!result.isEmpty())
result.append(separator);
- result.append(m_values[i]->cssText());
+ if (formattingFlag == AlwaysQuoteCSSString && m_values[i]->isPrimitiveValue())
+ result.append(toCSSPrimitiveValue(m_values[i].get())->customCssText(AlwaysQuoteCSSString));
+ else
+ result.append(m_values[i]->cssText());
}
return result.toString();
« no previous file with comments | « Source/core/css/CSSValueList.h ('k') | Source/core/css/StylePropertySerializer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698