2009-01-27 Simon Fraser <simon.fraser@apple.com>
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 27 Jan 2009 21:28:19 +0000 (21:28 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 27 Jan 2009 21:28:19 +0000 (21:28 +0000)
        Reviewed by Dave Hyatt

        https://bugs.webkit.org/show_bug.cgi?id=23567

        Fix crash of svg/custom/stop-crash.svg testcase because of
        infinite recursion, as I missed replacing absoluteClippedOverflowRect()
        with clippedOverflowRectForRepaint() in RenderSVGGradientStop.

        Also fix a missed conversion in RenderTableCol, and add a couple
        of comments.

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

WebCore/ChangeLog
WebCore/rendering/RenderSVGGradientStop.h
WebCore/rendering/RenderSVGImage.cpp
WebCore/rendering/RenderTableCol.cpp
WebCore/rendering/RenderTableRow.cpp

index 8c35e6d..e0904b2 100644 (file)
@@ -1,3 +1,25 @@
+2009-01-27  Simon Fraser  <simon.fraser@apple.com>
+
+        Reviewed by Dave Hyatt
+
+        https://bugs.webkit.org/show_bug.cgi?id=23567
+        
+        Fix crash of svg/custom/stop-crash.svg testcase because of
+        infinite recursion, as I missed replacing absoluteClippedOverflowRect()
+        with clippedOverflowRectForRepaint() in RenderSVGGradientStop.
+        
+        Also fix a missed conversion in RenderTableCol, and add a couple
+        of comments.
+
+        * rendering/RenderSVGGradientStop.h:
+        (WebCore::RenderSVGGradientStop::clippedOverflowRectForRepaint):
+        * rendering/RenderSVGImage.cpp:
+        (WebCore::RenderSVGImage::imageChanged):
+        * rendering/RenderTableCol.cpp:
+        (WebCore::RenderTableCol::clippedOverflowRectForRepaint):
+        * rendering/RenderTableRow.cpp:
+        (WebCore::RenderTableRow::layout):
+
 2009-01-27  Adele Peterson  <adele@apple.com>
 
         RS by Dave Hyatt  
index 86de6d0..15e56c8 100644 (file)
@@ -45,7 +45,7 @@ namespace WebCore {
         // RenderObject's default impl asks the parent Object and RenderSVGRoot
         // asks all child RenderObjects for overflow rects, thus infinite loop.
         // https://bugs.webkit.org/show_bug.cgi?id=20400
-        virtual IntRect absoluteClippedOverflowRect() { return IntRect(); }
+        virtual IntRect clippedOverflowRectForRepaint(RenderBox*) { return IntRect(); }
     
     protected:
         virtual void styleDidChange(RenderStyle::Diff, const RenderStyle* oldStyle);
index 503663a..cfe3659 100644 (file)
@@ -228,7 +228,7 @@ void RenderSVGImage::imageChanged(WrappedImagePtr image, const IntRect* rect)
     RenderImage::imageChanged(image, rect);
 
     // We override to invalidate a larger rect, since SVG images can draw outside their "bounds"
-    repaintRectangle(absoluteClippedOverflowRect());
+    repaintRectangle(absoluteClippedOverflowRect());    // FIXME: Isn't this just repaint()?
 }
 
 void RenderSVGImage::calculateAbsoluteBounds()
index 19538fa..823b42d 100644 (file)
@@ -69,7 +69,7 @@ bool RenderTableCol::canHaveChildren() const
     return style()->display() == TABLE_COLUMN_GROUP;
 }
 
-IntRect RenderTableCol::clippedOverflowRectForRepaint(RenderBox* /*repaintContainer*/)
+IntRect RenderTableCol::clippedOverflowRectForRepaint(RenderBox* repaintContainer)
 {
     // For now, just repaint the whole table.
     // FIXME: Find a better way to do this, e.g., need to repaint all the cells that we
@@ -79,7 +79,7 @@ IntRect RenderTableCol::clippedOverflowRectForRepaint(RenderBox* /*repaintContai
     if (table && !table->isTable())
         table = table->parent();
     if (table && table->isTable())
-        return table->absoluteClippedOverflowRect();
+        return table->clippedOverflowRectForRepaint(repaintContainer);
 
     return IntRect();
 }
index 6b83769..0f159e3 100644 (file)
@@ -148,7 +148,7 @@ void RenderTableRow::layout()
     // We only ever need to repaint if our cells didn't, which menas that they didn't need
     // layout, so we know that our bounds didn't change. This code is just making up for
     // the fact that we did not repaint in setStyle() because we had a layout hint.
-    // We cannot call repaint() because our absoluteClippedOverflowRect() is taken from the
+    // We cannot call repaint() because our clippedOverflowRectForRepaint() is taken from the
     // parent table, and being mid-layout, that is invalid. Instead, we repaint our cells.
     if (selfNeedsLayout() && checkForRepaintDuringLayout()) {
         for (RenderObject* child = firstChild(); child; child = child->nextSibling()) {