WebCore:
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 28 Jan 2008 17:40:34 +0000 (17:40 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 28 Jan 2008 17:40:34 +0000 (17:40 +0000)
        Reviewed by Darin Adler.

        - fix http://bugs.webkit.org/show_bug.cgi?id=16774
          REGRESSION (r27464-r27504) javascript popup menu does not display 'close' button

        Test: fast/dynamic/float-no-longer-overhanging.html

        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::addOverhangingFloats): If a child's float turns
        out not to be overhanging at this time, ensure that the child paints it.

LayoutTests:

        Reviewed by Darin Adler.

        - pixel test for http://bugs.webkit.org/show_bug.cgi?id=16774
          REGRESSION (r27464-r27504) javascript popup menu does not display 'close' button

        * fast/dynamic/float-no-longer-overhanging.html: Added.
        * platform/mac/fast/dynamic/float-no-longer-overhanging-expected.checksum: Added.
        * platform/mac/fast/dynamic/float-no-longer-overhanging-expected.png: Added.
        * platform/mac/fast/dynamic/float-no-longer-overhanging-expected.txt: Added.

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

LayoutTests/ChangeLog
LayoutTests/fast/dynamic/float-no-longer-overhanging.html [new file with mode: 0644]
LayoutTests/platform/mac/fast/dynamic/float-no-longer-overhanging-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/fast/dynamic/float-no-longer-overhanging-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/dynamic/float-no-longer-overhanging-expected.txt [new file with mode: 0644]
WebCore/ChangeLog
WebCore/rendering/RenderBlock.cpp

index c8b63e4f04619b216f3c683f9494094edecc1f3c..3096a83bebae012cd3c0deb4d971cab802d5c691 100644 (file)
@@ -1,3 +1,15 @@
+2008-01-28  Dan Bernstein  <mitz@apple.com>
+
+        Reviewed by Darin Adler.
+
+        - pixel test for http://bugs.webkit.org/show_bug.cgi?id=16774
+          REGRESSION (r27464-r27504) javascript popup menu does not display 'close' button
+
+        * fast/dynamic/float-no-longer-overhanging.html: Added.
+        * platform/mac/fast/dynamic/float-no-longer-overhanging-expected.checksum: Added.
+        * platform/mac/fast/dynamic/float-no-longer-overhanging-expected.png: Added.
+        * platform/mac/fast/dynamic/float-no-longer-overhanging-expected.txt: Added.
+
 2008-01-28  Oliver Hunt  <oliver@apple.com>
 
         RS=Mark.
 2008-01-28  Oliver Hunt  <oliver@apple.com>
 
         RS=Mark.
diff --git a/LayoutTests/fast/dynamic/float-no-longer-overhanging.html b/LayoutTests/fast/dynamic/float-no-longer-overhanging.html
new file mode 100644 (file)
index 0000000..0d8d474
--- /dev/null
@@ -0,0 +1,20 @@
+<html>
+<head>
+</head>
+<body>
+    <div id="target" style="height: 90px;">
+        <div style="height: 100px; width: 100px; background: red;">
+            <div style="float: left; height: 100px; width: 100px; background-color: green;"></div>
+        </div>
+    </div>
+    <script>
+        function test()
+        {
+            document.getElementById("target").style.height = "110px";
+        }
+
+        document.body.offsetTop;
+        test();
+    </script>
+</body>
+</html>
diff --git a/LayoutTests/platform/mac/fast/dynamic/float-no-longer-overhanging-expected.checksum b/LayoutTests/platform/mac/fast/dynamic/float-no-longer-overhanging-expected.checksum
new file mode 100644 (file)
index 0000000..ae7a7bd
--- /dev/null
@@ -0,0 +1 @@
+18f1f64eab31dfb69467a497de9442d7
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/fast/dynamic/float-no-longer-overhanging-expected.png b/LayoutTests/platform/mac/fast/dynamic/float-no-longer-overhanging-expected.png
new file mode 100644 (file)
index 0000000..fc96c0b
Binary files /dev/null and b/LayoutTests/platform/mac/fast/dynamic/float-no-longer-overhanging-expected.png differ
diff --git a/LayoutTests/platform/mac/fast/dynamic/float-no-longer-overhanging-expected.txt b/LayoutTests/platform/mac/fast/dynamic/float-no-longer-overhanging-expected.txt
new file mode 100644 (file)
index 0000000..8fdef52
--- /dev/null
@@ -0,0 +1,8 @@
+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 784x110
+        RenderBlock {DIV} at (0,0) size 100x100 [bgcolor=#FF0000]
+          RenderBlock (floating) {DIV} at (0,0) size 100x100 [bgcolor=#008000]
index 0dfdc43f6fed5ff514fe39db55165d6d45bf7511..0052b67120641a952880b3d59e1ef5c861923fe4 100644 (file)
@@ -1,3 +1,16 @@
+2008-01-28  Dan Bernstein  <mitz@apple.com>
+
+        Reviewed by Darin Adler.
+
+        - fix http://bugs.webkit.org/show_bug.cgi?id=16774
+          REGRESSION (r27464-r27504) javascript popup menu does not display 'close' button
+
+        Test: fast/dynamic/float-no-longer-overhanging.html
+
+        * rendering/RenderBlock.cpp:
+        (WebCore::RenderBlock::addOverhangingFloats): If a child's float turns
+        out not to be overhanging at this time, ensure that the child paints it.
+
 2008-01-28  Oliver Hunt  <oliver@apple.com>
 
         More wx fixes
 2008-01-28  Oliver Hunt  <oliver@apple.com>
 
         More wx fixes
index c4f73fa2afbd2d5c4361fc88a7ad6465c2ea0844..a2cd21ba640a5d23fd3f41f49a77700473b6566c 100644 (file)
@@ -2689,7 +2689,9 @@ int RenderBlock::addOverhangingFloats(RenderBlock* child, int xoff, int yoff)
                 }
                 m_floatingObjects->append(floatingObj);
             }
                 }
                 m_floatingObjects->append(floatingObj);
             }
-        }
+        } else
+            r->noPaint = false;
+
         if (!r->noPaint && !r->node->hasLayer()) {
             IntRect floatOverflowRect = r->node->overflowRect(false);
             floatOverflowRect.move(r->left + r->node->marginLeft(), r->startY + r->node->marginTop());
         if (!r->noPaint && !r->node->hasLayer()) {
             IntRect floatOverflowRect = r->node->overflowRect(false);
             floatOverflowRect.move(r->left + r->node->marginLeft(), r->startY + r->node->marginTop());