Commit d8897e60 authored by sashab@chromium.org's avatar sashab@chromium.org

Inline CSSCounterValue::listStyle()

Inline CSSCounterValue::listStyle in CSSCounterValue::customCSSText()
where it's used, and renamed listStyleIdent() to just listStyle().

Review URL: https://codereview.chromium.org/1314353002

git-svn-id: svn://svn.chromium.org/blink/trunk@201542 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent ae85ee7e
......@@ -23,10 +23,10 @@ String CSSCounterValue::customCSSText() const
result.appendLiteral(", ");
result.append(serializeString(separator()));
}
bool isDefaultListStyle = listStyleIdent() == CSSValueDecimal;
if (!listStyle().isEmpty() && !isDefaultListStyle) {
bool isDefaultListStyle = listStyle() == CSSValueDecimal;
if (!isDefaultListStyle) {
result.appendLiteral(", ");
result.append(listStyle());
result.append(m_listStyle->cssText());
}
result.append(')');
......
......@@ -35,11 +35,9 @@ public:
}
String identifier() const { return m_identifier->getStringValue(); }
String listStyle() const { return m_listStyle->cssText(); }
CSSValueID listStyle() const { return m_listStyle->getValueID(); }
String separator() const { return m_separator->getStringValue(); }
CSSValueID listStyleIdent() const { return m_listStyle->getValueID(); }
bool equals(const CSSCounterValue& other) const
{
return identifier() == other.identifier()
......
......@@ -721,7 +721,7 @@ void StyleBuilderFunctions::applyValueCSSPropertyContent(StyleResolverState& sta
if (item->isCounterValue()) {
CSSCounterValue* counterValue = toCSSCounterValue(item.get());
EListStyleType listStyleType = NoneListStyle;
CSSValueID listStyleIdent = counterValue->listStyleIdent();
CSSValueID listStyleIdent = counterValue->listStyle();
if (listStyleIdent != CSSValueNone)
listStyleType = static_cast<EListStyleType>(listStyleIdent - CSSValueDisc);
OwnPtr<CounterContent> counter = adoptPtr(new CounterContent(AtomicString(counterValue->identifier()), listStyleType, AtomicString(counterValue->separator())));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment