| Index: Source/core/css/CSSCounterValue.cpp
|
| diff --git a/Source/core/css/CSSCounterValue.cpp b/Source/core/css/CSSCounterValue.cpp
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..6a1f0698768175dd1086da613b091acc7504ae67
|
| --- /dev/null
|
| +++ b/Source/core/css/CSSCounterValue.cpp
|
| @@ -0,0 +1,44 @@
|
| +// Copyright 2015 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "config.h"
|
| +#include "core/css/CSSCounterValue.h"
|
| +
|
| +#include "core/css/CSSMarkup.h"
|
| +#include "wtf/text/StringBuilder.h"
|
| +
|
| +namespace blink {
|
| +
|
| +String CSSCounterValue::customCSSText() const
|
| +{
|
| + StringBuilder result;
|
| + if (separator().isEmpty())
|
| + result.appendLiteral("counter(");
|
| + else
|
| + result.appendLiteral("counters(");
|
| +
|
| + result.append(identifier());
|
| + if (!separator().isEmpty()) {
|
| + result.appendLiteral(", ");
|
| + result.append(serializeString(separator()));
|
| + }
|
| + bool isDefaultListStyle = listStyleIdent() == CSSValueDecimal;
|
| + if (!listStyle().isEmpty() && !isDefaultListStyle) {
|
| + result.appendLiteral(", ");
|
| + result.append(listStyle());
|
| + }
|
| + result.append(')');
|
| +
|
| + return result.toString();
|
| +}
|
| +
|
| +DEFINE_TRACE_AFTER_DISPATCH(CSSCounterValue)
|
| +{
|
| + visitor->trace(m_identifier);
|
| + visitor->trace(m_listStyle);
|
| + visitor->trace(m_separator);
|
| + CSSValue::traceAfterDispatch(visitor);
|
| +}
|
| +
|
| +}
|
|
|