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


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

    	Revert floats so that they don't use layers any more.
    	Floats have to be able to paint in between the background
    	and foreground of inlines, so they can't have layers.
    
            * khtml/rendering/render_box.cpp:
            (RenderBox::setStyle):
            * khtml/rendering/render_flow.cpp:
            (RenderFlow::printObject):
            (RenderFlow::paintFloats):
            (RenderFlow::addOverHangingFloats):
            (RenderFlow::nodeAtPoint):
            * khtml/rendering/render_flow.h:
            * khtml/rendering/render_layer.cpp:
            (RenderLayer::constructZTree):
            * khtml/rendering/render_list.cpp:
            (RenderListItem::printObject):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2639 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index bb827a5..ef5fddf 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,22 @@
+2002-11-12  David Hyatt  <hyatt at apple.com>
+
+	Revert floats so that they don't use layers any more.
+	Floats have to be able to paint in between the background
+	and foreground of inlines, so they can't have layers.
+	
+        * khtml/rendering/render_box.cpp:
+        (RenderBox::setStyle):
+        * khtml/rendering/render_flow.cpp:
+        (RenderFlow::printObject):
+        (RenderFlow::paintFloats):
+        (RenderFlow::addOverHangingFloats):
+        (RenderFlow::nodeAtPoint):
+        * khtml/rendering/render_flow.h:
+        * khtml/rendering/render_layer.cpp:
+        (RenderLayer::constructZTree):
+        * khtml/rendering/render_list.cpp:
+        (RenderListItem::printObject):
+
 2002-11-12  Darin Adler  <darin at apple.com>
 
         * kwq/KWQCursor.mm: (QCursor::QCursor): Use nil instead of [NSCursor arrowCursor].
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index bb827a5..ef5fddf 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,22 @@
+2002-11-12  David Hyatt  <hyatt at apple.com>
+
+	Revert floats so that they don't use layers any more.
+	Floats have to be able to paint in between the background
+	and foreground of inlines, so they can't have layers.
+	
+        * khtml/rendering/render_box.cpp:
+        (RenderBox::setStyle):
+        * khtml/rendering/render_flow.cpp:
+        (RenderFlow::printObject):
+        (RenderFlow::paintFloats):
+        (RenderFlow::addOverHangingFloats):
+        (RenderFlow::nodeAtPoint):
+        * khtml/rendering/render_flow.h:
+        * khtml/rendering/render_layer.cpp:
+        (RenderLayer::constructZTree):
+        * khtml/rendering/render_list.cpp:
+        (RenderListItem::printObject):
+
 2002-11-12  Darin Adler  <darin at apple.com>
 
         * kwq/KWQCursor.mm: (QCursor::QCursor): Use nil instead of [NSCursor arrowCursor].
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index bb827a5..ef5fddf 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,22 @@
+2002-11-12  David Hyatt  <hyatt at apple.com>
+
+	Revert floats so that they don't use layers any more.
+	Floats have to be able to paint in between the background
+	and foreground of inlines, so they can't have layers.
+	
+        * khtml/rendering/render_box.cpp:
+        (RenderBox::setStyle):
+        * khtml/rendering/render_flow.cpp:
+        (RenderFlow::printObject):
+        (RenderFlow::paintFloats):
+        (RenderFlow::addOverHangingFloats):
+        (RenderFlow::nodeAtPoint):
+        * khtml/rendering/render_flow.h:
+        * khtml/rendering/render_layer.cpp:
+        (RenderLayer::constructZTree):
+        * khtml/rendering/render_list.cpp:
+        (RenderListItem::printObject):
+
 2002-11-12  Darin Adler  <darin at apple.com>
 
         * kwq/KWQCursor.mm: (QCursor::QCursor): Use nil instead of [NSCursor arrowCursor].
diff --git a/WebCore/khtml/rendering/render_box.cpp b/WebCore/khtml/rendering/render_box.cpp
index e85a5c0..29f7cb1 100644
--- a/WebCore/khtml/rendering/render_box.cpp
+++ b/WebCore/khtml/rendering/render_box.cpp
@@ -84,7 +84,7 @@ void RenderBox::setStyle(RenderStyle *_style)
             setRelPositioned(true);
     }
     
-    if ((isPositioned() || isRelPositioned() || (isFloating() && !isListMarker())) && !m_layer)
+    if ((isPositioned() || isRelPositioned()) && !m_layer)
         m_layer = new (element()->getDocument()->renderArena()) RenderLayer(this);
 }
 
diff --git a/WebCore/khtml/rendering/render_flow.cpp b/WebCore/khtml/rendering/render_flow.cpp
index d7eea84..6381d39 100644
--- a/WebCore/khtml/rendering/render_flow.cpp
+++ b/WebCore/khtml/rendering/render_flow.cpp
@@ -154,6 +154,9 @@ void RenderFlow::printObject(QPainter *p, int _x, int _y,
         child = child->nextSibling();
     }
 
+    // 3. paint floats.
+    paintFloats(p, _x, _y, _w, _h, _tx, _ty);
+    
     if(!isInline() && !childrenInline() && style()->outlineWidth())
         printOutline(p, _tx, _ty, width(), height(), style());
 
@@ -170,6 +173,24 @@ void RenderFlow::printObject(QPainter *p, int _x, int _y,
 
 }
 
+void RenderFlow::paintFloats(QPainter *p, int _x, int _y,
+                             int _w, int _h, int _tx, int _ty)
+{
+    if (!specialObjects)
+        return;
+        
+    SpecialObject* r;
+    QPtrListIterator<SpecialObject> it(*specialObjects);
+    for ( ; (r = it.current()); ++it) {
+        // Only paint the object if our noPaint flag isn't set.
+        if (r->node->isFloating() && !r->noPaint) {
+            r->node->print(p, _x, _y, _w, _h, 
+                           _tx + r->left - r->node->xPos() + r->node->marginLeft(), 
+                           _ty + r->startY - r->node->yPos() + r->node->marginTop());
+        }
+    }
+}
+
 void RenderFlow::layout()
 {
 //    kdDebug( 6040 ) << renderName() << " " << this << "::layout() start" << endl;
@@ -1160,47 +1181,52 @@ void RenderFlow::addOverHangingFloats( RenderFlow *flow, int xoff, int offset, b
 
     // we have overhanging floats
     if(!specialObjects) {
-	specialObjects = new QSortedList<SpecialObject>;
-	specialObjects->setAutoDelete(true);
+        specialObjects = new QSortedList<SpecialObject>;
+        specialObjects->setAutoDelete(true);
     }
 
     QPtrListIterator<SpecialObject> it(*flow->specialObjects);
     SpecialObject *r;
     for ( ; (r = it.current()); ++it ) {
-	if ( (int)r->type <= (int)SpecialObject::FloatRight &&
-	     ( ( !child && r->endY > offset ) ||
-	       ( child && flow->yPos() + r->endY > height() ) ) ) {
-	    SpecialObject* f = 0;
-	    // don't insert it twice!
-	    QPtrListIterator<SpecialObject> it(*specialObjects);
-	    while ( (f = it.current()) ) {
-		if (f->node == r->node) break;
-		++it;
-	    }
-	    if ( !f ) {
-		SpecialObject *special = new SpecialObject(r->type);
-		special->count = specialObjects->count();
-		special->startY = r->startY - offset;
-		special->endY = r->endY - offset;
-		special->left = r->left - xoff;
-		// Applying the child's margin makes no sense in the case where the child was passed in. 
+        if ( (int)r->type <= (int)SpecialObject::FloatRight &&
+            ( ( !child && r->endY > offset ) ||
+            ( child && flow->yPos() + r->endY > height() ) ) ) {
+            
+            if ( child )
+                r->noPaint = true;
+                
+            SpecialObject* f = 0;
+            // don't insert it twice!
+            QPtrListIterator<SpecialObject> it(*specialObjects);
+            while ( (f = it.current()) ) {
+            if (f->node == r->node) break;
+            ++it;
+            }
+            if ( !f ) {
+                SpecialObject *special = new SpecialObject(r->type);
+                special->count = specialObjects->count();
+                special->startY = r->startY - offset;
+                special->endY = r->endY - offset;
+                special->left = r->left - xoff;
+                // Applying the child's margin makes no sense in the case where the child was passed in. 
                 // since his own margin was added already through the subtraction of the |xoff| variable
                 // above.  |xoff| will equal -flow->marginLeft() in this case, so it's already been taken
                 // into account.  Only apply this code if |child| is false, since otherwise the left margin 
                 // will get applied twice. -dwh 
                 if (!child && flow != parent())
-		    special->left += flow->marginLeft();
-		if ( !child ) {
-		    special->left -= marginLeft();
-		}
-		special->width = r->width;
-		special->node = r->node;
-		specialObjects->append(special);
+                    special->left += flow->marginLeft();
+                if ( !child ) {
+                    special->left -= marginLeft();
+                    special->noPaint = true;
+                }
+                special->width = r->width;
+                special->node = r->node;
+                specialObjects->append(special);
 #ifdef DEBUG_LAYOUT
-	kdDebug( 6040 ) << "addOverHangingFloats x/y= (" << special->left << "/" << special->startY << "-" << special->width << "/" << special->endY - special->startY << ")" << endl;
+                kdDebug( 6040 ) << "addOverHangingFloats x/y= (" << special->left << "/" << special->startY << "-" << special->width << "/" << special->endY - special->startY << ")" << endl;
 #endif
-	    }
-	}
+            }
+        }
     }
 }
 
@@ -1859,13 +1885,19 @@ bool RenderFlow::nodeAtPoint(NodeInfo& info, int _x, int _y, int _tx, int _ty)
 {
     bool inBox = false;
     if (specialObjects) {
-        int stx = _tx;
-        int sty = _ty;
+        int stx = _tx + xPos();
+        int sty = _ty + yPos();
+        if (isRoot()) {
+            stx += static_cast<RenderRoot*>(this)->view()->contentsX();
+            sty += static_cast<RenderRoot*>(this)->view()->contentsY();
+        }
         SpecialObject* o;
         QPtrListIterator<SpecialObject> it(*specialObjects);
         for (it.toLast(); (o = it.current()); --it)
-            if (!o->node->layer() && o->node->containingBlock() == this)
-                inBox |= o->node->nodeAtPoint(info, _x, _y, stx+xPos(), sty+yPos());
+            if (o->node->isFloating() && !o->noPaint)
+                inBox |= o->node->nodeAtPoint(info, _x, _y, 
+                    stx+o->left + o->node->marginLeft() - o->node->xPos(), 
+                    sty+o->startY + o->node->marginTop() - o->node->yPos());
     }
 
     inBox |= RenderBox::nodeAtPoint(info, _x, _y, _tx, _ty);
diff --git a/WebCore/khtml/rendering/render_flow.h b/WebCore/khtml/rendering/render_flow.h
index e52a619..311e3bc 100644
--- a/WebCore/khtml/rendering/render_flow.h
+++ b/WebCore/khtml/rendering/render_flow.h
@@ -64,7 +64,9 @@ public:
                         int tx, int ty);
     virtual void printObject( QPainter *, int x, int y, int w, int h,
                         int tx, int ty);
-    
+    void paintFloats(QPainter *p, int _x, int _y,
+                     int _w, int _h, int _tx, int _ty);
+                                       
     virtual void layout( );
 
     virtual void close();
@@ -161,15 +163,16 @@ protected:
         };
 
         SpecialObject(Type _type) {
-	    node = 0;
-	    startY = 0;
-	    endY = 0;
-	    type = _type;
-	    left = 0;
-	    width = 0;
+            node = 0;
+            startY = 0;
+            endY = 0;
+            type = _type;
+            left = 0;
+            width = 0;
             count = 0;
-
+            noPaint = false;
         }
+        
         RenderObject* node;
         int startY;
         int endY;
@@ -177,6 +180,7 @@ protected:
         short width;
         short count;
         Type type : 2; // left or right aligned
+        bool noPaint: 1;
         
         bool operator==(const SpecialObject& ) const
         {
diff --git a/WebCore/khtml/rendering/render_layer.cpp b/WebCore/khtml/rendering/render_layer.cpp
index 4adc9b8..9bb08ab 100644
--- a/WebCore/khtml/rendering/render_layer.cpp
+++ b/WebCore/khtml/rendering/render_layer.cpp
@@ -331,6 +331,7 @@ RenderLayer::constructZTree(QRect damageRect,
     // thus the layer does too).  We also exclude the root from this test, since
     // the HTML can be much taller than the root (because of scrolling).
     if (renderer()->isRoot() || renderer()->isHtml() || renderer()->isBody() ||
+        renderer()->hasOverhangingFloats() || 
         (renderer()->isInline() && !renderer()->isReplaced()) ||
         (eventProcessing && layerBounds.contains(damageRect.x(),
 						 damageRect.y())) ||
diff --git a/WebCore/khtml/rendering/render_list.cpp b/WebCore/khtml/rendering/render_list.cpp
index a90b2ef..0321fe8 100644
--- a/WebCore/khtml/rendering/render_list.cpp
+++ b/WebCore/khtml/rendering/render_list.cpp
@@ -254,8 +254,6 @@ void RenderListItem::printObject(QPainter *p, int _x, int _y,
 {
     // ### this should scale with the font size in the body... possible?
     //m_marker->printIcon(p, _tx, _ty);
-    if (m_marker)
-        m_marker->printObject(p,_x,_y,_w,_h,_tx,_ty);
     RenderFlow::printObject(p, _x, _y, _w, _h, _tx, _ty);
 }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list