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


The following commit has been merged in the debian/unstable branch:
commit 559ff05c3e60312e9cf3930b578dea8a88713a16
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Jan 2 23:05:26 2003 +0000

    	Fix for the 3137790.   This patch passes the mouse event x and y as
    	distinct arguments to constructZTree, so that the damageRect can
    	really reflect your clip rect.
    	This allows me to prune out layers that are clipped so
    	that if x,y aren't inside the clip rect, the layer doesn't get added to
    	the list.
    
    	This patch also makes the "clip" property apply to the element that specifies the clip instead of to the element's kids.  This is ambiguous in the spec, but it turns out other browsers do it this way, so there really is an interpretation that must be followed. :)
    
    	Reviewed by darin
    
            * khtml/rendering/render_layer.cpp:
            (RenderLayer::nodeAtPoint):
            (RenderLayer::constructZTree):
            * khtml/rendering/render_layer.h:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3236 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 2b45800..5a6aacf 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,5 +1,23 @@
 2003-01-02  David Hyatt  <hyatt at apple.com>
 
+	Fix for the 3137790.   This patch passes the mouse event x and y as 
+	distinct arguments to constructZTree, so that the damageRect can 
+	really reflect your clip rect.  
+	This allows me to prune out layers that are clipped so
+	that if x,y aren't inside the clip rect, the layer doesn't get added to
+	the list.
+
+	This patch also makes the "clip" property apply to the element that specifies the clip instead of to the element's kids.  This is ambiguous in the spec, but it turns out other browsers do it this way, so there really is an interpretation that must be followed. :)
+        
+	Reviewed by darin
+
+        * khtml/rendering/render_layer.cpp:
+        (RenderLayer::nodeAtPoint):
+        (RenderLayer::constructZTree):
+        * khtml/rendering/render_layer.h:
+
+2003-01-02  David Hyatt  <hyatt at apple.com>
+
 	Fix for bug #3137935.  When a float causes a line to get
 	moved down past the float, the line would incorrectly break
 	rather than expanding to use the newly-available width.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 2b45800..5a6aacf 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,5 +1,23 @@
 2003-01-02  David Hyatt  <hyatt at apple.com>
 
+	Fix for the 3137790.   This patch passes the mouse event x and y as 
+	distinct arguments to constructZTree, so that the damageRect can 
+	really reflect your clip rect.  
+	This allows me to prune out layers that are clipped so
+	that if x,y aren't inside the clip rect, the layer doesn't get added to
+	the list.
+
+	This patch also makes the "clip" property apply to the element that specifies the clip instead of to the element's kids.  This is ambiguous in the spec, but it turns out other browsers do it this way, so there really is an interpretation that must be followed. :)
+        
+	Reviewed by darin
+
+        * khtml/rendering/render_layer.cpp:
+        (RenderLayer::nodeAtPoint):
+        (RenderLayer::constructZTree):
+        * khtml/rendering/render_layer.h:
+
+2003-01-02  David Hyatt  <hyatt at apple.com>
+
 	Fix for bug #3137935.  When a float causes a line to get
 	moved down past the float, the line would incorrectly break
 	rather than expanding to use the newly-available width.
diff --git a/WebCore/khtml/rendering/render_layer.cpp b/WebCore/khtml/rendering/render_layer.cpp
index fbf48aa..e7bd2a0 100644
--- a/WebCore/khtml/rendering/render_layer.cpp
+++ b/WebCore/khtml/rendering/render_layer.cpp
@@ -318,8 +318,8 @@ bool
 RenderLayer::nodeAtPoint(RenderObject::NodeInfo& info, int x, int y)
 {
     bool inside = false;
-    QRect damageRect = QRect(x,y,0,0);
-    RenderLayer::RenderZTreeNode* node = constructZTree(damageRect, damageRect, this, true);
+    QRect damageRect(m_x, m_y, m_width, m_height);
+    RenderLayer::RenderZTreeNode* node = constructZTree(damageRect, damageRect, this, true, x, y);
     if (!node)
         return false;
 
@@ -352,7 +352,7 @@ RenderLayer::nodeAtPoint(RenderObject::NodeInfo& info, int x, int y)
 RenderLayer::RenderZTreeNode*
 RenderLayer::constructZTree(QRect overflowClipRect, QRect posClipRect,
                             RenderLayer* rootLayer,
-                            bool eventProcessing)
+                            bool eventProcessing, int xMousePos, int yMousePos)
 {
     // The arena we use for allocating our temporary ztree elements.
     RenderArena* renderArena = renderer()->renderArena();
@@ -383,9 +383,12 @@ RenderLayer::constructZTree(QRect overflowClipRect, QRect posClipRect,
     // Positioned elements are clipped according to the posClipRect.  All other
     // layers are clipped according to the overflowClipRect.
     QRect clipRectToApply = m_object->isPositioned() ? posClipRect : overflowClipRect;
-    QRect damageRect = eventProcessing ? clipRectToApply : 
-                    clipRectToApply.intersect(layerBounds);
+    QRect damageRect = clipRectToApply.intersect(layerBounds);
     
+    // Clip applies to *us* as well, so go ahead and update the damageRect.
+    if (m_object->hasClip())
+        damageRect = damageRect.intersect(m_object->getClipRect(x,y));
+        
     // If we establish a clip rect, then we want to intersect that rect
     // with the damage rect to form a new damage rect.
     bool clipOriginator = false;
@@ -417,7 +420,8 @@ RenderLayer::constructZTree(QRect overflowClipRect, QRect posClipRect,
             continue; // Ignore negative z-indices in this first pass.
 
         RenderZTreeNode* childNode = child->constructZTree(overflowClipRect, posClipRect, 
-                                                           rootLayer, eventProcessing);
+                                                           rootLayer, eventProcessing, 
+                                                           xMousePos, yMousePos);
         if (childNode) {
             // Put the new node into the tree at the front of the parent's list.
             if (lastChildNode)
@@ -436,8 +440,7 @@ RenderLayer::constructZTree(QRect overflowClipRect, QRect posClipRect,
     if (renderer()->isRoot() || renderer()->isHtml() || renderer()->isBody() ||
         renderer()->hasOverhangingFloats() || 
         (renderer()->isInline() && !renderer()->isReplaced()) ||
-        (eventProcessing && layerBounds.contains(damageRect.x(),
-						 damageRect.y())) ||
+        (eventProcessing && damageRect.contains(xMousePos,yMousePos)) ||
         (!eventProcessing && layerBounds.intersects(damageRect))) {
         RenderLayerElement* layerElt = new (renderArena) RenderLayerElement(this, layerBounds, 
                                                               damageRect, clipRectToApply,
@@ -463,7 +466,8 @@ RenderLayer::constructZTree(QRect overflowClipRect, QRect posClipRect,
             continue; // Ignore non-negative z-indices in this second pass.
 
         RenderZTreeNode* childNode = child->constructZTree(overflowClipRect, posClipRect,
-                                                           rootLayer, eventProcessing);
+                                                           rootLayer, eventProcessing,
+                                                           xMousePos, yMousePos);
         if (childNode) {
             // Deal with the case where all our children views had negative z-indices.
             // Demote our leaf node and make a new interior node that can hold these
diff --git a/WebCore/khtml/rendering/render_layer.h b/WebCore/khtml/rendering/render_layer.h
index 416b035..3b8554b 100644
--- a/WebCore/khtml/rendering/render_layer.h
+++ b/WebCore/khtml/rendering/render_layer.h
@@ -263,7 +263,7 @@ private:
     RenderZTreeNode* constructZTree(QRect overflowClipRect,
                                     QRect clipRect,
                                     RenderLayer* rootLayer,
-                                    bool eventProcessing = false);
+                                    bool eventProcessing = false, int x=0, int y=0);
 
     // Once the z-tree has been constructed, we call constructLayerList
     // to produce a flattened layer list for rendering/event handling.

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list