[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:39:58 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit a4bfbf124a775a25b8d14d8eff479147b7a2944c
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu May 1 22:10:22 2003 +0000

    	Replace effectiveWidth and effectiveHeight with a
    	parameterized overflowWidth/Height, since this is much better
    	terminology.
    
    	Also fix event handling so that it no longer assumes (incorrectly)
    	that being inside the overflow rect of an object means you are
    	inside the object.  Now there are two separate checks, with the
    	overflow check being used only to figure out if you should check
    	inside your kids.
    
            Reviewed by darin
    
            * khtml/rendering/render_block.cpp:
            * khtml/rendering/render_block.h:
            * khtml/rendering/render_box.cpp:
            (RenderBox::repaint):
            * khtml/rendering/render_flow.cpp:
            (RenderFlow::repaint):
            * khtml/rendering/render_object.cpp:
            (RenderObject::nodeAtPoint):
            * khtml/rendering/render_object.h:
            * khtml/rendering/render_table.h:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4253 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 92bb398..672eaf9 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,28 @@
+2003-05-01  David Hyatt  <hyatt at apple.com>
+
+	Replace effectiveWidth and effectiveHeight with a 
+	parameterized overflowWidth/Height, since this is much better
+	terminology.
+
+	Also fix event handling so that it no longer assumes (incorrectly)
+	that being inside the overflow rect of an object means you are
+	inside the object.  Now there are two separate checks, with the
+	overflow check being used only to figure out if you should check
+	inside your kids.
+	
+        Reviewed by darin
+
+        * khtml/rendering/render_block.cpp:
+        * khtml/rendering/render_block.h:
+        * khtml/rendering/render_box.cpp:
+        (RenderBox::repaint):
+        * khtml/rendering/render_flow.cpp:
+        (RenderFlow::repaint):
+        * khtml/rendering/render_object.cpp:
+        (RenderObject::nodeAtPoint):
+        * khtml/rendering/render_object.h:
+        * khtml/rendering/render_table.h:
+
 === Safari-77 ===
 
 2003-04-30  David Hyatt  <hyatt at apple.com>
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 92bb398..672eaf9 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,28 @@
+2003-05-01  David Hyatt  <hyatt at apple.com>
+
+	Replace effectiveWidth and effectiveHeight with a 
+	parameterized overflowWidth/Height, since this is much better
+	terminology.
+
+	Also fix event handling so that it no longer assumes (incorrectly)
+	that being inside the overflow rect of an object means you are
+	inside the object.  Now there are two separate checks, with the
+	overflow check being used only to figure out if you should check
+	inside your kids.
+	
+        Reviewed by darin
+
+        * khtml/rendering/render_block.cpp:
+        * khtml/rendering/render_block.h:
+        * khtml/rendering/render_box.cpp:
+        (RenderBox::repaint):
+        * khtml/rendering/render_flow.cpp:
+        (RenderFlow::repaint):
+        * khtml/rendering/render_object.cpp:
+        (RenderObject::nodeAtPoint):
+        * khtml/rendering/render_object.h:
+        * khtml/rendering/render_table.h:
+
 === Safari-77 ===
 
 2003-04-30  David Hyatt  <hyatt at apple.com>
diff --git a/WebCore/khtml/rendering/render_block.cpp b/WebCore/khtml/rendering/render_block.cpp
index b1b48e0..91ff3e7 100644
--- a/WebCore/khtml/rendering/render_block.cpp
+++ b/WebCore/khtml/rendering/render_block.cpp
@@ -945,7 +945,7 @@ void RenderBlock::layoutBlockChildren( bool relayoutChildren )
         child->setPos(chPos, child->yPos());
 
         m_height += child->height();
-        int overflowDelta = child->effectiveHeight() - child->height();
+        int overflowDelta = child->overflowHeight(false) - child->height();
         if (m_height + overflowDelta > m_overflowHeight)
             m_overflowHeight = m_height + overflowDelta;
 
diff --git a/WebCore/khtml/rendering/render_block.h b/WebCore/khtml/rendering/render_block.h
index f91e6c2..6dcc556 100644
--- a/WebCore/khtml/rendering/render_block.h
+++ b/WebCore/khtml/rendering/render_block.h
@@ -51,8 +51,10 @@ public:
     // The height (and width) of a block when you include overflow spillage out of the bottom
     // of the block (e.g., a <div style="height:25px"> that has a 100px tall image inside
     // it would have an overflow height of borderTop() + paddingTop() + 100px.
-    virtual int overflowHeight() const { return m_overflowHeight; }
-    virtual int overflowWidth() const { return m_overflowWidth; }
+    virtual int overflowHeight(bool includeInterior=true) const
+    { return (!includeInterior && style()->hidesOverflow()) ? m_height : m_overflowHeight; }
+    virtual int overflowWidth(bool includeInterior=true) const
+    { return (!includeInterior && style()->hidesOverflow()) ? m_width : m_overflowWidth; }
     virtual void setOverflowHeight(int h) { m_overflowHeight = h; }
     virtual void setOverflowWidth(int w) { m_overflowWidth = w; }
 
diff --git a/WebCore/khtml/rendering/render_box.cpp b/WebCore/khtml/rendering/render_box.cpp
index 765b439..feb89f7 100644
--- a/WebCore/khtml/rendering/render_box.cpp
+++ b/WebCore/khtml/rendering/render_box.cpp
@@ -453,7 +453,7 @@ void RenderBox::repaint(bool immediate)
 {
     //kdDebug( 6040 ) << "repaint!" << endl;
     int ow = style() ? style()->outlineWidth() : 0;
-    repaintRectangle(-ow, -ow, effectiveWidth()+ow*2, effectiveHeight()+ow*2, immediate);
+    repaintRectangle(-ow, -ow, overflowWidth(false)+ow*2, overflowHeight(false)+ow*2, immediate);
 }
 
 void RenderBox::repaintRectangle(int x, int y, int w, int h, bool immediate, bool f)
diff --git a/WebCore/khtml/rendering/render_flow.cpp b/WebCore/khtml/rendering/render_flow.cpp
index b7a1457..9778742 100644
--- a/WebCore/khtml/rendering/render_flow.cpp
+++ b/WebCore/khtml/rendering/render_flow.cpp
@@ -253,7 +253,7 @@ void RenderFlow::repaint(bool immediate)
         if (firstLineBox() && firstLineBox()->topOverflow() < 0) {
             int ow = style() ? style()->outlineWidth() : 0;
             repaintRectangle(-ow, -ow+firstLineBox()->topOverflow(),
-                             effectiveWidth()+ow*2, effectiveHeight()+ow*2, immediate);
+                             overflowWidth(false)+ow*2, overflowHeight(false)+ow*2, immediate);
         }
         else
             return RenderBox::repaint(immediate);
diff --git a/WebCore/khtml/rendering/render_object.cpp b/WebCore/khtml/rendering/render_object.cpp
index 2911c9f..8b9edf0 100644
--- a/WebCore/khtml/rendering/render_object.cpp
+++ b/WebCore/khtml/rendering/render_object.cpp
@@ -1290,14 +1290,21 @@ bool RenderObject::nodeAtPoint(NodeInfo& info, int _x, int _y, int _tx, int _ty,
 {
     int tx = _tx + xPos();
     int ty = _ty + yPos();
-    
-    inside |= (style()->visibility() != HIDDEN && ((_y >= ty) && (_y < ty + effectiveHeight()) &&
-                  (_x >= tx) && (_x < tx + effectiveWidth()))) || isBody() || isHtml();
+
+    QRect boundsRect(tx, ty, width(), height());
+    inside |= (style()->visibility() != HIDDEN && boundsRect.contains(_x, _y)) || isBody() || isHtml();
+    bool inOverflowRect = inside;
+    if (!inOverflowRect) {
+        QRect overflowRect(tx, ty, overflowWidth(false), overflowHeight(false));
+        inOverflowRect = overflowRect.contains(_x, _y);
+    }
     
     // ### table should have its own, more performant method
     if ((!isRenderBlock() ||
          !static_cast<RenderBlock*>(this)->isPointInScrollbar(_x, _y, _tx, _ty)) &&
-        (overhangingContents() || isInline() || isRoot() || isTableRow() || isTableSection() || inside || mouseInside() || (childrenInline() && firstChild() && firstChild()->isCompact()))) {
+        (overhangingContents() || inOverflowRect || isInline() || isRoot() ||
+         isTableRow() || isTableSection() || inside || mouseInside() ||
+         (childrenInline() && firstChild() && firstChild()->isCompact()))) {
         int stx = _tx + xPos();
         int sty = _ty + yPos();
         if (style()->hidesOverflow() && layer())
diff --git a/WebCore/khtml/rendering/render_object.h b/WebCore/khtml/rendering/render_object.h
index d6dc223..33e3e45 100644
--- a/WebCore/khtml/rendering/render_object.h
+++ b/WebCore/khtml/rendering/render_object.h
@@ -410,15 +410,11 @@ public:
     // The height of a block when you include normal flow overflow spillage out of the bottom
     // of the block (e.g., a <div style="height:25px"> that has a 100px tall image inside
     // it would have an overflow height of borderTop() + paddingTop() + 100px.
-    virtual int overflowHeight() const { return height(); }
-    virtual int overflowWidth() const { return width(); }
+    virtual int overflowHeight(bool includeInterior=true) const { return height(); }
+    virtual int overflowWidth(bool includeInterior=true) const { return width(); }
     virtual void setOverflowHeight(int) {}
     virtual void setOverflowWidth(int) {}
 
-    // Gives the effective overflow width/height once you factor in the object's overflow style.
-    int effectiveHeight() const { return style()->hidesOverflow() ? height() : overflowHeight(); }
-    int effectiveWidth() const { return style()->hidesOverflow() ? width() : overflowWidth(); }
-
     // IE extensions. Used to calculate offsetWidth/Height.  Overridden by inlines (render_flow) 
     // to return the remaining width on a given line (and the height of a single line). -dwh
     virtual short offsetWidth() const { return width(); }
diff --git a/WebCore/khtml/rendering/render_table.h b/WebCore/khtml/rendering/render_table.h
index cde1e4d..98f3c5a 100644
--- a/WebCore/khtml/rendering/render_table.h
+++ b/WebCore/khtml/rendering/render_table.h
@@ -94,8 +94,8 @@ public:
     void setCellPadding( uint p ) { padding = p; }
 
     // overrides
-    virtual int overflowHeight() const { return height(); }
-    virtual int overflowWidth() const { return width(); }
+    virtual int overflowHeight(bool includeInterior=true) const { return height(); }
+    virtual int overflowWidth(bool includeInterior=true) const { return width(); }
     virtual void addChild(RenderObject *child, RenderObject *beforeChild = 0);
     virtual void paint( QPainter *, int x, int y, int w, int h,
                         int tx, int ty, PaintAction paintAction);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list