LayoutTests:
authordarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 19 Mar 2006 05:49:59 +0000 (05:49 +0000)
committerdarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 19 Mar 2006 05:49:59 +0000 (05:49 +0000)
        Reviewed by Hyatt.

        - test for http://bugzilla.opendarwin.org/show_bug.cgi?id=6795
          Slow image load causes render problem

        * fast/block/float/vertical-move-relayout-expected.checksum: Added.
        * fast/block/float/vertical-move-relayout-expected.png: Added.
        * fast/block/float/vertical-move-relayout-expected.txt: Added.
        * fast/block/float/vertical-move-relayout.html: Added.

WebCore:

        Test: fast/block/float/vertical-move-relayout.html

        Reviewed by Hyatt.

        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6795
          Slow image load causes render problem

        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::layoutBlockChildren): Call markAllDescendantsWithFloatsForLayout
        when the child's vertical position changes.

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

LayoutTests/ChangeLog
LayoutTests/fast/block/float/vertical-move-relayout-expected.checksum [new file with mode: 0644]
LayoutTests/fast/block/float/vertical-move-relayout-expected.png [new file with mode: 0644]
LayoutTests/fast/block/float/vertical-move-relayout-expected.txt [new file with mode: 0644]
LayoutTests/fast/block/float/vertical-move-relayout.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/rendering/RenderBlock.cpp

index 1fbe0bd49506ae1f0d4c0908ca85225164a722f9..22f05584cbf0bcf6289c672a76ae441e5bb514ca 100644 (file)
@@ -1,3 +1,15 @@
+2006-03-18  Mitz Pettel  <opendarwin.org@mitzpettel.com>
+
+        Reviewed by Hyatt.
+
+        - test for http://bugzilla.opendarwin.org/show_bug.cgi?id=6795
+          Slow image load causes render problem
+
+        * fast/block/float/vertical-move-relayout-expected.checksum: Added.
+        * fast/block/float/vertical-move-relayout-expected.png: Added.
+        * fast/block/float/vertical-move-relayout-expected.txt: Added.
+        * fast/block/float/vertical-move-relayout.html: Added.
+
 2006-03-18  David Kilzer  <ddkilzer@kilzer.net>
 
         Reviewed by Darin.
diff --git a/LayoutTests/fast/block/float/vertical-move-relayout-expected.checksum b/LayoutTests/fast/block/float/vertical-move-relayout-expected.checksum
new file mode 100644 (file)
index 0000000..ce8a351
--- /dev/null
@@ -0,0 +1,2 @@
+b0755b59cd236003e0bb75d0310d679e
+\ No newline at end of file
diff --git a/LayoutTests/fast/block/float/vertical-move-relayout-expected.png b/LayoutTests/fast/block/float/vertical-move-relayout-expected.png
new file mode 100644 (file)
index 0000000..457b08f
Binary files /dev/null and b/LayoutTests/fast/block/float/vertical-move-relayout-expected.png differ
diff --git a/LayoutTests/fast/block/float/vertical-move-relayout-expected.txt b/LayoutTests/fast/block/float/vertical-move-relayout-expected.txt
new file mode 100644 (file)
index 0000000..d80606c
--- /dev/null
@@ -0,0 +1,26 @@
+layer at (0,0) size 800x600
+  RenderCanvas 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 784x18
+        RenderText {TEXT} at (0,0) size 53x18
+          text run at (0,0) width 53: "Test for "
+        RenderInline {I} at (0,0) size 607x18
+          RenderInline {A} at (0,0) size 348x18 [color=#0000EE]
+            RenderText {TEXT} at (53,0) size 348x18
+              text run at (53,0) width 348: "http://bugzilla.opendarwin.org/show_bug.cgi?id=6795"
+          RenderText {TEXT} at (401,0) size 259x18
+            text run at (401,0) width 4: " "
+            text run at (405,0) width 255: "Slow image load causes render problem"
+        RenderText {TEXT} at (660,0) size 4x18
+          text run at (660,0) width 4: "."
+      RenderBlock {P} at (0,34) size 784x18
+        RenderText {TEXT} at (0,0) size 284x18
+          text run at (0,0) width 284: "There should be only one blue square below:"
+      RenderBlock {DIV} at (0,68) size 784x140
+        RenderBlock (anonymous) at (0,0) size 784x120
+          RenderBlock (floating) {DIV} at (0,0) size 100x100 [bgcolor=#87CEEB]
+          RenderBlock {DIV} at (100,0) size 50x120
+          RenderText {TEXT} at (0,0) size 0x0
+        RenderBlock {DIV} at (0,120) size 784x20
diff --git a/LayoutTests/fast/block/float/vertical-move-relayout.html b/LayoutTests/fast/block/float/vertical-move-relayout.html
new file mode 100644 (file)
index 0000000..2038ad3
--- /dev/null
@@ -0,0 +1,27 @@
+<html>
+<head>
+    <style type="text/css">
+        #f {
+            float: left;
+            height: 100px;
+            width: 100px;
+            background: skyblue;
+        }
+    </style>
+</head>
+<body onload="document.body.offsetTop; document.getElementById('t').style.height = '120px'">
+    <p>
+        Test for <i><a href="http://bugzilla.opendarwin.org/show_bug.cgi?id=6795">http://bugzilla.opendarwin.org/show_bug.cgi?id=6795</a>
+        Slow image load causes render problem</i>.
+    </p>
+    <p>
+        There should be only one blue square below:
+    </p>
+    <div>
+        <div id="f"></div>
+        <div id="t" style="width: 50px; display: inline-block;"></div>
+        <div style="height: 20px;"></div>
+        </div>
+    </div>
+</body>
+</html>
index 16e654995c7d4472c95c907adaefab6a47cd5478..027dcb42e698e5d6c17bc921f8d8ebe67e8e8c9d 100644 (file)
@@ -1,3 +1,16 @@
+2006-03-18  Mitz Pettel  <opendarwin.org@mitzpettel.com>
+
+        Test: fast/block/float/vertical-move-relayout.html
+
+        Reviewed by Hyatt.
+
+        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6795
+          Slow image load causes render problem
+
+        * rendering/RenderBlock.cpp:
+        (WebCore::RenderBlock::layoutBlockChildren): Call markAllDescendantsWithFloatsForLayout
+        when the child's vertical position changes.
+
 2006-03-18  David Kilzer  <ddkilzer@kilzer.net>
 
         Reviewed by Darin.
index bb394217e2f0fbd30ad97fb21e0e2cfdecb00348..6c6d10c2cc6d479cc6e8ebc9b4af78209bda12e1 100644 (file)
@@ -1063,6 +1063,8 @@ void RenderBlock::layoutBlockChildren(bool relayoutChildren)
         
         // Go ahead and position the child as though it didn't collapse with the top.
         child->setPos(child->xPos(), yPosEstimate);
+        if (yPosEstimate != oldChildY && !child->avoidsFloats() && child->containsFloats())
+            child->markAllDescendantsWithFloatsForLayout();
         child->layoutIfNeeded();
 
         // Now determine the correct ypos based off examination of collapsing margin