Clean up CSS Counter code
https://bugs.webkit.org/show_bug.cgi?id=68492
Reviewed by Tony Chang.
Source/WebCore:
Several cleanups/fixes:
- Make Counter::listStyle() return the actual list style string,
rather than empty string.
- Handle a specified list style of "none" correctly when generating
cssText and in Counter::listStyle().
- Use StringBuilder when generating cssText.
Test: fast/css/counters/getCounterValue.html
* css/CSSParser.cpp:
(WebCore::CSSParser::parseCounterContent):
Simplify processing (moving conversion to CSSStyleSelector),
pass a CSS_IDENT as the listStyle to Counter::create.
* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::cssText):
Use StringBuilder.
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyProperty):
Convert from a CSS_IDENT to an EListStyleType.
* css/Counter.h:
(WebCore::Counter::listStyleIdent):
Renamed from listStyleNumber to match its new functionality.
LayoutTests:
Added tests for setting the list style to "none"
as well as tests for getCounterValue.
* fast/css/counters/counter-cssText-expected.txt:
* fast/css/counters/counter-cssText.html:
* fast/css/counters/getCounterValue-expected.txt: Added.
* fast/css/counters/getCounterValue.html: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95664
268f45cc-cd09-0410-ab3c-
d52691b4dbfc