WebCore:
authormitz <mitz@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 16 Oct 2007 20:04:42 +0000 (20:04 +0000)
committermitz <mitz@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 16 Oct 2007 20:04:42 +0000 (20:04 +0000)
        Reviewed by Dave Hyatt.

        - fix http://bugs.webkit.org/show_bug.cgi?id=15296
          REGRESSION (r19716-r19719): width not specified for <marquee> tag is causing the alignment issue.

        Test: fast/block/float/marquee-shrink-to-avoid-floats.html

        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::shrinkToAvoidFloats): Changed to return 'true' for <marquee>s with auto width.

LayoutTests:

        Reviewed by Dave Hyatt.

        - test for http://bugs.webkit.org/show_bug.cgi?id=15296
          REGRESSION (r19716-r19719): width not specified for <marquee> tag is causing the alignment issue.

        * fast/block/float/marquee-shrink-to-avoid-floats.html: Added.
        * platform/mac/fast/block: Added.
        * platform/mac/fast/block/float: Added.
        * platform/mac/fast/block/float/marquee-shrink-to-avoid-floats-expected.checksum: Added.
        * platform/mac/fast/block/float/marquee-shrink-to-avoid-floats-expected.png: Added.
        * platform/mac/fast/block/float/marquee-shrink-to-avoid-floats-expected.txt: Added.

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

LayoutTests/ChangeLog
LayoutTests/fast/block/float/marquee-shrink-to-avoid-floats.html [new file with mode: 0644]
LayoutTests/platform/mac/fast/block/float/marquee-shrink-to-avoid-floats-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/fast/block/float/marquee-shrink-to-avoid-floats-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/block/float/marquee-shrink-to-avoid-floats-expected.txt [new file with mode: 0644]
WebCore/ChangeLog
WebCore/rendering/RenderObject.cpp

index 68b13c656338e0c810a084476e880601887ba17a..7594b6647e3d9c9a14008f96065a108426290dd8 100644 (file)
@@ -1,3 +1,17 @@
+2007-10-16  Mitz Pettel  <mitz@webkit.org>
+
+        Reviewed by Dave Hyatt.
+
+        - test for http://bugs.webkit.org/show_bug.cgi?id=15296
+          REGRESSION (r19716-r19719): width not specified for <marquee> tag is causing the alignment issue.
+
+        * fast/block/float/marquee-shrink-to-avoid-floats.html: Added.
+        * platform/mac/fast/block: Added.
+        * platform/mac/fast/block/float: Added.
+        * platform/mac/fast/block/float/marquee-shrink-to-avoid-floats-expected.checksum: Added.
+        * platform/mac/fast/block/float/marquee-shrink-to-avoid-floats-expected.png: Added.
+        * platform/mac/fast/block/float/marquee-shrink-to-avoid-floats-expected.txt: Added.
+
 2007-10-16  Beth Dakin  <bdakin@apple.com>
 
         Reviewed by Darin.
diff --git a/LayoutTests/fast/block/float/marquee-shrink-to-avoid-floats.html b/LayoutTests/fast/block/float/marquee-shrink-to-avoid-floats.html
new file mode 100644 (file)
index 0000000..e3e7cb5
--- /dev/null
@@ -0,0 +1,13 @@
+<p>
+    Test for <i><a href="http://bugs.webkit.org/show_bug.cgi?id=15296">http://bugs.webkit.org/show_bug.cgi?id=15296</a>
+    REGRESSION (r19716-r19719): width not specified for &lt;marquee&gt; tag is causing the alignment issue</i>.
+</p>
+<p>
+    This should be a green 100&times;100px square:
+</p>
+<div style="background-color: red; width: 100px;">
+    <div style="float: left; width: 50px; height: 100px; background-color: green"></div>
+    <div>
+        <marquee style="height: 100px; background-color: green;"></marquee>
+    </div>
+</div>
diff --git a/LayoutTests/platform/mac/fast/block/float/marquee-shrink-to-avoid-floats-expected.checksum b/LayoutTests/platform/mac/fast/block/float/marquee-shrink-to-avoid-floats-expected.checksum
new file mode 100644 (file)
index 0000000..a0c4bcd
--- /dev/null
@@ -0,0 +1 @@
+673dc9e8b14534c8e14b9bae70ed79ea
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/fast/block/float/marquee-shrink-to-avoid-floats-expected.png b/LayoutTests/platform/mac/fast/block/float/marquee-shrink-to-avoid-floats-expected.png
new file mode 100644 (file)
index 0000000..b8701f2
Binary files /dev/null and b/LayoutTests/platform/mac/fast/block/float/marquee-shrink-to-avoid-floats-expected.png differ
diff --git a/LayoutTests/platform/mac/fast/block/float/marquee-shrink-to-avoid-floats-expected.txt b/LayoutTests/platform/mac/fast/block/float/marquee-shrink-to-avoid-floats-expected.txt
new file mode 100644 (file)
index 0000000..df7d649
--- /dev/null
@@ -0,0 +1,27 @@
+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 714x36
+          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=15296"
+          RenderText {#text} at (354,0) size 714x36
+            text run at (354,0) width 4: " "
+            text run at (358,0) width 356: "REGRESSION (r19716-r19719): width not specified for"
+            text run at (0,18) width 294: "<marquee> tag is causing the alignment issue"
+        RenderText {#text} at (294,18) size 4x18
+          text run at (294,18) width 4: "."
+      RenderBlock {P} at (0,52) size 784x18
+        RenderText {#text} at (0,0) size 269x18
+          text run at (0,0) width 269: "This should be a green 100\x{D7}100px square:"
+      RenderBlock {DIV} at (0,86) size 100x100 [bgcolor=#FF0000]
+        RenderBlock (floating) {DIV} at (0,0) size 50x100 [bgcolor=#008000]
+        RenderBlock {DIV} at (0,0) size 100x100
+          RenderText {#text} at (0,0) size 0x0
+layer at (58,94) size 50x100 scrollX -50
+  RenderBlock {MARQUEE} at (50,0) size 50x100 [bgcolor=#008000]
index d45bdf228696b1e149f6db505b8b1ca5f702f9e3..2fffe25a4bdd0e99de4695afc3d6c235f608e2ad 100644 (file)
@@ -1,3 +1,15 @@
+2007-10-16  Mitz Pettel  <mitz@webkit.org>
+
+        Reviewed by Dave Hyatt.
+
+        - fix http://bugs.webkit.org/show_bug.cgi?id=15296
+          REGRESSION (r19716-r19719): width not specified for <marquee> tag is causing the alignment issue.
+
+        Test: fast/block/float/marquee-shrink-to-avoid-floats.html
+
+        * rendering/RenderObject.cpp:
+        (WebCore::RenderObject::shrinkToAvoidFloats): Changed to return 'true' for <marquee>s with auto width.
+
 2007-10-16  Beth Dakin  <bdakin@apple.com>
 
         Reviewed by Darin.
index cc6ce270f59ed5fac74d23259974852afc3faacd..e71dac2ab03ea5108bed39198cedc730c1012997 100644 (file)
@@ -2927,7 +2927,7 @@ bool RenderObject::shrinkToAvoidFloats() const
     // FIXME: Technically we should be able to shrink replaced elements on a line, but this is difficult to accomplish, since this
     // involves doing a relayout during findNextLineBreak and somehow overriding the containingBlockWidth method to return the
     // current remaining width on a line.
-    if (isInline() || !avoidsFloats())
+    if (isInline() && !isHTMLMarquee() || !avoidsFloats())
         return false;
 
     // All auto-width objects that avoid floats should always use lineWidth.