[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:09:49 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 81607eb82f9281823aff2e01c55413dad206edcd
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Nov 27 09:54:16 2002 +0000

            Numerous overflow: hidden improvements to fix espn.com.
    
    	First stop absolute positioned overflow hidden elements
    	from growing to accommodate their overflow.  (Actually
    	absolute positioned elements should never grow to do this,
    	but fixing it for non-overflow hidden elements is hard,
    	so later.)
    
    	Second fix the render layer code to not allow background/borders
    	of the object with overflow: hidden from being clipped.  This
    	involves an extra paint step where the object paints its
    	background and borders prior to establishing the clip rect
    	for the children.  (This will also be necessary for overflow:auto
    	and overflow:scroll).
    
            * ChangeLog:
            * khtml/rendering/render_box.cpp:
            (RenderBox::getClipRect):
            (RenderBox::calcAbsoluteVertical):
            * khtml/rendering/render_layer.cpp:
            (RenderLayer::paint):
            * khtml/rendering/render_object.h:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2892 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index e348e79..7dec167 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,5 +1,38 @@
 2002-11-27  David Hyatt  <hyatt at apple.com>
 
+        Numerous overflow: hidden improvements to fix espn.com.
+
+	First stop absolute positioned overflow hidden elements
+	from growing to accommodate their overflow.  (Actually
+	absolute positioned elements should never grow to do this,
+	but fixing it for non-overflow hidden elements is hard,
+	so later.)
+
+	Second fix the render layer code to not allow background/borders
+	of the object with overflow: hidden from being clipped.  This
+	involves an extra paint step where the object paints its
+	background and borders prior to establishing the clip rect
+	for the children.  (This will also be necessary for overflow:auto
+	and overflow:scroll).
+	
+        * ChangeLog:
+        * khtml/rendering/render_box.cpp:
+        (RenderBox::getClipRect):
+        (RenderBox::calcAbsoluteVertical):
+        * khtml/rendering/render_layer.cpp:
+        (RenderLayer::paint):
+        * khtml/rendering/render_object.h:
+
+2002-11-27  David Hyatt  <hyatt at apple.com>
+
+        * khtml/rendering/render_box.cpp:
+        (RenderBox::getClipRect):
+        (RenderBox::calcAbsoluteVertical):
+        * khtml/rendering/render_layer.cpp:
+        (RenderLayer::paint):
+
+2002-11-27  David Hyatt  <hyatt at apple.com>
+
 	Fix for 3105502.  drop-downs wrapping to next line.
 	
         * khtml/css/html4.css:
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index e348e79..7dec167 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,5 +1,38 @@
 2002-11-27  David Hyatt  <hyatt at apple.com>
 
+        Numerous overflow: hidden improvements to fix espn.com.
+
+	First stop absolute positioned overflow hidden elements
+	from growing to accommodate their overflow.  (Actually
+	absolute positioned elements should never grow to do this,
+	but fixing it for non-overflow hidden elements is hard,
+	so later.)
+
+	Second fix the render layer code to not allow background/borders
+	of the object with overflow: hidden from being clipped.  This
+	involves an extra paint step where the object paints its
+	background and borders prior to establishing the clip rect
+	for the children.  (This will also be necessary for overflow:auto
+	and overflow:scroll).
+	
+        * ChangeLog:
+        * khtml/rendering/render_box.cpp:
+        (RenderBox::getClipRect):
+        (RenderBox::calcAbsoluteVertical):
+        * khtml/rendering/render_layer.cpp:
+        (RenderLayer::paint):
+        * khtml/rendering/render_object.h:
+
+2002-11-27  David Hyatt  <hyatt at apple.com>
+
+        * khtml/rendering/render_box.cpp:
+        (RenderBox::getClipRect):
+        (RenderBox::calcAbsoluteVertical):
+        * khtml/rendering/render_layer.cpp:
+        (RenderLayer::paint):
+
+2002-11-27  David Hyatt  <hyatt at apple.com>
+
 	Fix for 3105502.  drop-downs wrapping to next line.
 	
         * khtml/css/html4.css:
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index e348e79..7dec167 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,5 +1,38 @@
 2002-11-27  David Hyatt  <hyatt at apple.com>
 
+        Numerous overflow: hidden improvements to fix espn.com.
+
+	First stop absolute positioned overflow hidden elements
+	from growing to accommodate their overflow.  (Actually
+	absolute positioned elements should never grow to do this,
+	but fixing it for non-overflow hidden elements is hard,
+	so later.)
+
+	Second fix the render layer code to not allow background/borders
+	of the object with overflow: hidden from being clipped.  This
+	involves an extra paint step where the object paints its
+	background and borders prior to establishing the clip rect
+	for the children.  (This will also be necessary for overflow:auto
+	and overflow:scroll).
+	
+        * ChangeLog:
+        * khtml/rendering/render_box.cpp:
+        (RenderBox::getClipRect):
+        (RenderBox::calcAbsoluteVertical):
+        * khtml/rendering/render_layer.cpp:
+        (RenderLayer::paint):
+        * khtml/rendering/render_object.h:
+
+2002-11-27  David Hyatt  <hyatt at apple.com>
+
+        * khtml/rendering/render_box.cpp:
+        (RenderBox::getClipRect):
+        (RenderBox::calcAbsoluteVertical):
+        * khtml/rendering/render_layer.cpp:
+        (RenderLayer::paint):
+
+2002-11-27  David Hyatt  <hyatt at apple.com>
+
 	Fix for 3105502.  drop-downs wrapping to next line.
 	
         * khtml/css/html4.css:
diff --git a/WebCore/khtml/rendering/render_box.cpp b/WebCore/khtml/rendering/render_box.cpp
index 25d947f..75e5777 100644
--- a/WebCore/khtml/rendering/render_box.cpp
+++ b/WebCore/khtml/rendering/render_box.cpp
@@ -357,11 +357,13 @@ QRect RenderBox::getClipRect(int tx, int ty)
         clipx+=c;
         clipw-=c;
     }
+        
     if (!style()->clipRight().isVariable())
     {
         int w = style()->clipRight().width(m_width-bl-br);
         clipw -= m_width - bl - br - w;
     }
+    
     if (!style()->clipTop().isVariable())
     {
         int c=style()->clipTop().width(m_height-bt-bb);
@@ -958,7 +960,11 @@ void RenderBox::calcAbsoluteVertical()
     if(!style()->height().isVariable())
     {
         h = style()->height().width(ch);
-        if (m_height-pab>h)
+        
+        // This is actually totally wrong, since it grows the positioned element to
+        // wrap its content, when the content should instead overflow out just like
+        // non-positioned blocks do.  For now at least handle overflow: hidden.
+        if (style()->overflow() != OHIDDEN && m_height-pab>h)
             h=m_height-pab;
     }
     else if (isReplaced())
@@ -1063,10 +1069,14 @@ void RenderBox::calcAbsoluteVertical()
             b = ch - ( h+t+mt+mb+pab);
     }
 
-
     if (m_height<h+pab) //content must still fit
         m_height = h+pab;
 
+    // This is a hack. The block shouldn't be getting stretched anyway.
+    // At least make overflow: hidden work. -dwh
+    if (style()->overflow() == OHIDDEN && m_height > h+pab)
+        m_height = h+pab;
+    
     m_marginTop = mt;
     m_marginBottom = mb;
     m_y = t + mt + containingBlock()->borderTop();
diff --git a/WebCore/khtml/rendering/render_layer.cpp b/WebCore/khtml/rendering/render_layer.cpp
index d595094..bf035ce 100644
--- a/WebCore/khtml/rendering/render_layer.cpp
+++ b/WebCore/khtml/rendering/render_layer.cpp
@@ -199,8 +199,17 @@ RenderLayer::paint(QPainter *p, int x, int y, int w, int h)
         if (elt->clipRect != currRect) {
             if (currRect != paintRect)
                 p->restore(); // Pop the clip.
+                
             currRect = elt->clipRect;
             if (currRect != paintRect) {
+                // A clip is in effect.  The clip is never allowed to clip our render object's
+                // background or borders.  Go ahead and draw those now without the clip in
+                // effect.
+                elt->layer->renderer()->paintBoxDecorations(p, x, y, w, h,
+                                      elt->absBounds.x(),
+                                      elt->absBounds.y());
+                
+                // Now apply the clip rect.
                 QRect clippedRect = p->xForm(currRect);
 #if APPLE_CHANGES
                 p->save();
diff --git a/WebCore/khtml/rendering/render_object.h b/WebCore/khtml/rendering/render_object.h
index f413e76..8a81bd7 100644
--- a/WebCore/khtml/rendering/render_object.h
+++ b/WebCore/khtml/rendering/render_object.h
@@ -256,6 +256,9 @@ public:
     void paintBorder(QPainter *p, int _tx, int _ty, int w, int h, const RenderStyle* style, bool begin=true, bool end=true);
     void paintOutline(QPainter *p, int _tx, int _ty, int w, int h, const RenderStyle* style);
 
+    // RenderBox implements this.
+    virtual void paintBoxDecorations(QPainter *p,int _x, int _y,
+                                     int _w, int _h, int _tx, int _ty) {};
 
     /*
      * This function calculates the minimum & maximum width that the object

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list