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

Side by Side Diff: Source/core/css/CSSCounterValue.cpp

Issue 1303153003: Change Counter to be a CSSValue (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Oilpan fix Created 5 years, 4 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
Timothy Loh 2015/08/21 07:33:12 2015?
sashab 2015/08/24 01:36:11 Done.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "config.h"
6 #include "core/css/CSSCounterValue.h"
7
8 #include "core/css/CSSMarkup.h"
9 #include "wtf/text/StringBuilder.h"
10
11 namespace blink {
12
13 String CSSCounterValue::customCSSText() const
14 {
15 StringBuilder result;
16 if (separator().isEmpty())
17 result.appendLiteral("counter(");
18 else
19 result.appendLiteral("counters(");
20
21 result.append(identifier());
22 if (!separator().isEmpty()) {
23 result.appendLiteral(", ");
24 result.append(serializeString(separator()));
25 }
26 bool isDefaultListStyle = listStyleIdent() == CSSValueDecimal;
27 if (!listStyle().isEmpty() && !isDefaultListStyle) {
28 result.appendLiteral(", ");
29 result.append(listStyle());
30 }
31 result.append(')');
32
33 return result.toString();
34 }
35
36 DEFINE_TRACE_AFTER_DISPATCH(CSSCounterValue)
37 {
38 visitor->trace(m_identifier);
39 visitor->trace(m_listStyle);
40 visitor->trace(m_separator);
41 CSSValue::traceAfterDispatch(visitor);
42 }
43
44 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698