[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:36:59 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 17b133f572273b1a95d02e4718dd058aaaaa7a43
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Apr 26 08:58:45 2004 +0000

    	Eliminate overhangingContents.  This concept was redundant with the overflowHeight mechanism that I
    	implemented some time ago, and in fact, it causes us to grovel through much more of the render tree
    	than we should when painting.  It turns out that none of the places that used this boolean needed
    	to any longer, and so the entire implementation can now be removed from the tree.
    
            Reviewed by mjs, darin
    
            * khtml/rendering/render_block.cpp:
            (khtml::RenderBlock::addChildToFlow):
            (khtml::RenderBlock::layoutBlock):
            (khtml::RenderBlock::paint):
            (khtml::RenderBlock::insertPositionedObject):
            * khtml/rendering/render_box.cpp:
            (RenderBox::calcHeight):
            * khtml/rendering/render_image.cpp:
            (RenderImage::setStyle):
            * khtml/rendering/render_inline.cpp:
            (RenderInline::addChildToFlow):
            * khtml/rendering/render_object.cpp:
            (RenderObject::RenderObject):
            (RenderObject::containingBlock):
            (RenderObject::information):
            (RenderObject::dump):
            (RenderObject::nodeAtPoint):
            * khtml/rendering/render_object.h:
            (khtml::RenderObject::minMaxKnown):
            * khtml/rendering/render_table.cpp:
            (RenderTable::layout):
            (RenderTable::paint):
            (RenderTableCell::paint):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6483 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 2c0a43a..00ea685 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,36 @@
+2004-04-25  David Hyatt  <hyatt at apple.com>
+
+	Eliminate overhangingContents.  This concept was redundant with the overflowHeight mechanism that I
+	implemented some time ago, and in fact, it causes us to grovel through much more of the render tree
+	than we should when painting.  It turns out that none of the places that used this boolean needed
+	to any longer, and so the entire implementation can now be removed from the tree.
+	
+        Reviewed by mjs, darin
+
+        * khtml/rendering/render_block.cpp:
+        (khtml::RenderBlock::addChildToFlow):
+        (khtml::RenderBlock::layoutBlock):
+        (khtml::RenderBlock::paint):
+        (khtml::RenderBlock::insertPositionedObject):
+        * khtml/rendering/render_box.cpp:
+        (RenderBox::calcHeight):
+        * khtml/rendering/render_image.cpp:
+        (RenderImage::setStyle):
+        * khtml/rendering/render_inline.cpp:
+        (RenderInline::addChildToFlow):
+        * khtml/rendering/render_object.cpp:
+        (RenderObject::RenderObject):
+        (RenderObject::containingBlock):
+        (RenderObject::information):
+        (RenderObject::dump):
+        (RenderObject::nodeAtPoint):
+        * khtml/rendering/render_object.h:
+        (khtml::RenderObject::minMaxKnown):
+        * khtml/rendering/render_table.cpp:
+        (RenderTable::layout):
+        (RenderTable::paint):
+        (RenderTableCell::paint):
+
 2004-04-23  David Hyatt  <hyatt at apple.com>
 
 	Fix for 3258403, implement support for min-height and max-height on normal flow elements.  With this patch the
diff --git a/WebCore/khtml/rendering/render_block.cpp b/WebCore/khtml/rendering/render_block.cpp
index 4ce40df..c0d2b22 100644
--- a/WebCore/khtml/rendering/render_block.cpp
+++ b/WebCore/khtml/rendering/render_block.cpp
@@ -131,9 +131,6 @@ void RenderBlock::addChildToFlow(RenderObject* newChild, RenderObject* beforeChi
     if (!newChild->isInline())
         newChild->setPos(newChild->xPos(), -500000);
 
-    if (!newChild->isText() && newChild->style()->position() != STATIC)
-        setOverhangingContents();
-
     // A block has to either have all of its children inline, or all of its children as blocks.
     // So, if our children are currently inline and a block child has to be inserted, we move all our
     // inline children into anonymous block boxes
@@ -397,7 +394,7 @@ void RenderBlock::layoutBlock(bool relayoutChildren)
 
     //     kdDebug( 6040 ) << floatingObjects << "," << oldWidth << ","
     //                     << m_width << ","<< needsLayout() << "," << isAnonymous() << ","
-    //                     << overhangingContents() << "," << isPositioned() << endl;
+    //                     << "," << isPositioned() << endl;
 
 #ifdef DEBUG_LAYOUT
     kdDebug( 6040 ) << renderName() << "(RenderBlock) " << this << " ::layout() width=" << m_width << ", needsLayout=" << needsLayout() << endl;
@@ -1196,8 +1193,7 @@ void RenderBlock::paint(PaintInfo& i, int _tx, int _ty)
     _ty += m_y;
 
     // check if we need to do anything at all...
-    if (!isRoot() && !isInlineFlow() && !overhangingContents() && !isRelPositioned() && !isPositioned() )
-    {
+    if (!isRoot() && !isInlineFlow() && !isRelPositioned() && !isPositioned()) {
         int h = m_overflowHeight;
         int yPos = _ty;
         if (m_floatingObjects && floatBottom() > h)
@@ -1351,8 +1347,6 @@ void RenderBlock::insertPositionedObject(RenderObject *o)
         }
     }
 
-    // Create the special object entry & append it to the list
-    setOverhangingContents();
     m_positionedObjects->append(o);
 }
 
diff --git a/WebCore/khtml/rendering/render_box.cpp b/WebCore/khtml/rendering/render_box.cpp
index 12663b9..74b7771 100644
--- a/WebCore/khtml/rendering/render_box.cpp
+++ b/WebCore/khtml/rendering/render_box.cpp
@@ -927,8 +927,6 @@ void RenderBox::calcHeight()
             int maxH = style()->maxHeight().value == UNDEFINED ? height : calcHeightUsing(style()->maxHeight());
             height = kMin(maxH, height);
             height = kMax(minH, height);
-            if (height < m_height && !overhangingContents() && style()->overflow() == OVISIBLE)
-                setOverhangingContents();
         }
         else
             // The only times we don't check min/max height are when a fixed length has 
diff --git a/WebCore/khtml/rendering/render_image.cpp b/WebCore/khtml/rendering/render_image.cpp
index b6617f5..1e81784 100644
--- a/WebCore/khtml/rendering/render_image.cpp
+++ b/WebCore/khtml/rendering/render_image.cpp
@@ -70,7 +70,6 @@ void RenderImage::setStyle(RenderStyle* _style)
 {
     RenderReplaced::setStyle(_style);
     
-    setOverhangingContents(style()->height().isPercent());
     setShouldPaintBackgroundOrBorder(true);
 }
 
diff --git a/WebCore/khtml/rendering/render_inline.cpp b/WebCore/khtml/rendering/render_inline.cpp
index 1b8e1ac..d160a54 100644
--- a/WebCore/khtml/rendering/render_inline.cpp
+++ b/WebCore/khtml/rendering/render_inline.cpp
@@ -76,10 +76,7 @@ void RenderInline::addChildToFlow(RenderObject* newChild, RenderObject* beforeCh
     // Make sure we don't append things after :after-generated content if we have it.
     if (!beforeChild && lastChild() && lastChild()->style()->styleType() == RenderStyle::AFTER)
         beforeChild = lastChild();
-    
-    if (!newChild->isText() && newChild->style()->position() != STATIC)
-        setOverhangingContents();
-    
+
     if (!newChild->isInline() && !newChild->isFloatingOrPositioned() )
     {
         // We are placing a block inside an inline. We have to perform a split of this
diff --git a/WebCore/khtml/rendering/render_object.cpp b/WebCore/khtml/rendering/render_object.cpp
index 9c89c1b..349daa6 100644
--- a/WebCore/khtml/rendering/render_object.cpp
+++ b/WebCore/khtml/rendering/render_object.cpp
@@ -138,7 +138,6 @@ m_minMaxKnown( false ),
 m_floating( false ),
 
 m_positioned( false ),
-m_overhangingContents( false ),
 m_relPositioned( false ),
 m_paintBackground( false ),
 
@@ -692,8 +691,7 @@ RenderBlock* RenderObject::containingBlock() const
     }
 
     if (!o || !o->isRenderBlock())
-        // This can happen because of setOverhangingContents in RenderImage's setStyle method.
-        return 0;
+        return 0; // Probably doesn't happen any more, but leave just in case. -dwh
     
     return static_cast<RenderBlock*>(o);
 }
@@ -1266,7 +1264,6 @@ QString RenderObject::information() const
     if (isAnonymous()) ts << "an ";
     if (isRelPositioned()) ts << "rp ";
     if (isPositioned()) ts << "ps ";
-    if (overhangingContents()) ts << "oc ";
     if (needsLayout()) ts << "nl ";
     if (m_recalcMinMax) ts << "rmm ";
     if (mouseInside()) ts << "mi ";
@@ -1316,7 +1313,6 @@ void RenderObject::dump(QTextStream *stream, QString ind) const
     if (shouldPaintBackgroundOrBorder()) { *stream << " paintBackground"; }
     if (needsLayout()) { *stream << " needsLayout"; }
     if (minMaxKnown()) { *stream << " minMaxKnown"; }
-    if (overhangingContents()) { *stream << " overhangingContents"; }
     *stream << endl;
 
     RenderObject *child = firstChild();
@@ -1472,40 +1468,6 @@ void RenderObject::setStyle(RenderStyle *style)
         repaint();
 }
 
-void RenderObject::setOverhangingContents(bool p)
-{
-    if (m_overhangingContents == p)
-	return;
-
-    RenderObject *cb = containingBlock();
-    if (p)
-    {
-        m_overhangingContents = true;
-        if (cb && cb != this)
-            cb->setOverhangingContents();
-    }
-    else
-    {
-        RenderObject *n;
-        bool c=false;
-
-        for( n = firstChild(); n != 0; n = n->nextSibling() )
-        {
-            if (n->isPositioned() || n->overhangingContents())
-                c=true;
-        }
-
-        if (c)
-            return;
-        else
-        {
-            m_overhangingContents = false;
-            if (cb && cb != this)
-                cb->setOverhangingContents(false);
-        }
-    }
-}
-
 QRect RenderObject::viewRect() const
 {
     return containingBlock()->viewRect();
@@ -1752,7 +1714,7 @@ bool RenderObject::nodeAtPoint(NodeInfo& info, int _x, int _y, int _tx, int _ty,
     if (hitTestAction != HitTestSelfOnly &&
         ((!isRenderBlock() ||
          !static_cast<RenderBlock*>(this)->isPointInScrollbar(_x, _y, _tx, _ty)) &&
-        (overhangingContents() || inOverflowRect || isInline() || isCanvas() ||
+        (inOverflowRect || isInline() || isCanvas() ||
          isTableRow() || isTableSection() || inside || mouseInside() ||
          (childrenInline() && firstChild() && firstChild()->isCompact())))) {
         if (hitTestAction == HitTestChildrenOnly)
diff --git a/WebCore/khtml/rendering/render_object.h b/WebCore/khtml/rendering/render_object.h
index 31d820f..0d10d0d 100644
--- a/WebCore/khtml/rendering/render_object.h
+++ b/WebCore/khtml/rendering/render_object.h
@@ -269,7 +269,6 @@ public:
     bool posChildNeedsLayout() const { return m_posChildNeedsLayout; }
     bool normalChildNeedsLayout() const { return m_normalChildNeedsLayout; }
     bool minMaxKnown() const{ return m_minMaxKnown; }
-    bool overhangingContents() const { return m_overhangingContents; }
     bool isSelectionBorder() const { return m_isSelectionBorder; }
     bool recalcMinMax() const { return m_recalcMinMax; }
 
@@ -297,8 +296,6 @@ public:
      */
     RenderObject *container() const;
 
-    void setOverhangingContents(bool p=true);
-
     virtual void markAllDescendantsWithFloatsForLayout(RenderObject* floatToRemove = 0);
     void markContainingBlocksForLayout();
     void setNeedsLayout(bool b, bool markParents = true);
@@ -772,7 +769,6 @@ private:
     bool m_floating                  : 1;
 
     bool m_positioned                : 1;
-    bool m_overhangingContents       : 1;
     bool m_relPositioned             : 1;
     bool m_paintBackground           : 1; // if the box has something to paint in the
                                           // background painting phase (background, border, etc)
diff --git a/WebCore/khtml/rendering/render_table.cpp b/WebCore/khtml/rendering/render_table.cpp
index 43b2c87..0b7a881 100644
--- a/WebCore/khtml/rendering/render_table.cpp
+++ b/WebCore/khtml/rendering/render_table.cpp
@@ -315,13 +315,9 @@ void RenderTable::layout()
             Length ch = c->style()->height();
             if (ch.isFixed())
                 th = h.width(ch.value);
-            else {
+            else
                 // we need to substract out the margins of this block. -dwh
                 th = h.width(viewRect().height() - c->marginBottom() - c->marginTop());
-                // not really, but this way the view height change
-                // gets propagated correctly
-                setOverhangingContents();
-            }
         }
     }
 
@@ -409,8 +405,7 @@ void RenderTable::paint(PaintInfo& i, int _tx, int _ty)
 #ifdef TABLE_PRINT
     kdDebug( 6040 ) << "RenderTable::paint() w/h = (" << width() << "/" << height() << ")" << endl;
 #endif
-    if (!overhangingContents() && !isRelPositioned() && !isPositioned())
-    {
+    if (!isRelPositioned() && !isPositioned()) {
         int os = 2*maximalOutlineSize(paintAction);
         if ((_ty >= i.r.y() + i.r.height() + os) || (_ty + height() <= i.r.y() - os)) return;
         if ((_tx >= i.r.x() + i.r.width() + os) || (_tx + width() <= i.r.x() - os)) return;
@@ -2076,8 +2071,8 @@ void RenderTableCell::paint(PaintInfo& i, int _tx, int _ty)
 
     // check if we need to do anything at all...
     int os = 2*maximalOutlineSize(i.phase);
-    if (!overhangingContents() && ((_ty >= i.r.y() + i.r.height() + os)
-                                   || (_ty + _topExtra + m_height + _bottomExtra <= i.r.y() - os))) return;
+    if ((_ty >= i.r.y() + i.r.height() + os) || (_ty + _topExtra + m_height + _bottomExtra <= i.r.y() - os))
+        return;
     
     if (i.phase == PaintActionCollapsedTableBorders && style()->visibility() == VISIBLE) {
         int w = width();

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list