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

List:       kde-commits
Subject:    branches/KDE/3.5/kdelibs/khtml/rendering
From:       Charles Samuels <charles () kde ! org>
Date:       2006-09-26 6:24:47
Message-ID: 1159251887.146473.26217.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 588483 by charles:

Fix 123915: Page format display is 'overlaid'
BUG:123915

When a compact was compacted with a block that has a height less than it,
only the height of its neighboring block was considered when calculating
the height of that line.

Coming: updated baseline



 M  +14 -0     render_block.cpp  
 M  +1 -0      render_block.h  


--- branches/KDE/3.5/kdelibs/khtml/rendering/render_block.cpp #588482:588483
@@ -916,6 +916,18 @@
     return 0;
 }
 
+void RenderBlock::adjustSizeForCompactIfNeeded(RenderObject* child, CompactInfo& \
compactInfo) +{
+    // if the compact is bigger than the block it was run into
+    // then "this" block should take the height of the compact
+    if (compactInfo.matches(child)) {
+        // We have a compact child to squeeze in.
+        RenderObject* compactChild = compactInfo.compact();
+        if (compactChild->height() > child->height())
+            m_height += compactChild->height() - child->height();
+    } 
+}
+
 void RenderBlock::insertCompactIfNeeded(RenderObject* child, CompactInfo& \
compactInfo)  {
     if (compactInfo.matches(child)) {
@@ -949,6 +961,7 @@
         child->style()->setLineHeight( newLineHeight );
         child->setNeedsLayout( true, false );
         child->layout();
+
         compactChild->setPos(compactXPos, compactYPos); // Set the x position.
         compactInfo.clear();
     }
@@ -1417,6 +1430,7 @@
         // Now place the child in the correct horizontal position
         determineHorizontalPosition(child);
 
+        adjustSizeForCompactIfNeeded(child, compactInfo);
         // Update our height now that the child has been placed in the correct \
position.  m_height += child->height();
 
--- branches/KDE/3.5/kdelibs/khtml/rendering/render_block.h #588482:588483
@@ -330,6 +330,7 @@
     RenderObject* handleRunInChild(RenderObject* child, bool& handled);
     void collapseMargins(RenderObject* child, MarginInfo& marginInfo, int \
                yPosEstimate);
     void clearFloatsIfNeeded(RenderObject* child, MarginInfo& marginInfo, int \
oldTopPosMargin, int oldTopNegMargin); +    void \
                adjustSizeForCompactIfNeeded(RenderObject* child, CompactInfo& \
                compactInfo);
     void insertCompactIfNeeded(RenderObject* child, CompactInfo& compactInfo);
     int estimateVerticalPosition(RenderObject* child, const MarginInfo& info);
     void determineHorizontalPosition(RenderObject* child);


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

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