[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 07:04:24 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit a70560aa6b024f80e01e75eb8cdd6aba86b19dbc
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Nov 20 01:53:20 2002 +0000

    	Fix for 3049663.  Table cells don't grow to accommodate block
    	overflow.
    
            * khtml/rendering/bidi.cpp:
            (RenderFlow::layoutInlineChildren):
            * khtml/rendering/render_flow.cpp:
            (RenderFlow::RenderFlow):
            (RenderFlow::layout):
            (RenderFlow::layoutBlockChildren):
            * khtml/rendering/render_flow.h:
            * khtml/rendering/render_object.h:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2770 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index 653c899..eb48bee 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,17 @@
+2002-11-19  David Hyatt  <hyatt at apple.com>
+
+	Fix for 3049663.  Table cells don't grow to accommodate block
+	overflow.
+	
+        * khtml/rendering/bidi.cpp:
+        (RenderFlow::layoutInlineChildren):
+        * khtml/rendering/render_flow.cpp:
+        (RenderFlow::RenderFlow):
+        (RenderFlow::layout):
+        (RenderFlow::layoutBlockChildren):
+        * khtml/rendering/render_flow.h:
+        * khtml/rendering/render_object.h:
+
 2002-11-19  Darin Adler  <darin at apple.com>
 
 	- next step towards atomic identifiers; Identifier is no longer derived from UString
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 653c899..eb48bee 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,17 @@
+2002-11-19  David Hyatt  <hyatt at apple.com>
+
+	Fix for 3049663.  Table cells don't grow to accommodate block
+	overflow.
+	
+        * khtml/rendering/bidi.cpp:
+        (RenderFlow::layoutInlineChildren):
+        * khtml/rendering/render_flow.cpp:
+        (RenderFlow::RenderFlow):
+        (RenderFlow::layout):
+        (RenderFlow::layoutBlockChildren):
+        * khtml/rendering/render_flow.h:
+        * khtml/rendering/render_object.h:
+
 2002-11-19  Darin Adler  <darin at apple.com>
 
 	- next step towards atomic identifiers; Identifier is no longer derived from UString
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 653c899..eb48bee 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,17 @@
+2002-11-19  David Hyatt  <hyatt at apple.com>
+
+	Fix for 3049663.  Table cells don't grow to accommodate block
+	overflow.
+	
+        * khtml/rendering/bidi.cpp:
+        (RenderFlow::layoutInlineChildren):
+        * khtml/rendering/render_flow.cpp:
+        (RenderFlow::RenderFlow):
+        (RenderFlow::layout):
+        (RenderFlow::layoutBlockChildren):
+        * khtml/rendering/render_flow.h:
+        * khtml/rendering/render_object.h:
+
 2002-11-19  Darin Adler  <darin at apple.com>
 
 	- next step towards atomic identifiers; Identifier is no longer derived from UString
diff --git a/WebCore/khtml/rendering/bidi.cpp b/WebCore/khtml/rendering/bidi.cpp
index 26a7965..f855c4a 100644
--- a/WebCore/khtml/rendering/bidi.cpp
+++ b/WebCore/khtml/rendering/bidi.cpp
@@ -990,6 +990,8 @@ static void deleteMidpoints(RenderArena* arena, QPtrList<BidiIterator>* midpoint
 
 void RenderFlow::layoutInlineChildren()
 {
+    m_overflowHeight = 0;
+    
     invalidateVerticalPositions();
 #ifdef DEBUG_LAYOUT
     QTime qt;
@@ -1079,12 +1081,16 @@ void RenderFlow::layoutInlineChildren()
     }
     
     deleteMidpoints(renderArena(), smidpoints);
-    
+
+    // Now add in the bottom border/padding.
     m_height += toAdd;
 
     // in case we have a float on the last line, it might not be positioned up to now.
     positionNewFloats();
 
+    // Always make sure this is at least our height.
+    m_overflowHeight = m_height;
+    
 #if BIDI_DEBUG > 1
     kdDebug(6041) << " ------- bidi end " << this << " -------" << endl;
 #endif
diff --git a/WebCore/khtml/rendering/render_flow.cpp b/WebCore/khtml/rendering/render_flow.cpp
index a4620cc..2df3866 100644
--- a/WebCore/khtml/rendering/render_flow.cpp
+++ b/WebCore/khtml/rendering/render_flow.cpp
@@ -57,6 +57,7 @@ RenderFlow::RenderFlow(DOM::NodeImpl* node)
     
     m_maxTopPosMargin = m_maxTopNegMargin = m_maxBottomPosMargin = m_maxBottomNegMargin = 0;
     m_topMarginQuirk = m_bottomMarginQuirk = false;
+    m_overflowHeight = 0;
 }
 
 void RenderFlow::setStyle(RenderStyle *_style)
@@ -256,6 +257,7 @@ void RenderFlow::layout()
     clearFloats();
 
     m_height = 0;
+    m_overflowHeight = 0;
     m_clearStatus = CNONE;
 
     // We use four values, maxTopPos, maxPosNeg, maxBottomPos, and maxBottomNeg, to track
@@ -303,14 +305,34 @@ void RenderFlow::layout()
 
     int oldHeight = m_height;
     calcHeight();
-    if (oldHeight != m_height)
+    if (oldHeight != m_height) {
         relayoutChildren = true;
-
-    if ( isTableCell() && lastChild() && lastChild()->hasOverhangingFloats() ) {
-        m_height = lastChild()->yPos() + static_cast<RenderFlow*>(lastChild())->floatBottom();
-        m_height += borderBottom() + paddingBottom();
+        
+        // If the block got expanded in size, then increase our overflowheight to match.
+        if (m_overflowHeight > m_height)
+            m_overflowHeight -= (borderBottom()+paddingBottom());
+        if (m_overflowHeight < m_height)
+            m_overflowHeight = m_height;
+    }
+    
+    // overflow:hidden will just clip, so we don't have overflow.
+    if (style()->overflow()==OHIDDEN)
+        m_overflowHeight = m_height;
+    
+    if (isTableCell()) {
+        // Table cells need to grow to accommodate both overhanging floats and
+        // blocks that have overflowed content.
+        // Check for an overhanging float first.
+        if (lastChild() && lastChild()->hasOverhangingFloats() ) {
+            m_height = lastChild()->yPos() + static_cast<RenderFlow*>(lastChild())->floatBottom();
+            m_height += borderBottom() + paddingBottom();
+        }
+        
+        if (m_overflowHeight > m_height)
+            m_height = m_overflowHeight + borderBottom() + paddingBottom();
     }
-    if( hasOverhangingFloats() && (isFloating() || isTableCell()) ) {
+    
+    if( hasOverhangingFloats() && (isFloating() || isTableCell())) {
         m_height = floatBottom();
         m_height += borderBottom() + paddingBottom();
     }
@@ -381,6 +403,7 @@ void RenderFlow::layoutBlockChildren( bool relayoutChildren )
     }
 
     int minHeight = m_height + toAdd;
+    m_overflowHeight = m_height;
     
     if( style()->direction() == RTL ) {
         xPos = marginLeft() + m_width - paddingRight() - borderRight();
@@ -652,7 +675,12 @@ void RenderFlow::layoutBlockChildren( bool relayoutChildren )
         child->setPos(chPos, child->yPos());
 
         m_height += child->height();
-
+        if (m_overflowHeight < m_height) {
+            int overflowDelta = child->overflowHeight() - child->height();
+            if (m_height + overflowDelta > m_overflowHeight)
+                m_overflowHeight = m_height + overflowDelta;
+        }
+        
         if (child->isFlow())
             prevFlow = static_cast<RenderFlow*>(child);
 
@@ -680,14 +708,18 @@ void RenderFlow::layoutBlockChildren( bool relayoutChildren )
             && (strictMode || !quirkContainer || !bottomChildQuirk)
         ))
         m_height += prevPosMargin - prevNegMargin;
-        
-    m_height += toAdd;
     
+    m_height += toAdd;
+     
     // Negative margins can cause our height to shrink below our minimal height (border/padding).
     // If this happens, ensure that the computed height is increased to the minimal height.
     if (m_height < minHeight)
         m_height = minHeight;
     
+    // Always make sure our overflowheight is at least our height.
+    if (m_overflowHeight < m_height)
+        m_overflowHeight = m_height;
+   
     if (canCollapseWithChildren && !topMarginContributor) {
         // Update our max pos/neg bottom margins, since we collapsed our bottom margins
         // with our children.
diff --git a/WebCore/khtml/rendering/render_flow.h b/WebCore/khtml/rendering/render_flow.h
index 8788fc2..7fc88b0 100644
--- a/WebCore/khtml/rendering/render_flow.h
+++ b/WebCore/khtml/rendering/render_flow.h
@@ -136,6 +136,11 @@ public:
     void bidiReorderLine(const BidiIterator &start, const BidiIterator &end);
     BidiIterator findNextLineBreak(BidiIterator &start, QPtrList<BidiIterator>& midpoints);
 
+    // The height of a block when you include overflow spillage out of the bottom
+    // of the block (e.g., a <div style="height:25px"> that has a 100px tall image inside
+    // it would have an overflow height of borderTop() + paddingTop() + 100px.
+    virtual int overflowHeight() const { return m_overflowHeight; }
+    
     virtual bool isSelfCollapsingBlock() const { return m_height == 0; }
     virtual bool isTopMarginQuirk() const { return m_topMarginQuirk; }
     virtual bool isBottomMarginQuirk() const { return m_bottomMarginQuirk; }
@@ -209,6 +214,10 @@ private:
     short m_maxBottomNegMargin;
     bool m_topMarginQuirk;
     bool m_bottomMarginQuirk;
+    
+    // How much content overflows out of our block vertically (all we support
+    // for now is spillage out of the bottom, which is the common case).
+    int m_overflowHeight;
 };
 
     
diff --git a/WebCore/khtml/rendering/render_object.h b/WebCore/khtml/rendering/render_object.h
index 6fd8b4e..49377cc 100644
--- a/WebCore/khtml/rendering/render_object.h
+++ b/WebCore/khtml/rendering/render_object.h
@@ -372,6 +372,11 @@ public:
     virtual short width() const { return 0; }
     virtual int height() const { return 0; }
 
+    // The height of a block when you include overflow spillage out of the bottom
+    // of the block (e.g., a <div style="height:25px"> that has a 100px tall image inside
+    // it would have an overflow height of borderTop() + paddingTop() + 100px.
+    virtual int overflowHeight() const { return height(); }
+    
     // IE extensions. Used to calculate offsetWidth/Height.  Overridden by inlines (render_flow) 
     // to return the remaining width on a given line (and the height of a single line). -dwh
     virtual short offsetWidth() const { return width(); }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list