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

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

Issue 8041039: Merge 95071 - Fix cssText property of counter-valued CSSPrimitiveValue and avoid uninitialized re... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/835/
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 | « LayoutTests/fast/css/counters/counter-cssText-expected.txt ('k') | 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 95989)
+++ Source/WebCore/css/CSSPrimitiveValue.cpp (working copy)
@@ -742,12 +742,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 | « LayoutTests/fast/css/counters/counter-cssText-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698