[prev in list] [next in list] [prev in thread] [next in thread] 

List:       konq-bugs
Subject:    [Bug 68068] [test case] clear:both not handled correctly (regression)
From:       Dirk Mueller <mueller () kde ! org>
Date:       2004-01-25 21:12:14
Message-ID: 20040125211214.2841.qmail () ktown ! kde ! org
[Download RAW message or body]

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
      
http://bugs.kde.org/show_bug.cgi?id=68068      
mueller@kde.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From mueller@kde.org  2004-01-25 22:12 -------
Subject: kdelibs/khtml

CVS commit by mueller: 

* rendering/render_block.cpp (positionNewFloats): when somebody says
clear: both;, he usually means it (#68068).
CCMAIL: 68068-done@bugs.kde.org


  M +3 -0      ChangeLog   1.185
  M +7 -5      rendering/render_block.cpp   1.23


--- kdelibs/khtml/ChangeLog  #1.184:1.185
@@ -1,4 +1,7 @@
 2004-01-25  Dirk Mueller  <mueller@kde.org>
 
+        * rendering/render_block.cpp (positionNewFloats): when somebody says
+        clear: both;, he usually means it (#68068).
+
         * html/html_objectimpl.cpp (renderAlternative): give the alternative rendering
         some time to avoid ugly deletion races.

--- kdelibs/khtml/rendering/render_block.cpp  #1.22:1.23
@@ -1361,8 +1361,12 @@ void RenderBlock::positionNewFloats()
         if (ro - lo < fwidth)
             fwidth = ro - lo; // Never look for more than what will be available.
-        if (o->style()->floating() == FLEFT)
-        {
+
             if ( o->style()->clear() & CLEFT )
                 y = kMax( leftBottom(), y );
+        if ( o->style()->clear() & CRIGHT )
+            y = kMax( rightBottom(), y );
+
+        if (o->style()->floating() == FLEFT)
+        {
             int heightRemainingLeft = 1;
             int heightRemainingRight = 1;
@@ -1380,6 +1384,4 @@ void RenderBlock::positionNewFloats()
         else
         {
-            if ( o->style()->clear() & CRIGHT )
-                y = kMax( rightBottom(), y );
             int heightRemainingLeft = 1;
             int heightRemainingRight = 1;
@@ -1786,5 +1788,5 @@ void RenderBlock::markAllDescendantsWith
 bool RenderBlock::checkClear(RenderObject *child)
 {
-    //kdDebug( 6040 ) << "checkClear oldheight=" << m_height << endl;
+    //kdDebug( 6040 ) << "checkClear on child " << child << " oldheight=" << m_height << endl;
     int bottom = 0;
     switch(child->style()->clear())
_______________________________________________
Konq-bugs mailing list
Konq-bugs@mail.kde.org
https://mail.kde.org/mailman/listinfo/konq-bugs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic