LayoutTests:
Reviewed by Darin.
Test for http://bugzilla.opendarwin.org/show_bug.cgi?id=8587 / <rdar://problem/
4631844>
REGRESSION: {display:list-item} items outside an ol or ul element don't number correctly
* fast/lists/ordered-list-with-no-ol-tag-expected.checksum: Added.
* fast/lists/ordered-list-with-no-ol-tag-expected.png: Added.
* fast/lists/ordered-list-with-no-ol-tag-expected.txt: Added.
* fast/lists/ordered-list-with-no-ol-tag.html: Added.
WebCore:
Reviewed by Darin.
Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8587 / <rdar://problem/
4631844>
REGRESSION: {display:list-item} items outside an ol or ul element don't number correctly
* rendering/RenderListItem.cpp:
(WebCore::enclosingList): If no real list element is found, use parent instead.
(WebCore::previousListItem): Check list elements to see if they are list items -- the
old code assumed that a list would never be a list item but this is entirely possible
with CSS and especially with the new rule that means any DOM element could act as a list.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15687
268f45cc-cd09-0410-ab3c-
d52691b4dbfc