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

Unified Diff: Source/WebCore/css/CSSPrimitiveValue.cpp

Issue 7941005: Merge 95071 - Fix cssText property of counter-valued CSSPrimitiveValue and avoid uninitialized read (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/874/
Patch Set: Created 9 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/css/CSSPrimitiveValue.cpp
===================================================================
--- Source/WebCore/css/CSSPrimitiveValue.cpp (revision 95432)
+++ Source/WebCore/css/CSSPrimitiveValue.cpp (working copy)
@@ -772,12 +772,22 @@
text += m_value.string;
text += ")";
break;
- case CSS_COUNTER:
- text = "counter(";
- text += String::number(m_value.num);
+ case CSS_COUNTER: {
+ String separator = m_value.counter->separator();
+ text = separator.isEmpty() ? "counter(" : "counters(";
+ text += m_value.counter->identifier();
+ if (!separator.isEmpty()) {
+ text += ", ";
+ text += quoteCSSStringIfNeeded(separator);
+ }
+ const char* listStyleName = getValueName(m_value.counter->listStyleNumber() + CSSValueDisc);
+ if (listStyleName) {
+ text += ", ";
+ text += listStyleName;
+ }
text += ")";
- // FIXME: Add list-style and separator
break;
+ }
case CSS_RECT: {
DEFINE_STATIC_LOCAL(const String, rectParen, ("rect("));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698