Add support for <ol reversed>.
authoralexis.menard@openbossa.org <alexis.menard@openbossa.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Dec 2011 13:43:37 +0000 (13:43 +0000)
committeralexis.menard@openbossa.org <alexis.menard@openbossa.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Dec 2011 13:43:37 +0000 (13:43 +0000)
commitfb91cfddff4a739ed12122adbe74489147fef0cb
tree39b6e7638e8598f6e7a9848a794ffd28a34f7b0c
parent4703089876181d7a5792ad4a49d2c2fd604efb6a
Add support for <ol reversed>.
https://bugs.webkit.org/show_bug.cgi?id=36724

The reversed attribute makes an ordered list appear with marker values
decreasing from n, where n is the number of items.
See: http://www.whatwg.org/specs/web-apps/current-work/#attr-ol-reversed

Patch by Alexis Menard  <alexis.menard@openbossa.org>, Jakub Wieczorek <jwieczorek@webkit.org> on 2011-12-16
Reviewed by Darin Adler.

Source/WebCore:

Tests: fast/lists/ol-reversed-dynamic-simple.html
       fast/lists/ol-reversed-dynamic.html
       fast/lists/ol-reversed-nested-items.html
       fast/lists/ol-reversed-nested-list.html
       fast/lists/ol-reversed-simple.html

* html/HTMLAttributeNames.in:
* html/HTMLOListElement.cpp:
(WebCore::HTMLOListElement::HTMLOListElement):
(WebCore::HTMLOListElement::parseMappedAttribute):
(WebCore::HTMLOListElement::updateItemValues):
(WebCore::HTMLOListElement::recalculateItemCount):
* html/HTMLOListElement.h:
(WebCore::HTMLOListElement::start):
(WebCore::HTMLOListElement::isReversed):
(WebCore::HTMLOListElement::itemCountChanged):
(WebCore::HTMLOListElement::itemCount):
* html/HTMLOListElement.idl:
* rendering/RenderListItem.cpp:
(WebCore::RenderListItem::nextListItem):
(WebCore::previousListItem):
(WebCore::RenderListItem::calcValue):
(WebCore::RenderListItem::explicitValueChanged):
(WebCore::previousOrNextItem):
(WebCore::RenderListItem::updateListMarkerNumbers):
* rendering/RenderListItem.h:

LayoutTests:

* fast/lists/ol-reversed-dynamic-expected.txt: Added.
* fast/lists/ol-reversed-dynamic-simple-expected.txt: Added.
* fast/lists/ol-reversed-dynamic-simple.html: Added.
* fast/lists/ol-reversed-dynamic.html: Added.
* fast/lists/ol-reversed-nested-items-expected.txt: Added.
* fast/lists/ol-reversed-nested-items.html: Added.
* fast/lists/ol-reversed-nested-list-expected.txt: Added.
* fast/lists/ol-reversed-nested-list.html: Added.
* fast/lists/ol-reversed-simple-expected.txt: Added.
* fast/lists/ol-reversed-simple.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103062 268f45cc-cd09-0410-ab3c-d52691b4dbfc
19 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/lists/ol-reversed-dynamic-expected.txt [new file with mode: 0644]
LayoutTests/fast/lists/ol-reversed-dynamic-simple-expected.txt [new file with mode: 0644]
LayoutTests/fast/lists/ol-reversed-dynamic-simple.html [new file with mode: 0644]
LayoutTests/fast/lists/ol-reversed-dynamic.html [new file with mode: 0644]
LayoutTests/fast/lists/ol-reversed-nested-items-expected.txt [new file with mode: 0644]
LayoutTests/fast/lists/ol-reversed-nested-items.html [new file with mode: 0644]
LayoutTests/fast/lists/ol-reversed-nested-list-expected.txt [new file with mode: 0644]
LayoutTests/fast/lists/ol-reversed-nested-list.html [new file with mode: 0644]
LayoutTests/fast/lists/ol-reversed-simple-expected.txt [new file with mode: 0644]
LayoutTests/fast/lists/ol-reversed-simple.html [new file with mode: 0644]
LayoutTests/fast/lists/ol-reversed-simple.xhtml [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLAttributeNames.in
Source/WebCore/html/HTMLOListElement.cpp
Source/WebCore/html/HTMLOListElement.h
Source/WebCore/html/HTMLOListElement.idl
Source/WebCore/rendering/RenderListItem.cpp
Source/WebCore/rendering/RenderListItem.h