Fix for 3915787, macobserver doesn't paint. floatRect() needed to be const in the...
authorhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 Dec 2004 22:59:48 +0000 (22:59 +0000)
committerhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 Dec 2004 22:59:48 +0000 (22:59 +0000)
and painting was using the wrong rect when setting up the x/y of the rect.

        Reviewed by mjs

        * khtml/rendering/render_block.cpp:
        (khtml::RenderBlock::paint):
        (khtml::RenderBlock::nodeAtPoint):
        * khtml/rendering/render_object.h:
        (khtml::RenderObject::floatRect):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8196 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog-2005-08-23
WebCore/khtml/rendering/render_block.cpp
WebCore/khtml/rendering/render_object.h

index 8719f1c8527fd0ae50644a78a4762d64c4bb6bc0..54d9d2d30c4def269ef4c730d0fcc9acf6752aa5 100644 (file)
@@ -1,3 +1,20 @@
+2004-12-13  David Hyatt  <hyatt@apple.com>
+
+       Fix for 3915787, macobserver doesn't paint.  floatRect() needed to be const in the base class.  Also hit-testing
+       and painting was using the wrong rect when setting up the x/y of the rect.
+       
+        Reviewed by mjs
+
+        * khtml/rendering/render_block.cpp:
+        (khtml::RenderBlock::paint):
+        (khtml::RenderBlock::nodeAtPoint):
+        * khtml/rendering/render_object.h:
+        (khtml::RenderObject::floatRect):
+
+2004-12-13  Ken Kocienda  <kocienda@apple.com>
+
+        Reviewed by John
+
 2004-12-13  Ken Kocienda  <kocienda@apple.com>
 
         Reviewed by John
index 62fff3b1e391327190e069b0e1b0eb739e093210..30438e72f0e388465a73384832d28e1fd16769a8 100644 (file)
@@ -1216,8 +1216,8 @@ void RenderBlock::paint(PaintInfo& i, int _tx, int _ty)
             // Check floats next.
             QRect floatBox = floatRect();
             floatBox.inflate(maximalOutlineSize(i.phase));
-            floatBox.setX(overflowBox.x() + _tx);
-            floatBox.setY(overflowBox.y() + _ty);
+            floatBox.setX(floatBox.x() + _tx);
+            floatBox.setY(floatBox.y() + _ty);
             if (!floatBox.intersects(i.r))
                 return;
         }
@@ -2407,8 +2407,8 @@ bool RenderBlock::nodeAtPoint(NodeInfo& info, int _x, int _y, int _tx, int _ty,
         if (!insideOverflowBox) {
             // Check floats next.
             QRect floatBox = floatRect();
-            floatBox.setX(overflowBox.x() + tx);
-            floatBox.setY(overflowBox.y() + ty);
+            floatBox.setX(floatBox.x() + tx);
+            floatBox.setY(floatBox.y() + ty);
             if (!floatBox.contains(_x, _y))
                 return false;
         }
index 2971817d0d0aa189c2ed1687400b2a2c9e3998e2..39596b59370f5987fa5b0c953c11d64e0df66bd6 100644 (file)
@@ -728,7 +728,7 @@ public:
     virtual bool containsFloats() { return false; }
     virtual bool containsFloat(RenderObject* o) { return false; }
     virtual bool hasOverhangingFloats() { return false; }
-    virtual QRect floatRect() { return borderBox(); }
+    virtual QRect floatRect() const { return borderBox(); }
 
     bool avoidsFloats() const;
     bool usesLineWidth() const;