[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:12:03 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit ebd55a7ca9f22d908a6f46326d94506e7dea335d
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sun Nov 16 06:22:09 2003 +0000

    	Fix for 3485260, regression on Uniview site from incremental repainting.  When appending/inserting child
    	nodes into the render tree, we need to always mark them as needing layout themselves (and not just as
    	having children needing layout).  This ensures that the incremental repainting code will know to repaint the
    	enclosing container (even though that container's size may not change).
    
    	Fix for 3411960, block-level replaced elements should avoid floats.
    
    	Fix for 3463234, floats should not intrude into overflow blocks (even when siblings happen to get in
    	between the float and the overflow block).
    
    	Fix for 3485576, the containing block for text runs is incorrect.
    
    	Fix for 3485577, text runs should not trigger layout when style is re-resolved.
    
            Reviewed by darin
    
            * khtml/rendering/render_container.cpp:
            (RenderContainer::appendChildNode):
            (RenderContainer::insertChildNode):
            * khtml/rendering/render_box.cpp
    	* khtml/rendering/render_object.cpp
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5507 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 14174e2..6fdb2df 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,5 +1,29 @@
 2003-11-14  David Hyatt  <hyatt at apple.com>
 
+	Fix for 3485260, regression on Uniview site from incremental repainting.  When appending/inserting child
+	nodes into the render tree, we need to always mark them as needing layout themselves (and not just as
+	having children needing layout).  This ensures that the incremental repainting code will know to repaint the
+	enclosing container (even though that container's size may not change).
+
+	Fix for 3411960, block-level replaced elements should avoid floats.
+
+	Fix for 3463234, floats should not intrude into overflow blocks (even when siblings happen to get in
+	between the float and the overflow block).
+
+	Fix for 3485576, the containing block for text runs is incorrect.
+
+	Fix for 3485577, text runs should not trigger layout when style is re-resolved.
+	
+        Reviewed by darin
+
+        * khtml/rendering/render_container.cpp:
+        (RenderContainer::appendChildNode):
+        (RenderContainer::insertChildNode):
+        * khtml/rendering/render_box.cpp
+	* khtml/rendering/render_object.cpp
+	
+2003-11-14  David Hyatt  <hyatt at apple.com>
+
 	Fix for 3473707, 100% height positioned divs are too tall.  The padding box wasn't being used like it was
 	supposed to be when calcing percentage heights.
 	
diff --git a/WebCore/khtml/rendering/render_block.cpp b/WebCore/khtml/rendering/render_block.cpp
index ac39683..65723c5 100644
--- a/WebCore/khtml/rendering/render_block.cpp
+++ b/WebCore/khtml/rendering/render_block.cpp
@@ -946,8 +946,8 @@ void RenderBlock::layoutBlockChildren( bool relayoutChildren )
             chPos += child->marginLeft();
             
             // html blocks flow around floats
-            if (child->style()->hidesOverflow() || child->isFlexibleBox() ||
-                 (( style()->htmlHacks() || child->isTable() ) && child->style()->flowAroundFloats()))
+            if (child->style()->hidesOverflow() || child->isFlexibleBox() || 
+                child->isTable() || child->isReplaced() || child->style()->flowAroundFloats())
             {
                 int leftOff = leftOffset(m_height);
                 if (leftOff != xPos) {
@@ -965,9 +965,9 @@ void RenderBlock::layoutBlockChildren( bool relayoutChildren )
             }
         } else {
             chPos -= child->width() + child->marginRight();
-            if (child->style()->hidesOverflow() || child->isFlexibleBox() ||
-                ((style()->htmlHacks() || child->isTable()) && child->style()->flowAroundFloats()))
-                chPos -= leftOffset(m_height);
+            if (child->style()->hidesOverflow() || child->isFlexibleBox() || 
+                child->isTable() || child->isReplaced() || child->style()->flowAroundFloats())
+                chPos -= (xPos - rightOffset(m_height));
         }
 
         child->setPos(chPos, child->yPos());
@@ -1734,7 +1734,8 @@ RenderBlock::clearFloats()
     if (m_floatingObjects)
         m_floatingObjects->clear();
 
-    if (isFloating() || isPositioned()) return;
+    if (isFloating() || isPositioned() || style()->hidesOverflow() || style()->flowAroundFloats() || isFlexibleBox()) 
+        return;
     
     RenderObject *prev = previousSibling();
 
diff --git a/WebCore/khtml/rendering/render_box.cpp b/WebCore/khtml/rendering/render_box.cpp
index 7a01cd7..11cad74 100644
--- a/WebCore/khtml/rendering/render_box.cpp
+++ b/WebCore/khtml/rendering/render_box.cpp
@@ -610,15 +610,15 @@ void RenderBox::computeAbsoluteRepaintRect(QRect& r, bool f)
         // <body> may not have a layer, since it might be applying its overflow value to the
         // scrollbars.
         if (o->style()->hidesOverflow() && o->layer()) {
-            int ow = o->style() ? o->style()->outlineSize() : 0;
-            QRect boxRect(-ow, -ow, o->width()+ow*2, o->height()+ow*2);
+            // o->height() is inaccurate if we're in the middle of a layout of |o|, so use the
+            // layer's size instead.  Even if the layer's size is wrong, the layer itself will repaint
+            // anyway if its size does change.
+            QRect boxRect(0, 0, o->layer()->width(), o->layer()->height());
             o->layer()->subtractScrollOffset(x,y); // For overflow:auto/scroll/hidden.
             QRect repaintRect(x, y, r.width(), r.height());
-            if (!repaintRect.intersects(boxRect)) {
-                r = QRect();
-                return;
-            }
             r = repaintRect.intersect(boxRect);
+            if (r.isEmpty())
+                return;
         }
         else {
             r.setX(x);
diff --git a/WebCore/khtml/rendering/render_object.cpp b/WebCore/khtml/rendering/render_object.cpp
index 2f67c88..b7b66ac 100644
--- a/WebCore/khtml/rendering/render_object.cpp
+++ b/WebCore/khtml/rendering/render_object.cpp
@@ -483,7 +483,7 @@ void RenderObject::markContainingBlocksForLayout()
     RenderObject *last = this;
 
     while (o) {
-        if (last->style()->position() == FIXED || last->style()->position() == ABSOLUTE) {
+        if (!last->isText() && (last->style()->position() == FIXED || last->style()->position() == ABSOLUTE)) {
 #ifdef INCREMENTAL_REPAINTING
             if (o->m_posChildNeedsLayout)
                 return;
@@ -520,13 +520,13 @@ RenderBlock* RenderObject::containingBlock() const
         return static_cast<const RenderTableCell *>(this)->table();
     if (isCanvas())
         return (RenderBlock*)this;
-    
+
     RenderObject *o = parent();
-    if (m_style->position() == FIXED) {
+    if (!isText() && m_style->position() == FIXED) {
         while ( o && !o->isCanvas() )
             o = o->parent();
     }
-    else if (m_style->position() == ABSOLUTE) {
+    else if (!isText() && m_style->position() == ABSOLUTE) {
         while (o && (o->style()->position() == STATIC || (o->isInline() && !o->isReplaced()))
                && !o->isRoot() && !o->isCanvas()) {
             // For relpositioned inlines, we return the nearest enclosing block.  We don't try
@@ -1032,7 +1032,7 @@ bool RenderObject::checkForRepaintDuringLayout() const
 
 void RenderObject::repaintObjectsBeforeLayout()
 {
-    if (!needsLayout())
+    if (!needsLayout() || isText())
         return;
     
     // FIXME: For now we just always repaint blocks with inline children, regardless of whether
@@ -1296,13 +1296,14 @@ void RenderObject::setStyle(RenderStyle *style)
     
     if (affectsParentBlock)
         handleDynamicFloatPositionChange();
-            
-    if ( d >= RenderStyle::Position && m_parent ) {
-        //qDebug("triggering relayout");
-        setNeedsLayoutAndMinMaxRecalc();
-    } else if ( m_parent && !isText() && d == RenderStyle::Visible ) {
-        //qDebug("triggering repaint");
-    	repaint();
+    
+    if (!isText()) {
+        // No need to ever schedule relayouts/repaints from a style change of a text run, since
+        // we already did this for the parent of the text run.
+        if (d >= RenderStyle::Position && m_parent)
+            setNeedsLayoutAndMinMaxRecalc();
+        else if (m_parent && d == RenderStyle::Visible)
+            repaint();
     }
 }
 
@@ -1436,7 +1437,7 @@ RenderObject *RenderObject::container() const
     // calcAbsoluteVertical have to use container().
     EPosition pos = m_style->position();
     RenderObject *o = 0;
-    if( pos == FIXED ) {
+    if (!isText() && pos == FIXED) {
         // container() can be called on an object that is not in the
         // tree yet.  We don't call canvas() since it will assert if it
         // can't get back to the canvas.  Instead we just walk as high up
@@ -1444,9 +1445,9 @@ RenderObject *RenderObject::container() const
         // aren't we'll get the root of our little subtree (most likely
         // we'll just return 0).
         o = parent();
-        while ( o && o->parent() ) o = o->parent();
+        while (o && o->parent()) o = o->parent();
     }
-    else if ( pos == ABSOLUTE ) {
+    else if (!isText() && pos == ABSOLUTE) {
         // Same goes here.  We technically just want our containing block, but
         // we may not have one if we're part of an uninstalled subtree.  We'll
         // climb as high as we can though.

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list