LayoutTests:
authormjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Feb 2007 13:09:04 +0000 (13:09 +0000)
committermjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Feb 2007 13:09:04 +0000 (13:09 +0000)
        Reviewed by Hyatt.

        - test for http://bugs.webkit.org/show_bug.cgi?id=12746
        REGRESSION (r13853): List item's first line overflows containing div

        * fast/lists/item-not-in-list-line-wrapping-expected.checksum: Added.
        * fast/lists/item-not-in-list-line-wrapping-expected.png: Added.
        * fast/lists/item-not-in-list-line-wrapping-expected.txt: Added.
        * fast/lists/item-not-in-list-line-wrapping.html: Added.

WebCore:

        Reviewed by Hyatt.

        - fix http://bugs.webkit.org/show_bug.cgi?id=12746
        REGRESSION (r13853): List item's first line overflows containing div

        Test: fast/lists/item-not-in-list-line-wrapping.html

        * rendering/bidi.cpp:
        (WebCore::RenderBlock::findNextLineBreak): Use the list marker's isInside()
        instead of looking at its style()->listStylePosition(), since if the
        list item is not in a list, the marker is inside regardless of the style.

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

LayoutTests/ChangeLog
LayoutTests/fast/lists/item-not-in-list-line-wrapping-expected.checksum [new file with mode: 0644]
LayoutTests/fast/lists/item-not-in-list-line-wrapping-expected.png [new file with mode: 0644]
LayoutTests/fast/lists/item-not-in-list-line-wrapping-expected.txt [new file with mode: 0644]
LayoutTests/fast/lists/item-not-in-list-line-wrapping.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/rendering/bidi.cpp

index d0921ca94b320014781665ee37cbac8d776e5bb9..860780f6dc653ff9616847669d318c106ac56a63 100644 (file)
@@ -1,3 +1,15 @@
+2007-02-13  Mitz Pettel  <mitz@webkit.org>
+
+        Reviewed by Hyatt.
+
+        - test for http://bugs.webkit.org/show_bug.cgi?id=12746
+        REGRESSION (r13853): List item's first line overflows containing div
+
+        * fast/lists/item-not-in-list-line-wrapping-expected.checksum: Added.
+        * fast/lists/item-not-in-list-line-wrapping-expected.png: Added.
+        * fast/lists/item-not-in-list-line-wrapping-expected.txt: Added.
+        * fast/lists/item-not-in-list-line-wrapping.html: Added.
+
 2007-02-13  Rob Buis  <buis@kde.org>
 
         Reviewed by Maciej.
diff --git a/LayoutTests/fast/lists/item-not-in-list-line-wrapping-expected.checksum b/LayoutTests/fast/lists/item-not-in-list-line-wrapping-expected.checksum
new file mode 100644 (file)
index 0000000..670511b
--- /dev/null
@@ -0,0 +1 @@
+3694d4e4ac0a019d9384905efc974b66
\ No newline at end of file
diff --git a/LayoutTests/fast/lists/item-not-in-list-line-wrapping-expected.png b/LayoutTests/fast/lists/item-not-in-list-line-wrapping-expected.png
new file mode 100644 (file)
index 0000000..0374bd3
Binary files /dev/null and b/LayoutTests/fast/lists/item-not-in-list-line-wrapping-expected.png differ
diff --git a/LayoutTests/fast/lists/item-not-in-list-line-wrapping-expected.txt b/LayoutTests/fast/lists/item-not-in-list-line-wrapping-expected.txt
new file mode 100644 (file)
index 0000000..d16c8cc
--- /dev/null
@@ -0,0 +1,28 @@
+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 {P} at (0,0) size 784x36
+        RenderText {#text} at (0,0) size 53x18
+          text run at (0,0) width 53: "Test for "
+        RenderInline {I} at (0,0) size 777x36
+          RenderInline {A} at (0,0) size 301x18 [color=#0000EE]
+            RenderText {#text} at (53,0) size 301x18
+              text run at (53,0) width 301: "http://bugs.webkit.org/show_bug.cgi?id=12746"
+          RenderText {#text} at (354,0) size 777x36
+            text run at (354,0) width 4: " "
+            text run at (358,0) width 419: "REGRESSION (r13853): List item's first line overflows containing"
+            text run at (0,18) width 19: "div"
+        RenderText {#text} at (19,18) size 4x18
+          text run at (19,18) width 4: "."
+      RenderBlock {P} at (0,52) size 784x18
+        RenderText {#text} at (0,0) size 262x18
+          text run at (0,0) width 262: "Text should not overflow the yellow box."
+      RenderBlock {DIV} at (0,86) size 125x36 [bgcolor=#FFFF00]
+        RenderListItem {LI} at (0,0) size 125x36
+          RenderListMarker at (-1,0) size 7x18: bullet
+          RenderText {#text} at (14,0) size 102x36
+            text run at (14,0) width 4: " "
+            text run at (18,0) width 84: "Lorem ipsum"
+            text run at (0,18) width 85: "dolor sit amet"
diff --git a/LayoutTests/fast/lists/item-not-in-list-line-wrapping.html b/LayoutTests/fast/lists/item-not-in-list-line-wrapping.html
new file mode 100644 (file)
index 0000000..c25dc5e
--- /dev/null
@@ -0,0 +1,19 @@
+<html>
+<head>
+    <title></title>
+</head>
+<body>
+    <p>
+        Test for <i><a href="http://bugs.webkit.org/show_bug.cgi?id=12746">http://bugs.webkit.org/show_bug.cgi?id=12746</a>
+        REGRESSION (r13853): List item's first line overflows containing div</i>.
+    </p>
+    <p>
+        Text should not overflow the yellow box.
+    </p>
+    <div style="background-color:yellow; width: 125px;">
+        <li>
+            Lorem ipsum dolor sit amet
+        </li>
+    </div>
+</body>
+</html>
index 466ee82e119ca6e05f350e781609f2f04e5b615e..a9b01bd4cceb6b5c2a51cca4d373734419e2e174 100644 (file)
@@ -1,3 +1,17 @@
+2007-02-13  Mitz Pettel  <mitz@webkit.org>
+
+        Reviewed by Hyatt.
+
+        - fix http://bugs.webkit.org/show_bug.cgi?id=12746
+        REGRESSION (r13853): List item's first line overflows containing div
+
+        Test: fast/lists/item-not-in-list-line-wrapping.html
+
+        * rendering/bidi.cpp:
+        (WebCore::RenderBlock::findNextLineBreak): Use the list marker's isInside()
+        instead of looking at its style()->listStylePosition(), since if the
+        list item is not in a list, the marker is inside regardless of the style.
+
 2007-02-13  Rob Buis  <buis@kde.org>
 
         Reviewed by Maciej.
index 529d7f066b52d4aca51e1f1818cb747c4132af99..3a93a32d492054830590b98169e07dc5be2aa417 100644 (file)
@@ -31,6 +31,7 @@
 #include "InlineTextBox.h"
 #include "RenderArena.h"
 #include "RenderLayer.h"
+#include "RenderListMarker.h"
 #include "RenderView.h"
 #include "break_lines.h"
 #include <wtf/AlwaysInline.h>
@@ -2191,7 +2192,7 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi
             currentCharacterIsWS = false;
             trailingSpaceObject = 0;
             
-            if (o->isListMarker() && o->style()->listStylePosition() == OUTSIDE) {
+            if (o->isListMarker() && !static_cast<RenderListMarker*>(o)->isInside()) {
                 // The marker must not have an effect on whitespace at the start
                 // of the line.  We start ignoring spaces to make sure that any additional
                 // spaces we see will be discarded. 
@@ -2525,7 +2526,7 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi
         o = next;
 
         if (!last->isFloatingOrPositioned() && last->isReplaced() && autoWrap && 
-            (!last->isListMarker() || last->style()->listStylePosition()==INSIDE)) {
+            (!last->isListMarker() || static_cast<RenderListMarker*>(last)->isInside())) {
             // Go ahead and add in tmpW.
             w += tmpW;
             tmpW = 0;