[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

hyatt hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:26:23 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit f0f9fbffc9f0ae826b8d3d2030357c2e6af707ed
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Feb 12 00:47:53 2004 +0000

    	Fix for 3556702, margin collapsing gets disabled when images spill out of the containing block.
    
            Reviewed by kocienda
    
            * khtml/rendering/render_block.cpp:
            (khtml::RenderBlock::layoutBlockChildren):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6076 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 178a6c7..7e94546 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,5 +1,14 @@
 2004-02-11  David Hyatt  <hyatt at apple.com>
 
+	Fix for 3556702, margin collapsing gets disabled when images spill out of the containing block.
+	
+        Reviewed by kocienda
+
+        * khtml/rendering/render_block.cpp:
+        (khtml::RenderBlock::layoutBlockChildren):
+
+2004-02-11  David Hyatt  <hyatt at apple.com>
+
 	Fix the .rows and .cells arrays on tables by merging with the KHTML trunk.  TH was being included
 	as a row instead of as a cell.
 	
diff --git a/WebCore/khtml/rendering/render_block.cpp b/WebCore/khtml/rendering/render_block.cpp
index e884970..17d9266 100644
--- a/WebCore/khtml/rendering/render_block.cpp
+++ b/WebCore/khtml/rendering/render_block.cpp
@@ -524,9 +524,10 @@ void RenderBlock::layoutBlockChildren( bool relayoutChildren )
     int minHeight = m_height + toAdd;
     m_overflowHeight = m_height;
 
-    RenderObject *child = firstChild();
-    RenderBlock *prevFlow = 0;
-
+    RenderObject* child = firstChild();
+    RenderBlock* prevFlow = 0;
+    RenderObject* prevBlock = 0;
+    
     // A compact child that needs to be collapsed into the margin of the following block.
     RenderObject* compactChild = 0;
     // The block with the open margin that the compact child is going to place itself within.
@@ -594,6 +595,8 @@ void RenderBlock::layoutBlockChildren( bool relayoutChildren )
 
     while( child != 0 )
     {
+        shouldCollapseChild = true; // Reset our shouldCollapseChild variable.
+        
         int oldTopPosMargin = m_maxTopPosMargin;
         int oldTopNegMargin = m_maxTopNegMargin;
 
@@ -764,13 +767,14 @@ void RenderBlock::layoutBlockChildren( bool relayoutChildren )
         // be correct.  Only if we're wrong (when we compute the real y position)
         // will we have to relayout.
         int yPosEstimate = m_height;
-        if (prevFlow)
-        {
-            yPosEstimate += QMAX(prevFlow->collapsedMarginBottom(), child->marginTop());
-            if (prevFlow->yPos()+prevFlow->floatBottom() > yPosEstimate)
-                child->setChildNeedsLayout(true);
-            else
-                prevFlow=0;
+        if (prevBlock) {
+            yPosEstimate += kMax(prevBlock->collapsedMarginBottom(), child->marginTop());
+            if (prevFlow) {
+                if (prevFlow->yPos() + prevFlow->floatBottom() > yPosEstimate)
+                    child->setChildNeedsLayout(true);
+                else
+                    prevFlow = 0;
+            }
         }
         else if (!canCollapseTopWithChildren || !topMarginContributor)
             yPosEstimate += child->marginTop();
@@ -986,8 +990,9 @@ void RenderBlock::layoutBlockChildren( bool relayoutChildren )
         if (m_height + overflowDelta > m_overflowHeight)
             m_overflowHeight = m_height + overflowDelta;
 
-        if (child->isRenderBlock())
-            prevFlow = static_cast<RenderBlock*>(child); 
+        prevBlock = child;
+        if (child->isRenderBlock() && !child->avoidsFloats())
+            prevFlow = static_cast<RenderBlock*>(child);
 
         if (child->hasOverhangingFloats() && !child->style()->hidesOverflow()) {
             // need to add the child's floats to our floating objects list, but not in the case where

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list