Reviewed by Hyatt.
authorantti <antti@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 25 Feb 2006 03:46:19 +0000 (03:46 +0000)
committerantti <antti@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 25 Feb 2006 03:46:19 +0000 (03:46 +0000)
        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=7440
        Floats not positioned correctly

        Test: fast/block/float/multiple-float-positioning.html

        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::positionNewFloats): Correct iteration of the float list

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

WebCore/ChangeLog
WebCore/rendering/RenderBlock.cpp

index 1862308d5d869270293c60baef8d0a3b42d45955..9de286c7231f14ceac93dd7635ae85e7b5993518 100644 (file)
@@ -1,3 +1,15 @@
+2006-02-24  Antti Koivisto  <koivisto@iki.fi>
+
+        Reviewed by Hyatt.
+
+        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=7440
+        Floats not positioned correctly
+
+        Test: fast/block/float/multiple-float-positioning.html
+
+        * rendering/RenderBlock.cpp: 
+        (WebCore::RenderBlock::positionNewFloats): Correct iteration of the float list
+
 2006-02-24  Graham Dennis  <Graham.Dennis@gmail.com>
 
         <http://bugzilla.opendarwin.org/show_bug.cgi?id=6933>
index 0a52812de0e9ba006900cc69631f4564a20d9c08..549d310e862723823ab4de7baad8d0fcc0abe891 100644 (file)
@@ -1829,17 +1829,15 @@ void RenderBlock::removeFloatingObject(RenderObject *o)
 void RenderBlock::positionNewFloats()
 {
     if(!m_floatingObjects) return;
-    FloatingObject *f = m_floatingObjects->getLast();
+    FloatingObject *f = m_floatingObjects->last();
     if(!f || f->startY != -1) return;
     FloatingObject *lastFloat;
     while(1)
     {
-        lastFloat = m_floatingObjects->prev();
-        if (!lastFloat || lastFloat->startY != -1) {
-            m_floatingObjects->next();
-            break;
-        }
-        f = lastFloat;
+        lastFloat = m_floatingObjects->getPrev();
+        if (!lastFloat || lastFloat->startY != -1)
+            break;        
+        f = m_floatingObjects->prev();
     }