LayoutTests:
authordarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 15 Jul 2006 19:27:34 +0000 (19:27 +0000)
committerdarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 15 Jul 2006 19:27:34 +0000 (19:27 +0000)
        Reviewed by John Sullivan.

        - test for http://bugzilla.opendarwin.org/show_bug.cgi?id=8587
          <rdar://problem/4631844>
          REGRESSION: {display:list-item} on items outside an ol or ul element no longer causes incremental numbering

        * fast/lists/numeric-markers-outside-list-expected.checksum: Added.
        * fast/lists/numeric-markers-outside-list-expected.png: Added.
        * fast/lists/numeric-markers-outside-list-expected.txt: Added.
        * fast/lists/numeric-markers-outside-list.html: Added.

WebCore:

        Reviewed by John Sullivan.

        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8587
          <rdar://problem/4631844>
          REGRESSION: {display:list-item} on items outside an ol or ul element no longer causes incremental numbering

        Test: fast/lists/numeric-markers-outside-list.html

        * rendering/RenderListItem.cpp: (WebCore::previousListItem):
        Look for list items, even when we're outside any list.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15458 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/fast/lists/numeric-markers-outside-list-expected.checksum [new file with mode: 0644]
LayoutTests/fast/lists/numeric-markers-outside-list-expected.png [new file with mode: 0644]
LayoutTests/fast/lists/numeric-markers-outside-list-expected.txt [new file with mode: 0644]
LayoutTests/fast/lists/numeric-markers-outside-list.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/rendering/RenderListItem.cpp

index 50ae5f6d20046871326190f18857f4b30ef93894..3c4782a85b99a3e1da7b13f58cbfb7de2613f51b 100644 (file)
@@ -1,4 +1,17 @@
-2006-07-16  Geoffrey Garen  <ggaren@apple.com>
+2006-07-15  Darin Adler  <darin@apple.com>
+
+        Reviewed by John Sullivan.
+
+        - test for http://bugzilla.opendarwin.org/show_bug.cgi?id=8587
+          <rdar://problem/4631844>
+          REGRESSION: {display:list-item} on items outside an ol or ul element no longer causes incremental numbering
+
+        * fast/lists/numeric-markers-outside-list-expected.checksum: Added.
+        * fast/lists/numeric-markers-outside-list-expected.png: Added.
+        * fast/lists/numeric-markers-outside-list-expected.txt: Added.
+        * fast/lists/numeric-markers-outside-list.html: Added.
+
+2006-07-15  Geoffrey Garen  <ggaren@apple.com>
 
         Reviewed by Maciej.
         
diff --git a/LayoutTests/fast/lists/numeric-markers-outside-list-expected.checksum b/LayoutTests/fast/lists/numeric-markers-outside-list-expected.checksum
new file mode 100644 (file)
index 0000000..dd25beb
--- /dev/null
@@ -0,0 +1 @@
+aaf9a304e829cb57e0261c6640fbb73c
\ No newline at end of file
diff --git a/LayoutTests/fast/lists/numeric-markers-outside-list-expected.png b/LayoutTests/fast/lists/numeric-markers-outside-list-expected.png
new file mode 100644 (file)
index 0000000..7fc858e
Binary files /dev/null and b/LayoutTests/fast/lists/numeric-markers-outside-list-expected.png differ
diff --git a/LayoutTests/fast/lists/numeric-markers-outside-list-expected.txt b/LayoutTests/fast/lists/numeric-markers-outside-list-expected.txt
new file mode 100644 (file)
index 0000000..95fa2a6
--- /dev/null
@@ -0,0 +1,14 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderBlock {DIV} at (0,0) size 784x36
+        RenderListItem {DIV} at (30,0) size 754x18
+          RenderListMarker at (-20,0) size 16x18
+          RenderText {#text} at (0,0) size 150x18
+            text run at (0,0) width 150: "should have a label of 1"
+        RenderListItem {DIV} at (30,18) size 754x18
+          RenderListMarker at (-20,0) size 16x18
+          RenderText {#text} at (0,0) size 150x18
+            text run at (0,0) width 150: "should have a label of 2"
diff --git a/LayoutTests/fast/lists/numeric-markers-outside-list.html b/LayoutTests/fast/lists/numeric-markers-outside-list.html
new file mode 100644 (file)
index 0000000..008f7d3
--- /dev/null
@@ -0,0 +1,4 @@
+<meta http-equiv="content-type" content="text/html; charset=utf-8">
+<div style="padding-left:30px">
+<div class="list" style="display: list-item; list-style-type: decimal">should have a label of 1</div>
+<div class="list" style="display: list-item; list-style-type: decimal">should have a label of 2</div>
index 3a821d4ab7676bc1dd7286943485253d7e144562..63464fa2b22932fc485507c8785a74b4d9c54769 100644 (file)
@@ -1,3 +1,16 @@
+2006-07-15  Darin Adler  <darin@apple.com>
+
+        Reviewed by John Sullivan.
+
+        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8587
+          <rdar://problem/4631844>
+          REGRESSION: {display:list-item} on items outside an ol or ul element no longer causes incremental numbering
+
+        Test: fast/lists/numeric-markers-outside-list.html
+
+        * rendering/RenderListItem.cpp: (WebCore::previousListItem):
+        Look for list items, even when we're outside any list.
+
 2006-07-15  Adele Peterson  <adele@apple.com>
 
         Reviewed by John.
index e3f1fb20353266e0cbaf2560c1d5784a0c091cac..647a29dc4310abab138cacb1f6a7c4ea53ce64a1 100644 (file)
@@ -90,8 +90,6 @@ static Node* enclosingList(Node* node)
 
 static RenderListItem* previousListItem(Node* list, RenderListItem* item)
 {
-    if (!list)
-        return 0;
     for (Node* n = item->node()->traversePreviousNode(); n != list; n = n->traversePreviousNode()) {
         RenderObject* o = n->renderer();
         if (o && o->isListItem()) {