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

List:       kde-commits
Subject:    branches/KDE/3.5/kdelibs/khtml/rendering
From:       Germain Garand <germain () ebooksfrance ! com>
Date:       2006-10-01 15:29:25
Message-ID: 1159716565.608556.11220.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 591050 by ggarand:

some massaging of scrolling overflows calculations to avoid 
regressing on #133310 after the overflowHeight semantic change, 
also fixing it further to only add padding to normal content 
height, not to float bottom's.

CCBUG: 133310


 M  +7 -9      render_block.cpp  
 M  +4 -4      render_flow.cpp  
 M  +4 -4      render_layer.cpp  


--- branches/KDE/3.5/kdelibs/khtml/rendering/render_block.cpp #591049:591050
@@ -711,20 +711,18 @@
     int toAdd = borderBottom() + paddingBottom();
     if (m_layer && style()->scrollsOverflow() && style()->height().isVariable())
         toAdd += m_layer->horizontalScrollbarHeight();
-    if ( hasOverhangingFloats() && (isFloatingOrPositioned() || flowAroundFloats()) \
) +    if ( hasOverhangingFloats() && !style()->scrollsOverflow() && \
(isFloatingOrPositioned() || flowAroundFloats()) )  m_overflowHeight = m_height = \
floatBottom() + toAdd;  
     int oldHeight = m_height;
     calcHeight();
     if (oldHeight != m_height) {
-        // If the block got expanded in size, then increase our overflowheight to \
                match.
-        if (m_overflowHeight > m_height) {
-            if (style()->scrollsOverflow())
-                // overflow-height only includes padding-bottom when it scrolls
-                m_overflowHeight -= borderBottom();
-            else
-                m_overflowHeight -= (borderBottom()+paddingBottom());
+        m_overflowHeight -= toAdd;
+        if (m_layer && style()->scrollsOverflow()) {
+            // overflow-height only includes padding-bottom when it scrolls
+            m_overflowHeight += paddingBottom();
         }
+        // If the block got expanded in size, then increase our overflowheight to \
match.  if (m_overflowHeight < m_height)
             m_overflowHeight = m_height;
     }
@@ -1352,7 +1350,7 @@
 
     int top = borderTop() + paddingTop();
     int bottom = borderBottom() + paddingBottom();
-    if (m_layer && style()->scrollsOverflow())
+    if (m_layer && style()->scrollsOverflow() && style()->height().isVariable())
         bottom += m_layer->horizontalScrollbarHeight();
 
     m_height = m_overflowHeight = top;
--- branches/KDE/3.5/kdelibs/khtml/rendering/render_flow.cpp #591049:591050
@@ -320,7 +320,7 @@
     // a tiny rel div buried somewhere deep in our child tree.  In this case we have \
to get to  // the abs div.
     for (RenderObject *c = firstChild(); c; c = c->nextSibling()) {
-        if (!c->isFloatingOrPositioned() && !c->isText()) {
+        if (!c->isFloatingOrPositioned() && !c->isText() && !c->isInlineFlow()) {
             int lp = c->yPos() + c->lowestPosition(false);
             bottom = kMax(bottom, lp);
         }
@@ -345,7 +345,7 @@
     // a tiny rel div buried somewhere deep in our child tree.  In this case we have \
to get to  // the abs div.
     for (RenderObject *c = firstChild(); c; c = c->nextSibling()) {
-        if (!c->isFloatingOrPositioned() && !c->isText()) {
+        if (!c->isFloatingOrPositioned() && !c->isText() && !c->isInlineFlow()) {
             int rp = c->xPos() + c->rightmostPosition(false);
             right = kMax(right, rp);
         }
@@ -370,7 +370,7 @@
     // a tiny rel div buried somewhere deep in our child tree.  In this case we have \
to get to  // the abs div.
     for (RenderObject *c = firstChild(); c; c = c->nextSibling()) {
-        if (!c->isFloatingOrPositioned() && !c->isText()) {
+        if (!c->isFloatingOrPositioned() && !c->isText() && !c->isInlineFlow()) {
             int lp = c->xPos() + c->leftmostPosition(false);
             left = kMin(left, lp);
         }
@@ -395,7 +395,7 @@
     // a tiny rel div buried somewhere deep in our child tree.  In this case we have \
to get to  // the abs div.
     for (RenderObject *c = firstChild(); c; c = c->nextSibling()) {
-        if (!c->isFloatingOrPositioned() && !c->isText()) {
+        if (!c->isFloatingOrPositioned() && !c->isText() && !c->isInlineFlow()) {
             int hp = c->yPos() + c->highestPosition(false);
             top = kMin(top, hp);
         }
--- branches/KDE/3.5/kdelibs/khtml/rendering/render_layer.cpp #591049:591050
@@ -720,12 +720,12 @@
 
 void RenderLayer::checkScrollbarsAfterLayout()
 {
-    int rightPos = m_object->rightmostPosition(true, false);
-    int bottomPos = m_object->lowestPosition(true, false);
+    int rightPos = m_object->rightmostPosition(true);
+    int bottomPos = m_object->lowestPosition(true);
     
 /*  TODO
-    m_scrollLeft = m_object->leftmostPosition(true, false);
-    m_scrollTop = m_object->highestPosition(true, false);
+    m_scrollLeft = m_object->leftmostPosition(true);
+    m_scrollTop = m_object->highestPosition(true);
 */
 
     int clientWidth = m_object->clientWidth();


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

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