Overridden clippedOverflowRectForRepaint() still uses IntRects
authoreae@chromium.org <eae@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 28 Oct 2011 21:55:11 +0000 (21:55 +0000)
committereae@chromium.org <eae@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 28 Oct 2011 21:55:11 +0000 (21:55 +0000)
https://bugs.webkit.org/show_bug.cgi?id=71046

Reviewed by Simon Fraser.

Change all virtual clippedOverflowRectForRepaint functions to use the
same signature.

No new tests.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::rectWithOutlineForRepaint):
(WebCore::RenderObject::clippedOverflowRectForRepaint):
* rendering/RenderObject.h:
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::clippedOverflowRectForRepaint):
* rendering/RenderReplaced.h:
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::clippedOverflowRectForRepaint):
* rendering/RenderTableCell.h:
* rendering/RenderTableCol.cpp:
(WebCore::RenderTableCol::clippedOverflowRectForRepaint):
* rendering/RenderTableCol.h:
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::clippedOverflowRectForRepaint):
* rendering/RenderTableRow.h:
* rendering/RenderText.cpp:
(WebCore::RenderText::clippedOverflowRectForRepaint):
* rendering/RenderText.h:

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

13 files changed:
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderObject.cpp
Source/WebCore/rendering/RenderObject.h
Source/WebCore/rendering/RenderReplaced.cpp
Source/WebCore/rendering/RenderReplaced.h
Source/WebCore/rendering/RenderTableCell.cpp
Source/WebCore/rendering/RenderTableCell.h
Source/WebCore/rendering/RenderTableCol.cpp
Source/WebCore/rendering/RenderTableCol.h
Source/WebCore/rendering/RenderTableRow.cpp
Source/WebCore/rendering/RenderTableRow.h
Source/WebCore/rendering/RenderText.cpp
Source/WebCore/rendering/RenderText.h

index 9e0b52b..f222419 100755 (executable)
@@ -1,3 +1,35 @@
+2011-10-28  Emil A Eklund  <eae@chromium.org>
+
+        Overridden clippedOverflowRectForRepaint() still uses IntRects
+        https://bugs.webkit.org/show_bug.cgi?id=71046
+
+        Reviewed by Simon Fraser.
+
+        Change all virtual clippedOverflowRectForRepaint functions to use the
+        same signature.
+
+        No new tests.
+
+        * rendering/RenderObject.cpp:
+        (WebCore::RenderObject::rectWithOutlineForRepaint):
+        (WebCore::RenderObject::clippedOverflowRectForRepaint):
+        * rendering/RenderObject.h:
+        * rendering/RenderReplaced.cpp:
+        (WebCore::RenderReplaced::clippedOverflowRectForRepaint):
+        * rendering/RenderReplaced.h:
+        * rendering/RenderTableCell.cpp:
+        (WebCore::RenderTableCell::clippedOverflowRectForRepaint):
+        * rendering/RenderTableCell.h:
+        * rendering/RenderTableCol.cpp:
+        (WebCore::RenderTableCol::clippedOverflowRectForRepaint):
+        * rendering/RenderTableCol.h:
+        * rendering/RenderTableRow.cpp:
+        (WebCore::RenderTableRow::clippedOverflowRectForRepaint):
+        * rendering/RenderTableRow.h:
+        * rendering/RenderText.cpp:
+        (WebCore::RenderText::clippedOverflowRectForRepaint):
+        * rendering/RenderText.h:
+
 2011-10-28  Adam Klein  <adamk@chromium.org>
 
         Remove unused parsers for 'exception' and 'alias' IDL keywords
index 41de9f8..2944681 100644 (file)
@@ -1450,17 +1450,17 @@ bool RenderObject::checkForRepaintDuringLayout() const
     return !document()->view()->needsFullRepaint() && !hasLayer();
 }
 
-IntRect RenderObject::rectWithOutlineForRepaint(RenderBoxModelObject* repaintContainer, int outlineWidth) const
+LayoutRect RenderObject::rectWithOutlineForRepaint(RenderBoxModelObject* repaintContainer, LayoutUnit outlineWidth) const
 {
-    IntRect r(clippedOverflowRectForRepaint(repaintContainer));
+    LayoutRect r(clippedOverflowRectForRepaint(repaintContainer));
     r.inflate(outlineWidth);
     return r;
 }
 
-IntRect RenderObject::clippedOverflowRectForRepaint(RenderBoxModelObject*) const
+LayoutRect RenderObject::clippedOverflowRectForRepaint(RenderBoxModelObject*) const
 {
     ASSERT_NOT_REACHED();
-    return IntRect();
+    return LayoutRect();
 }
 
 void RenderObject::computeRectForRepaint(RenderBoxModelObject* repaintContainer, IntRect& rect, bool fixed) const
index d47dd68..0c50629 100644 (file)
@@ -708,8 +708,8 @@ public:
     {
         return clippedOverflowRectForRepaint(0);
     }
-    virtual IntRect clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer) const;
-    virtual IntRect rectWithOutlineForRepaint(RenderBoxModelObject* repaintContainer, int outlineWidth) const;
+    virtual LayoutRect clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer) const;
+    virtual LayoutRect rectWithOutlineForRepaint(RenderBoxModelObject* repaintContainer, LayoutUnit outlineWidth) const;
 
     // Given a rect in the object's coordinate space, compute a rect suitable for repainting
     // that rect in view coordinates.
index 87084d1..66f0d24 100644 (file)
@@ -513,14 +513,14 @@ void RenderReplaced::setIntrinsicSize(const IntSize& size)
     m_intrinsicSize = size;
 }
 
-IntRect RenderReplaced::clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer) const
+LayoutRect RenderReplaced::clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer) const
 {
     if (style()->visibility() != VISIBLE && !enclosingLayer()->hasVisibleContent())
-        return IntRect();
+        return LayoutRect();
 
     // The selectionRect can project outside of the overflowRect, so take their union
     // for repainting to avoid selection painting glitches.
-    IntRect r = unionRect(localSelectionRect(false), visualOverflowRect());
+    LayoutRect r = unionRect(localSelectionRect(false), visualOverflowRect());
 
     RenderView* v = view();
     if (v) {
index 8ca5b6c..ce11201 100644 (file)
@@ -76,7 +76,7 @@ private:
 
     virtual void paintReplaced(PaintInfo&, const LayoutPoint&) { }
 
-    virtual IntRect clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer) const;
+    virtual LayoutRect clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer) const;
 
     virtual VisiblePosition positionForPoint(const LayoutPoint&);
     
index 61e4788..248c8eb 100644 (file)
@@ -236,7 +236,7 @@ LayoutSize RenderTableCell::offsetFromContainer(RenderObject* o, const LayoutPoi
     return offset;
 }
 
-IntRect RenderTableCell::clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer) const
+LayoutRect RenderTableCell::clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer) const
 {
     // If the table grid is dirty, we cannot get reliable information about adjoining cells,
     // so we ignore outside borders. This should not be a problem because it means that
index e7142df..58a7586 100644 (file)
@@ -154,7 +154,7 @@ private:
     virtual void paintMask(PaintInfo&, const LayoutPoint&);
 
     virtual LayoutSize offsetFromContainer(RenderObject*, const LayoutPoint&) const;
-    virtual IntRect clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer) const;
+    virtual LayoutRect clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer) const;
     virtual void computeRectForRepaint(RenderBoxModelObject* repaintContainer, IntRect&, bool fixed = false) const;
 
     void paintCollapsedBorder(GraphicsContext*, const LayoutRect&);
index 60cc5b9..e400a55 100644 (file)
@@ -81,7 +81,7 @@ bool RenderTableCol::canHaveChildren() const
     return style()->display() == TABLE_COLUMN_GROUP;
 }
 
-IntRect RenderTableCol::clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer) const
+LayoutRect RenderTableCol::clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer) const
 {
     // 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
index 220482f..5d939c4 100644 (file)
@@ -56,7 +56,7 @@ private:
     virtual bool canHaveChildren() const;
     virtual bool requiresLayer() const { return false; }
 
-    virtual IntRect clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer) const;
+    virtual LayoutRect clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer) const;
     virtual void imageChanged(WrappedImagePtr, const IntRect* = 0);
 
     virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle);
index ea1dcf4..4807fc0 100644 (file)
@@ -184,7 +184,7 @@ void RenderTableRow::layout()
     setNeedsLayout(false);
 }
 
-IntRect RenderTableRow::clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer) const
+LayoutRect RenderTableRow::clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer) const
 {
     ASSERT(parent());
 
@@ -198,7 +198,7 @@ IntRect RenderTableRow::clippedOverflowRectForRepaint(RenderBoxModelObject* repa
     if (RenderTable* parentTable = table())
         return parentTable->clippedOverflowRectForRepaint(repaintContainer);
 
-    return IntRect();
+    return LayoutRect();
 }
 
 // Hit Testing
index 40df922..a88a768 100644 (file)
@@ -53,7 +53,7 @@ private:
 
     virtual void addChild(RenderObject* child, RenderObject* beforeChild = 0);
     virtual void layout();
-    virtual IntRect clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer) const;
+    virtual LayoutRect clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer) const;
     virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const LayoutPoint& pointInContainer, const LayoutPoint& accumulatedOffset, HitTestAction);
 
     // The only time rows get a layer is when they have transparency.
index 6089074..e874adf 100644 (file)
@@ -1520,7 +1520,7 @@ IntRect RenderText::linesVisualOverflowBoundingBox() const
     return rect;
 }
 
-IntRect RenderText::clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer) const
+LayoutRect RenderText::clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer) const
 {
     RenderObject* rendererToRepaint = containingBlock();
 
index 022cbb4..893ef66 100644 (file)
@@ -100,7 +100,7 @@ public:
     virtual LayoutUnit marginLeft() const { return style()->marginLeft().calcMinValue(0); }
     virtual LayoutUnit marginRight() const { return style()->marginRight().calcMinValue(0); }
 
-    virtual IntRect clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer) const;
+    virtual LayoutRect clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer) const;
 
     InlineTextBox* firstTextBox() const { return m_firstTextBox; }
     InlineTextBox* lastTextBox() const { return m_lastTextBox; }