Title: [190685] trunk/Source/WebCore
Revision
190685
Author
[email protected]
Date
2015-10-07 14:14:16 -0700 (Wed, 07 Oct 2015)

Log Message

RenderObject::computeRectForRepaint/computeFloatRectForRepaint should return the computed rectangle.
https://bugs.webkit.org/show_bug.cgi?id=149883

Reviewed by Simon Fraser.

Reduces code complexity at the calling sites.

No change in functionality.

* rendering/RenderBox.cpp:
(WebCore::RenderBox::clippedOverflowRectForRepaint):
(WebCore::RenderBox::computeRectForRepaint):
* rendering/RenderBox.h:
* rendering/RenderInline.cpp:
(WebCore::RenderInline::clippedOverflowRectForRepaint):
(WebCore::RenderInline::computeRectForRepaint):
* rendering/RenderInline.h:
* rendering/RenderListMarker.cpp:
(WebCore::RenderListMarker::selectionRectForRepaint):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::repaintRectangle):
(WebCore::RenderObject::computeRectForRepaint):
(WebCore::RenderObject::computeFloatRectForRepaint):
* rendering/RenderObject.h:
(WebCore::RenderObject::computeAbsoluteRepaintRect):
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::selectionRectForRepaint):
(WebCore::RenderReplaced::clippedOverflowRectForRepaint):
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::clippedOverflowRectForRepaint):
(WebCore::RenderTableCell::computeRectForRepaint):
* rendering/RenderTableCell.h:
* rendering/RenderText.cpp:
(WebCore::RenderText::collectSelectionRectsForLineBoxes):
* rendering/RenderView.cpp:
(WebCore::RenderView::computeRectForRepaint):
* rendering/RenderView.h:
* rendering/svg/RenderSVGForeignObject.cpp:
(WebCore::RenderSVGForeignObject::computeFloatRectForRepaint):
(WebCore::RenderSVGForeignObject::computeRectForRepaint):
* rendering/svg/RenderSVGForeignObject.h:
* rendering/svg/RenderSVGInline.cpp:
(WebCore::RenderSVGInline::computeFloatRectForRepaint):
* rendering/svg/RenderSVGInline.h:
* rendering/svg/RenderSVGModelObject.cpp:
(WebCore::RenderSVGModelObject::computeFloatRectForRepaint):
* rendering/svg/RenderSVGModelObject.h:
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::computeFloatRectForRepaint):
* rendering/svg/RenderSVGRoot.h:
* rendering/svg/RenderSVGText.cpp:
(WebCore::RenderSVGText::computeRectForRepaint):
(WebCore::RenderSVGText::computeFloatRectForRepaint):
* rendering/svg/RenderSVGText.h:
* rendering/svg/SVGRenderSupport.cpp:
(WebCore::SVGRenderSupport::clippedOverflowRectForRepaint):
(WebCore::SVGRenderSupport::computeFloatRectForRepaint):
* rendering/svg/SVGRenderSupport.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (190684 => 190685)


--- trunk/Source/WebCore/ChangeLog	2015-10-07 21:12:15 UTC (rev 190684)
+++ trunk/Source/WebCore/ChangeLog	2015-10-07 21:14:16 UTC (rev 190685)
@@ -1,3 +1,64 @@
+2015-10-07  Zalan Bujtas  <[email protected]>
+
+        RenderObject::computeRectForRepaint/computeFloatRectForRepaint should return the computed rectangle.
+        https://bugs.webkit.org/show_bug.cgi?id=149883
+
+        Reviewed by Simon Fraser.
+
+        Reduces code complexity at the calling sites.
+ 
+        No change in functionality.
+
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::clippedOverflowRectForRepaint):
+        (WebCore::RenderBox::computeRectForRepaint):
+        * rendering/RenderBox.h:
+        * rendering/RenderInline.cpp:
+        (WebCore::RenderInline::clippedOverflowRectForRepaint):
+        (WebCore::RenderInline::computeRectForRepaint):
+        * rendering/RenderInline.h:
+        * rendering/RenderListMarker.cpp:
+        (WebCore::RenderListMarker::selectionRectForRepaint):
+        * rendering/RenderObject.cpp:
+        (WebCore::RenderObject::repaintRectangle):
+        (WebCore::RenderObject::computeRectForRepaint):
+        (WebCore::RenderObject::computeFloatRectForRepaint):
+        * rendering/RenderObject.h:
+        (WebCore::RenderObject::computeAbsoluteRepaintRect):
+        * rendering/RenderReplaced.cpp:
+        (WebCore::RenderReplaced::selectionRectForRepaint):
+        (WebCore::RenderReplaced::clippedOverflowRectForRepaint):
+        * rendering/RenderTableCell.cpp:
+        (WebCore::RenderTableCell::clippedOverflowRectForRepaint):
+        (WebCore::RenderTableCell::computeRectForRepaint):
+        * rendering/RenderTableCell.h:
+        * rendering/RenderText.cpp:
+        (WebCore::RenderText::collectSelectionRectsForLineBoxes):
+        * rendering/RenderView.cpp:
+        (WebCore::RenderView::computeRectForRepaint):
+        * rendering/RenderView.h:
+        * rendering/svg/RenderSVGForeignObject.cpp:
+        (WebCore::RenderSVGForeignObject::computeFloatRectForRepaint):
+        (WebCore::RenderSVGForeignObject::computeRectForRepaint):
+        * rendering/svg/RenderSVGForeignObject.h:
+        * rendering/svg/RenderSVGInline.cpp:
+        (WebCore::RenderSVGInline::computeFloatRectForRepaint):
+        * rendering/svg/RenderSVGInline.h:
+        * rendering/svg/RenderSVGModelObject.cpp:
+        (WebCore::RenderSVGModelObject::computeFloatRectForRepaint):
+        * rendering/svg/RenderSVGModelObject.h:
+        * rendering/svg/RenderSVGRoot.cpp:
+        (WebCore::RenderSVGRoot::computeFloatRectForRepaint):
+        * rendering/svg/RenderSVGRoot.h:
+        * rendering/svg/RenderSVGText.cpp:
+        (WebCore::RenderSVGText::computeRectForRepaint):
+        (WebCore::RenderSVGText::computeFloatRectForRepaint):
+        * rendering/svg/RenderSVGText.h:
+        * rendering/svg/SVGRenderSupport.cpp:
+        (WebCore::SVGRenderSupport::clippedOverflowRectForRepaint):
+        (WebCore::SVGRenderSupport::computeFloatRectForRepaint):
+        * rendering/svg/SVGRenderSupport.h:
+
 2015-10-07  Antti Koivisto  <[email protected]>
 
         Implement :host pseudo class

Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (190684 => 190685)


--- trunk/Source/WebCore/rendering/RenderBox.cpp	2015-10-07 21:12:15 UTC (rev 190684)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp	2015-10-07 21:14:16 UTC (rev 190685)
@@ -2141,9 +2141,7 @@
     // that projects outside of our overflowRect.
     ASSERT(style().outlineSize() <= view().maximalOutlineSize());
     r.inflate(view().maximalOutlineSize());
-    
-    computeRectForRepaint(repaintContainer, r);
-    return r;
+    return computeRectForRepaint(r, repaintContainer);
 }
 
 static inline bool shouldApplyContainersClipAndOffset(const RenderLayerModelObject* repaintContainer, RenderBox* containerBox)
@@ -2160,7 +2158,7 @@
 #endif
 }
 
-void RenderBox::computeRectForRepaint(const RenderLayerModelObject* repaintContainer, LayoutRect& rect, bool fixed) const
+LayoutRect RenderBox::computeRectForRepaint(const LayoutRect& rect, const RenderLayerModelObject* repaintContainer, bool fixed) const
 {
     // The rect we compute at each step is shifted by our x/y offset in the parent container's coordinate space.
     // Only when we cross a writing mode boundary will we have to possibly flipForWritingMode (to convert into a more appropriate
@@ -2170,38 +2168,39 @@
     // RenderView::computeRectForRepaint then converts the rect to physical coordinates.  We also convert to
     // physical when we hit a repaintContainer boundary.  Therefore the final rect returned is always in the
     // physical coordinate space of the repaintContainer.
+    LayoutRect adjustedRect = rect;
     const RenderStyle& styleToUse = style();
     // LayoutState is only valid for root-relative, non-fixed position repainting
     if (view().layoutStateEnabled() && !repaintContainer && styleToUse.position() != FixedPosition) {
         LayoutState* layoutState = view().layoutState();
 
         if (layer() && layer()->transform())
-            rect = LayoutRect(encloseRectToDevicePixels(layer()->transform()->mapRect(rect), document().deviceScaleFactor()));
+            adjustedRect = LayoutRect(encloseRectToDevicePixels(layer()->transform()->mapRect(adjustedRect), document().deviceScaleFactor()));
 
         // We can't trust the bits on RenderObject, because this might be called while re-resolving style.
         if (styleToUse.hasInFlowPosition() && layer())
-            rect.move(layer()->offsetForInFlowPosition());
+            adjustedRect.move(layer()->offsetForInFlowPosition());
 
-        rect.moveBy(location());
-        rect.move(layoutState->m_paintOffset);
+        adjustedRect.moveBy(location());
+        adjustedRect.move(layoutState->m_paintOffset);
         if (layoutState->m_clipped)
-            rect.intersect(layoutState->m_clipRect);
-        return;
+            adjustedRect.intersect(layoutState->m_clipRect);
+        return adjustedRect;
     }
 
     if (hasReflection())
-        rect.unite(reflectedRect(rect));
+        adjustedRect.unite(reflectedRect(adjustedRect));
 
     if (repaintContainer == this) {
         if (repaintContainer->style().isFlippedBlocksWritingMode())
-            flipForWritingMode(rect);
-        return;
+            flipForWritingMode(adjustedRect);
+        return adjustedRect;
     }
 
     bool containerSkipped;
     auto* renderer = container(repaintContainer, &containerSkipped);
     if (!renderer)
-        return;
+        return adjustedRect;
     
     EPosition position = styleToUse.position();
 
@@ -2216,28 +2215,28 @@
         RenderRegion* firstRegion = nullptr;
         RenderRegion* lastRegion = nullptr;
         if (downcast<RenderFlowThread>(*renderer).getRegionRangeForBox(this, firstRegion, lastRegion))
-            rect.moveBy(firstRegion->flowThreadPortionRect().location());
+            adjustedRect.moveBy(firstRegion->flowThreadPortionRect().location());
     }
 
     if (isWritingModeRoot() && !isOutOfFlowPositioned())
-        flipForWritingMode(rect);
+        flipForWritingMode(adjustedRect);
 
     LayoutSize locationOffset = this->locationOffset();
     // FIXME: This is needed as long as RenderWidget snaps to integral size/position.
     if (isRenderReplaced() && isWidget()) {
         LayoutSize flooredLocationOffset = toIntSize(flooredIntPoint(locationOffset));
-        rect.expand(locationOffset - flooredLocationOffset);
+        adjustedRect.expand(locationOffset - flooredLocationOffset);
         locationOffset = flooredLocationOffset;
     }
-    LayoutPoint topLeft = rect.location();
+    LayoutPoint topLeft = adjustedRect.location();
     topLeft.move(locationOffset);
 
     // We are now in our parent container's coordinate space. Apply our transform to obtain a bounding box
     // in the parent's coordinate space that encloses us.
     if (hasLayer() && layer()->transform()) {
         fixed = position == FixedPosition;
-        rect = LayoutRect(encloseRectToDevicePixels(layer()->transform()->mapRect(rect), document().deviceScaleFactor()));
-        topLeft = rect.location();
+        adjustedRect = LayoutRect(encloseRectToDevicePixels(layer()->transform()->mapRect(adjustedRect), document().deviceScaleFactor()));
+        topLeft = adjustedRect.location();
         topLeft.move(locationOffset);
     } else if (position == FixedPosition)
         fixed = true;
@@ -2254,24 +2253,23 @@
 
     // FIXME: We ignore the lightweight clipping rect that controls use, since if |o| is in mid-layout,
     // its controlClipRect will be wrong. For overflow clip we use the values cached by the layer.
-    rect.setLocation(topLeft);
+    adjustedRect.setLocation(topLeft);
     if (renderer->hasOverflowClip()) {
         RenderBox& containerBox = downcast<RenderBox>(*renderer);
         if (shouldApplyContainersClipAndOffset(repaintContainer, &containerBox)) {
-            containerBox.applyCachedClipAndScrollOffsetForRepaint(rect);
-            if (rect.isEmpty())
-                return;
+            containerBox.applyCachedClipAndScrollOffsetForRepaint(adjustedRect);
+            if (adjustedRect.isEmpty())
+                return adjustedRect;
         }
     }
 
     if (containerSkipped) {
         // If the repaintContainer is below o, then we need to map the rect into repaintContainer's coordinates.
         LayoutSize containerOffset = repaintContainer->offsetFromAncestorContainer(*renderer);
-        rect.move(-containerOffset);
-        return;
+        adjustedRect.move(-containerOffset);
+        return adjustedRect;
     }
-
-    renderer->computeRectForRepaint(repaintContainer, rect, fixed);
+    return renderer->computeRectForRepaint(adjustedRect, repaintContainer, fixed);
 }
 
 void RenderBox::repaintDuringLayoutIfMoved(const LayoutRect& oldRect)

Modified: trunk/Source/WebCore/rendering/RenderBox.h (190684 => 190685)


--- trunk/Source/WebCore/rendering/RenderBox.h	2015-10-07 21:12:15 UTC (rev 190684)
+++ trunk/Source/WebCore/rendering/RenderBox.h	2015-10-07 21:14:16 UTC (rev 190685)
@@ -387,7 +387,7 @@
     void deleteLineBoxWrapper();
 
     virtual LayoutRect clippedOverflowRectForRepaint(const RenderLayerModelObject* repaintContainer) const override;
-    virtual void computeRectForRepaint(const RenderLayerModelObject* repaintContainer, LayoutRect&, bool fixed = false) const override;
+    virtual LayoutRect computeRectForRepaint(const LayoutRect&, const RenderLayerModelObject* repaintContainer, bool fixed = false) const override;
     void repaintDuringLayoutIfMoved(const LayoutRect&);
     virtual void repaintOverhangingFloats(bool paintAllDescendants);
 

Modified: trunk/Source/WebCore/rendering/RenderInline.cpp (190684 => 190685)


--- trunk/Source/WebCore/rendering/RenderInline.cpp	2015-10-07 21:12:15 UTC (rev 190684)
+++ trunk/Source/WebCore/rendering/RenderInline.cpp	2015-10-07 21:14:16 UTC (rev 190685)
@@ -1187,7 +1187,7 @@
     if (containingBlock->hasOverflowClip())
         containingBlock->applyCachedClipAndScrollOffsetForRepaint(repaintRect);
 
-    containingBlock->computeRectForRepaint(repaintContainer, repaintRect);
+    repaintRect = containingBlock->computeRectForRepaint(repaintRect, repaintContainer);
 
     if (outlineSize) {
         for (auto& child : childrenOfType<RenderElement>(*this))
@@ -1210,28 +1210,29 @@
     return r;
 }
 
-void RenderInline::computeRectForRepaint(const RenderLayerModelObject* repaintContainer, LayoutRect& rect, bool fixed) const
+LayoutRect RenderInline::computeRectForRepaint(const LayoutRect& rect, const RenderLayerModelObject* repaintContainer, bool fixed) const
 {
     // LayoutState is only valid for root-relative repainting
+    LayoutRect adjustedRect = rect;
     if (view().layoutStateEnabled() && !repaintContainer) {
         LayoutState* layoutState = view().layoutState();
         if (style().hasInFlowPosition() && layer())
-            rect.move(layer()->offsetForInFlowPosition());
-        rect.move(layoutState->m_paintOffset);
+            adjustedRect.move(layer()->offsetForInFlowPosition());
+        adjustedRect.move(layoutState->m_paintOffset);
         if (layoutState->m_clipped)
-            rect.intersect(layoutState->m_clipRect);
-        return;
+            adjustedRect.intersect(layoutState->m_clipRect);
+        return adjustedRect;
     }
 
     if (repaintContainer == this)
-        return;
+        return adjustedRect;
 
     bool containerSkipped;
     RenderElement* container = this->container(repaintContainer, &containerSkipped);
     if (!container)
-        return;
+        return adjustedRect;
 
-    LayoutPoint topLeft = rect.location();
+    LayoutPoint topLeft = adjustedRect.location();
 
     if (style().hasInFlowPosition() && layer()) {
         // Apply the in-flow position offset when invalidating a rectangle. The layer
@@ -1243,21 +1244,20 @@
     
     // FIXME: We ignore the lightweight clipping rect that controls use, since if |o| is in mid-layout,
     // its controlClipRect will be wrong. For overflow clip we use the values cached by the layer.
-    rect.setLocation(topLeft);
+    adjustedRect.setLocation(topLeft);
     if (container->hasOverflowClip()) {
-        downcast<RenderBox>(*container).applyCachedClipAndScrollOffsetForRepaint(rect);
-        if (rect.isEmpty())
-            return;
+        downcast<RenderBox>(*container).applyCachedClipAndScrollOffsetForRepaint(adjustedRect);
+        if (adjustedRect.isEmpty())
+            return adjustedRect;
     }
 
     if (containerSkipped) {
         // If the repaintContainer is below o, then we need to map the rect into repaintContainer's coordinates.
         LayoutSize containerOffset = repaintContainer->offsetFromAncestorContainer(*container);
-        rect.move(-containerOffset);
-        return;
+        adjustedRect.move(-containerOffset);
+        return adjustedRect;
     }
-    
-    container->computeRectForRepaint(repaintContainer, rect, fixed);
+    return container->computeRectForRepaint(adjustedRect, repaintContainer, fixed);
 }
 
 LayoutSize RenderInline::offsetFromContainer(RenderElement& container, const LayoutPoint&, bool* offsetDependsOnPoint) const

Modified: trunk/Source/WebCore/rendering/RenderInline.h (190684 => 190685)


--- trunk/Source/WebCore/rendering/RenderInline.h	2015-10-07 21:12:15 UTC (rev 190684)
+++ trunk/Source/WebCore/rendering/RenderInline.h	2015-10-07 21:14:16 UTC (rev 190685)
@@ -145,7 +145,7 @@
 
     virtual LayoutRect clippedOverflowRectForRepaint(const RenderLayerModelObject* repaintContainer) const override;
     virtual LayoutRect rectWithOutlineForRepaint(const RenderLayerModelObject* repaintContainer, LayoutUnit outlineWidth) const override final;
-    virtual void computeRectForRepaint(const RenderLayerModelObject* repaintContainer, LayoutRect&, bool fixed) const override final;
+    virtual LayoutRect computeRectForRepaint(const LayoutRect&, const RenderLayerModelObject* repaintContainer, bool fixed) const override final;
 
     virtual void mapLocalToContainer(const RenderLayerModelObject* repaintContainer, TransformState&, MapCoordinatesFlags, bool* wasFixed) const override;
     virtual const RenderObject* pushMappingToContainer(const RenderLayerModelObject* ancestorToStopAt, RenderGeometryMap&) const override;

Modified: trunk/Source/WebCore/rendering/RenderListMarker.cpp (190684 => 190685)


--- trunk/Source/WebCore/rendering/RenderListMarker.cpp	2015-10-07 21:12:15 UTC (rev 190684)
+++ trunk/Source/WebCore/rendering/RenderListMarker.cpp	2015-10-07 21:14:16 UTC (rev 190685)
@@ -1894,11 +1894,8 @@
     LayoutRect rect(0, rootBox.selectionTop() - y(), width(), rootBox.selectionHeight());
             
     if (clipToVisibleContent)
-        computeRectForRepaint(repaintContainer, rect);
-    else
-        rect = localToContainerQuad(FloatRect(rect), repaintContainer).enclosingBoundingBox();
-    
-    return rect;
+        return computeRectForRepaint(rect, repaintContainer);
+    return localToContainerQuad(FloatRect(rect), repaintContainer).enclosingBoundingBox();
 }
 
 } // namespace WebCore

Modified: trunk/Source/WebCore/rendering/RenderObject.cpp (190684 => 190685)


--- trunk/Source/WebCore/rendering/RenderObject.cpp	2015-10-07 21:12:15 UTC (rev 190684)
+++ trunk/Source/WebCore/rendering/RenderObject.cpp	2015-10-07 21:14:16 UTC (rev 190685)
@@ -943,8 +943,7 @@
     dirtyRect.move(view.layoutDelta());
 
     RenderLayerModelObject* repaintContainer = containerForRepaint();
-    computeRectForRepaint(repaintContainer, dirtyRect);
-    repaintUsingContainer(repaintContainer ? repaintContainer : &view, dirtyRect, shouldClipToLayer);
+    repaintUsingContainer(repaintContainer ? repaintContainer : &view, computeRectForRepaint(dirtyRect, repaintContainer), shouldClipToLayer);
 }
 
 void RenderObject::repaintSlowRepaintObject() const
@@ -997,25 +996,28 @@
     return LayoutRect();
 }
 
-void RenderObject::computeRectForRepaint(const RenderLayerModelObject* repaintContainer, LayoutRect& rect, bool fixed) const
+LayoutRect RenderObject::computeRectForRepaint(const LayoutRect& rect, const RenderLayerModelObject* repaintContainer, bool fixed) const
 {
     if (repaintContainer == this)
-        return;
+        return rect;
 
-    if (auto* parent = this->parent()) {
-        if (parent->hasOverflowClip()) {
-            downcast<RenderBox>(*parent).applyCachedClipAndScrollOffsetForRepaint(rect);
-            if (rect.isEmpty())
-                return;
-        }
+    auto* parent = this->parent();
+    if (!parent)
+        return rect;
 
-        parent->computeRectForRepaint(repaintContainer, rect, fixed);
+    LayoutRect adjustedRect = rect;
+    if (parent->hasOverflowClip()) {
+        downcast<RenderBox>(*parent).applyCachedClipAndScrollOffsetForRepaint(adjustedRect);
+        if (adjustedRect.isEmpty())
+            return adjustedRect;
     }
+    return parent->computeRectForRepaint(adjustedRect, repaintContainer, fixed);
 }
 
-void RenderObject::computeFloatRectForRepaint(const RenderLayerModelObject*, FloatRect&, bool) const
+FloatRect RenderObject::computeFloatRectForRepaint(const FloatRect&, const RenderLayerModelObject*, bool) const
 {
     ASSERT_NOT_REACHED();
+    return FloatRect();
 }
 
 #if ENABLE(TREE_DEBUGGING)

Modified: trunk/Source/WebCore/rendering/RenderObject.h (190684 => 190685)


--- trunk/Source/WebCore/rendering/RenderObject.h	2015-10-07 21:12:15 UTC (rev 190684)
+++ trunk/Source/WebCore/rendering/RenderObject.h	2015-10-07 21:14:16 UTC (rev 190685)
@@ -731,14 +731,14 @@
 
     // Given a rect in the object's coordinate space, compute a rect suitable for repainting
     // that rect in view coordinates.
-    void computeAbsoluteRepaintRect(LayoutRect& r, bool fixed = false) const
+    LayoutRect computeAbsoluteRepaintRect(const LayoutRect& r, bool fixed = false) const
     {
-        computeRectForRepaint(nullptr, r, fixed);
+        return computeRectForRepaint(r, nullptr, fixed);
     }
     // Given a rect in the object's coordinate space, compute a rect suitable for repainting
     // that rect in the coordinate space of repaintContainer.
-    virtual void computeRectForRepaint(const RenderLayerModelObject* repaintContainer, LayoutRect&, bool fixed = false) const;
-    virtual void computeFloatRectForRepaint(const RenderLayerModelObject* repaintContainer, FloatRect& repaintRect, bool fixed = false) const;
+    virtual LayoutRect computeRectForRepaint(const LayoutRect&, const RenderLayerModelObject* repaintContainer, bool fixed = false) const;
+    virtual FloatRect computeFloatRectForRepaint(const FloatRect&, const RenderLayerModelObject* repaintContainer, bool fixed = false) const;
 
     virtual unsigned int length() const { return 1; }
 

Modified: trunk/Source/WebCore/rendering/RenderReplaced.cpp (190684 => 190685)


--- trunk/Source/WebCore/rendering/RenderReplaced.cpp	2015-10-07 21:12:15 UTC (rev 190684)
+++ trunk/Source/WebCore/rendering/RenderReplaced.cpp	2015-10-07 21:14:16 UTC (rev 190685)
@@ -551,11 +551,8 @@
     
     LayoutRect rect = localSelectionRect();
     if (clipToVisibleContent)
-        computeRectForRepaint(repaintContainer, rect);
-    else
-        rect = localToContainerQuad(FloatRect(rect), repaintContainer).enclosingBoundingBox();
-    
-    return rect;
+        return computeRectForRepaint(rect, repaintContainer);
+    return localToContainerQuad(FloatRect(rect), repaintContainer).enclosingBoundingBox();
 }
 
 LayoutRect RenderReplaced::localSelectionRect(bool checkWhetherSelected) const
@@ -614,15 +611,11 @@
     // The selectionRect can project outside of the overflowRect, so take their union
     // for repainting to avoid selection painting glitches.
     LayoutRect r = unionRect(localSelectionRect(false), visualOverflowRect());
-
     // FIXME: layoutDelta needs to be applied in parts before/after transforms and
     // repaint containers. https://bugs.webkit.org/show_bug.cgi?id=23308
     r.move(view().layoutDelta());
-
     r.inflate(style().outlineSize());
-
-    computeRectForRepaint(repaintContainer, r);
-    return r;
+    return computeRectForRepaint(r, repaintContainer);
 }
 
 }

Modified: trunk/Source/WebCore/rendering/RenderTableCell.cpp (190684 => 190685)


--- trunk/Source/WebCore/rendering/RenderTableCell.cpp	2015-10-07 21:12:15 UTC (rev 190684)
+++ trunk/Source/WebCore/rendering/RenderTableCell.cpp	2015-10-07 21:14:16 UTC (rev 190685)
@@ -384,18 +384,17 @@
     // repaint containers. https://bugs.webkit.org/show_bug.cgi?id=23308
     r.move(view().layoutDelta());
 
-    computeRectForRepaint(repaintContainer, r);
-    return r;
+    return computeRectForRepaint(r, repaintContainer);
 }
 
-void RenderTableCell::computeRectForRepaint(const RenderLayerModelObject* repaintContainer, LayoutRect& r, bool fixed) const
+LayoutRect RenderTableCell::computeRectForRepaint(const LayoutRect& r, const RenderLayerModelObject* repaintContainer, bool fixed) const
 {
     if (repaintContainer == this)
-        return;
-    r.setY(r.y());
+        return r;
+    LayoutRect adjustedRect = r;
     if ((!view().layoutStateEnabled() || repaintContainer) && parent())
-        r.moveBy(-parentBox()->location()); // Rows are in the same coordinate space, so don't add their offset in.
-    RenderBlockFlow::computeRectForRepaint(repaintContainer, r, fixed);
+        adjustedRect.moveBy(-parentBox()->location()); // Rows are in the same coordinate space, so don't add their offset in.
+    return RenderBlockFlow::computeRectForRepaint(adjustedRect, repaintContainer, fixed);
 }
 
 LayoutUnit RenderTableCell::cellBaselinePosition() const

Modified: trunk/Source/WebCore/rendering/RenderTableCell.h (190684 => 190685)


--- trunk/Source/WebCore/rendering/RenderTableCell.h	2015-10-07 21:12:15 UTC (rev 190684)
+++ trunk/Source/WebCore/rendering/RenderTableCell.h	2015-10-07 21:14:16 UTC (rev 190685)
@@ -153,7 +153,7 @@
     virtual bool boxShadowShouldBeAppliedToBackground(const LayoutPoint& paintOffset, BackgroundBleedAvoidance, InlineFlowBox*) const override;
 
     virtual LayoutSize offsetFromContainer(RenderElement&, const LayoutPoint&, bool* offsetDependsOnPoint = 0) const override;
-    virtual void computeRectForRepaint(const RenderLayerModelObject* repaintContainer, LayoutRect&, bool fixed = false) const override;
+    virtual LayoutRect computeRectForRepaint(const LayoutRect&, const RenderLayerModelObject* repaintContainer, bool fixed = false) const override;
 
     int borderHalfLeft(bool outer) const;
     int borderHalfRight(bool outer) const;

Modified: trunk/Source/WebCore/rendering/RenderText.cpp (190684 => 190685)


--- trunk/Source/WebCore/rendering/RenderText.cpp	2015-10-07 21:12:15 UTC (rev 190684)
+++ trunk/Source/WebCore/rendering/RenderText.cpp	2015-10-07 21:14:16 UTC (rev 190685)
@@ -1321,11 +1321,8 @@
     }
 
     if (clipToVisibleContent)
-        computeRectForRepaint(repaintContainer, resultRect);
-    else
-        resultRect = localToContainerQuad(FloatRect(resultRect), repaintContainer).enclosingBoundingBox();
-
-    return resultRect;
+        return computeRectForRepaint(resultRect, repaintContainer);
+    return localToContainerQuad(FloatRect(resultRect), repaintContainer).enclosingBoundingBox();
 }
 
 LayoutRect RenderText::collectSelectionRectsForLineBoxes(const RenderLayerModelObject* repaintContainer, bool clipToVisibleContent, Vector<LayoutRect>& rects)

Modified: trunk/Source/WebCore/rendering/RenderView.cpp (190684 => 190685)


--- trunk/Source/WebCore/rendering/RenderView.cpp	2015-10-07 21:12:15 UTC (rev 190684)
+++ trunk/Source/WebCore/rendering/RenderView.cpp	2015-10-07 21:14:16 UTC (rev 190685)
@@ -696,35 +696,37 @@
     return RenderBlockFlow::visualOverflowRect();
 }
 
-void RenderView::computeRectForRepaint(const RenderLayerModelObject* repaintContainer, LayoutRect& rect, bool fixed) const
+LayoutRect RenderView::computeRectForRepaint(const LayoutRect& rect, const RenderLayerModelObject* repaintContainer, bool fixed) const
 {
     // If a container was specified, and was not nullptr or the RenderView,
     // then we should have found it by now.
     ASSERT_ARG(repaintContainer, !repaintContainer || repaintContainer == this);
 
     if (printing())
-        return;
-
+        return rect;
+    
+    LayoutRect adjustedRect = rect;
     if (style().isFlippedBlocksWritingMode()) {
         // We have to flip by hand since the view's logical height has not been determined.  We
         // can use the viewport width and height.
         if (style().isHorizontalWritingMode())
-            rect.setY(viewHeight() - rect.maxY());
+            adjustedRect.setY(viewHeight() - adjustedRect.maxY());
         else
-            rect.setX(viewWidth() - rect.maxX());
+            adjustedRect.setX(viewWidth() - adjustedRect.maxX());
     }
 
     if (fixed) {
 #if PLATFORM(IOS)
-        rect.move(fixedPositionOffset(frameView()));
+        adjustedRect.move(fixedPositionOffset(frameView()));
 #else
-        rect.move(frameView().scrollOffsetForFixedPosition());
+        adjustedRect.move(frameView().scrollOffsetForFixedPosition());
 #endif
     }
         
     // Apply our transform if we have one (because of full page zooming).
     if (!repaintContainer && layer() && layer()->transform())
-        rect = LayoutRect(layer()->transform()->mapRect(snapRectToDevicePixels(rect, document().deviceScaleFactor())));
+        adjustedRect = LayoutRect(layer()->transform()->mapRect(snapRectToDevicePixels(adjustedRect, document().deviceScaleFactor())));
+    return adjustedRect;
 }
 
 bool RenderView::isScrollableOrRubberbandableBox() const

Modified: trunk/Source/WebCore/rendering/RenderView.h (190684 => 190685)


--- trunk/Source/WebCore/rendering/RenderView.h	2015-10-07 21:12:15 UTC (rev 190684)
+++ trunk/Source/WebCore/rendering/RenderView.h	2015-10-07 21:14:16 UTC (rev 190685)
@@ -76,7 +76,7 @@
     FrameView& frameView() const { return m_frameView; }
 
     virtual LayoutRect visualOverflowRect() const override;
-    virtual void computeRectForRepaint(const RenderLayerModelObject* repaintContainer, LayoutRect&, bool fixed = false) const override;
+    virtual LayoutRect computeRectForRepaint(const LayoutRect&, const RenderLayerModelObject* repaintContainer, bool fixed = false) const override;
     void repaintRootContents();
     void repaintViewRectangle(const LayoutRect&) const;
     void repaintViewAndCompositedLayers();

Modified: trunk/Source/WebCore/rendering/svg/RenderSVGForeignObject.cpp (190684 => 190685)


--- trunk/Source/WebCore/rendering/svg/RenderSVGForeignObject.cpp	2015-10-07 21:12:15 UTC (rev 190684)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGForeignObject.cpp	2015-10-07 21:14:16 UTC (rev 190685)
@@ -98,16 +98,14 @@
     return SVGRenderSupport::clippedOverflowRectForRepaint(*this, repaintContainer);
 }
 
-void RenderSVGForeignObject::computeFloatRectForRepaint(const RenderLayerModelObject* repaintContainer, FloatRect& repaintRect, bool fixed) const
+FloatRect RenderSVGForeignObject::computeFloatRectForRepaint(const FloatRect& repaintRect, const RenderLayerModelObject* repaintContainer, bool fixed) const
 {
-    SVGRenderSupport::computeFloatRectForRepaint(*this, repaintContainer, repaintRect, fixed);
+    return SVGRenderSupport::computeFloatRectForRepaint(*this, repaintRect, repaintContainer, fixed);
 }
 
-void RenderSVGForeignObject::computeRectForRepaint(const RenderLayerModelObject* repaintContainer, LayoutRect& repaintRect, bool fixed) const
+LayoutRect RenderSVGForeignObject::computeRectForRepaint(const LayoutRect& repaintRect, const RenderLayerModelObject* repaintContainer, bool fixed) const
 {
-    FloatRect floatRect(repaintRect);
-    computeFloatRectForRepaint(repaintContainer, floatRect, fixed);
-    repaintRect = enclosingLayoutRect(floatRect);
+    return enclosingLayoutRect(computeFloatRectForRepaint(repaintRect, repaintContainer, fixed));
 }
 
 const AffineTransform& RenderSVGForeignObject::localToParentTransform() const

Modified: trunk/Source/WebCore/rendering/svg/RenderSVGForeignObject.h (190684 => 190685)


--- trunk/Source/WebCore/rendering/svg/RenderSVGForeignObject.h	2015-10-07 21:12:15 UTC (rev 190684)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGForeignObject.h	2015-10-07 21:14:16 UTC (rev 190685)
@@ -40,8 +40,8 @@
     virtual void paint(PaintInfo&, const LayoutPoint&) override;
 
     virtual LayoutRect clippedOverflowRectForRepaint(const RenderLayerModelObject* repaintContainer) const override;
-    virtual void computeFloatRectForRepaint(const RenderLayerModelObject* repaintContainer, FloatRect&, bool fixed = false) const override;
-    virtual void computeRectForRepaint(const RenderLayerModelObject* repaintContainer, LayoutRect&, bool fixed = false) const override;
+    virtual FloatRect computeFloatRectForRepaint(const FloatRect&, const RenderLayerModelObject* repaintContainer, bool fixed = false) const override;
+    virtual LayoutRect computeRectForRepaint(const LayoutRect&, const RenderLayerModelObject* repaintContainer, bool fixed = false) const override;
 
     virtual bool requiresLayer() const override { return false; }
     virtual void layout() override;

Modified: trunk/Source/WebCore/rendering/svg/RenderSVGInline.cpp (190684 => 190685)


--- trunk/Source/WebCore/rendering/svg/RenderSVGInline.cpp	2015-10-07 21:12:15 UTC (rev 190684)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGInline.cpp	2015-10-07 21:14:16 UTC (rev 190685)
@@ -72,9 +72,9 @@
     return SVGRenderSupport::clippedOverflowRectForRepaint(*this, repaintContainer);
 }
 
-void RenderSVGInline::computeFloatRectForRepaint(const RenderLayerModelObject* repaintContainer, FloatRect& repaintRect, bool fixed) const
+FloatRect RenderSVGInline::computeFloatRectForRepaint(const FloatRect& repaintRect, const RenderLayerModelObject* repaintContainer, bool fixed) const
 {
-    SVGRenderSupport::computeFloatRectForRepaint(*this, repaintContainer, repaintRect, fixed);
+    return SVGRenderSupport::computeFloatRectForRepaint(*this, repaintRect, repaintContainer, fixed);
 }
 
 void RenderSVGInline::mapLocalToContainer(const RenderLayerModelObject* repaintContainer, TransformState& transformState, MapCoordinatesFlags, bool* wasFixed) const

Modified: trunk/Source/WebCore/rendering/svg/RenderSVGInline.h (190684 => 190685)


--- trunk/Source/WebCore/rendering/svg/RenderSVGInline.h	2015-10-07 21:12:15 UTC (rev 190684)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGInline.h	2015-10-07 21:14:16 UTC (rev 190685)
@@ -51,7 +51,7 @@
     virtual FloatRect repaintRectInLocalCoordinates() const override final;
 
     virtual LayoutRect clippedOverflowRectForRepaint(const RenderLayerModelObject* repaintContainer) const override final;
-    virtual void computeFloatRectForRepaint(const RenderLayerModelObject* repaintContainer, FloatRect&, bool fixed = false) const override final;
+    virtual FloatRect computeFloatRectForRepaint(const FloatRect&, const RenderLayerModelObject* repaintContainer, bool fixed = false) const override final;
     virtual void mapLocalToContainer(const RenderLayerModelObject* repaintContainer, TransformState&, MapCoordinatesFlags, bool* wasFixed) const override final;
     virtual const RenderObject* pushMappingToContainer(const RenderLayerModelObject* ancestorToStopAt, RenderGeometryMap&) const override final;
     virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const override final;

Modified: trunk/Source/WebCore/rendering/svg/RenderSVGModelObject.cpp (190684 => 190685)


--- trunk/Source/WebCore/rendering/svg/RenderSVGModelObject.cpp	2015-10-07 21:12:15 UTC (rev 190684)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGModelObject.cpp	2015-10-07 21:14:16 UTC (rev 190685)
@@ -50,9 +50,9 @@
     return SVGRenderSupport::clippedOverflowRectForRepaint(*this, repaintContainer);
 }
 
-void RenderSVGModelObject::computeFloatRectForRepaint(const RenderLayerModelObject* repaintContainer, FloatRect& repaintRect, bool fixed) const
+FloatRect RenderSVGModelObject::computeFloatRectForRepaint(const FloatRect& repaintRect, const RenderLayerModelObject* repaintContainer, bool fixed) const
 {
-    SVGRenderSupport::computeFloatRectForRepaint(*this, repaintContainer, repaintRect, fixed);
+    return SVGRenderSupport::computeFloatRectForRepaint(*this, repaintRect, repaintContainer, fixed);
 }
 
 void RenderSVGModelObject::mapLocalToContainer(const RenderLayerModelObject* repaintContainer, TransformState& transformState, MapCoordinatesFlags, bool* wasFixed) const

Modified: trunk/Source/WebCore/rendering/svg/RenderSVGModelObject.h (190684 => 190685)


--- trunk/Source/WebCore/rendering/svg/RenderSVGModelObject.h	2015-10-07 21:12:15 UTC (rev 190684)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGModelObject.h	2015-10-07 21:14:16 UTC (rev 190685)
@@ -47,7 +47,7 @@
 class RenderSVGModelObject : public RenderElement {
 public:
     virtual LayoutRect clippedOverflowRectForRepaint(const RenderLayerModelObject* repaintContainer) const override;
-    virtual void computeFloatRectForRepaint(const RenderLayerModelObject* repaintContainer, FloatRect&, bool fixed = false) const override final;
+    virtual FloatRect computeFloatRectForRepaint(const FloatRect&, const RenderLayerModelObject* repaintContainer, bool fixed = false) const override final;
     virtual LayoutRect outlineBoundsForRepaint(const RenderLayerModelObject* repaintContainer, const RenderGeometryMap*) const override final;
 
     virtual void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedOffset) const override final;

Modified: trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp (190684 => 190685)


--- trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp	2015-10-07 21:12:15 UTC (rev 190684)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp	2015-10-07 21:14:16 UTC (rev 190685)
@@ -345,30 +345,27 @@
     return SVGRenderSupport::clippedOverflowRectForRepaint(*this, repaintContainer);
 }
 
-void RenderSVGRoot::computeFloatRectForRepaint(const RenderLayerModelObject* repaintContainer, FloatRect& repaintRect, bool fixed) const
+FloatRect RenderSVGRoot::computeFloatRectForRepaint(const FloatRect& repaintRect, const RenderLayerModelObject* repaintContainer, bool fixed) const
 {
     // Apply our local transforms (except for x/y translation), then our shadow, 
     // and then call RenderBox's method to handle all the normal CSS Box model bits
-    repaintRect = m_localToBorderBoxTransform.mapRect(repaintRect);
+    FloatRect adjustedRect = m_localToBorderBoxTransform.mapRect(repaintRect);
 
     const SVGRenderStyle& svgStyle = style().svgStyle();
     if (const ShadowData* shadow = svgStyle.shadow())
-        shadow->adjustRectForShadow(repaintRect);
+        shadow->adjustRectForShadow(adjustedRect);
 
     // Apply initial viewport clip
     if (shouldApplyViewportClip())
-        repaintRect.intersect(snappedIntRect(borderBoxRect()));
+        adjustedRect.intersect(snappedIntRect(borderBoxRect()));
 
     if (m_hasBoxDecorations || hasRenderOverflow()) {
         // The selectionRect can project outside of the overflowRect, so take their union
         // for repainting to avoid selection painting glitches.
         LayoutRect decoratedRepaintRect = unionRect(localSelectionRect(false), visualOverflowRect());
-        repaintRect.unite(decoratedRepaintRect);
+        adjustedRect.unite(decoratedRepaintRect);
     }
-
-    LayoutRect rect = enclosingIntRect(repaintRect);
-    RenderReplaced::computeRectForRepaint(repaintContainer, rect, fixed);
-    repaintRect = rect;
+    return RenderReplaced::computeRectForRepaint(enclosingIntRect(adjustedRect), repaintContainer, fixed);
 }
 
 // This method expects local CSS box coordinates.

Modified: trunk/Source/WebCore/rendering/svg/RenderSVGRoot.h (190684 => 190685)


--- trunk/Source/WebCore/rendering/svg/RenderSVGRoot.h	2015-10-07 21:12:15 UTC (rev 190684)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGRoot.h	2015-10-07 21:14:16 UTC (rev 190685)
@@ -95,7 +95,7 @@
     virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction) override;
 
     virtual LayoutRect clippedOverflowRectForRepaint(const RenderLayerModelObject* repaintContainer) const override;
-    virtual void computeFloatRectForRepaint(const RenderLayerModelObject* repaintContainer, FloatRect& repaintRect, bool fixed) const override;
+    virtual FloatRect computeFloatRectForRepaint(const FloatRect&, const RenderLayerModelObject* repaintContainer, bool fixed) const override;
 
     virtual void mapLocalToContainer(const RenderLayerModelObject* repaintContainer, TransformState&, MapCoordinatesFlags, bool* wasFixed) const override;
     virtual const RenderObject* pushMappingToContainer(const RenderLayerModelObject* ancestorToStopAt, RenderGeometryMap&) const override;

Modified: trunk/Source/WebCore/rendering/svg/RenderSVGText.cpp (190684 => 190685)


--- trunk/Source/WebCore/rendering/svg/RenderSVGText.cpp	2015-10-07 21:12:15 UTC (rev 190684)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGText.cpp	2015-10-07 21:14:16 UTC (rev 190685)
@@ -91,16 +91,14 @@
     return SVGRenderSupport::clippedOverflowRectForRepaint(*this, repaintContainer);
 }
 
-void RenderSVGText::computeRectForRepaint(const RenderLayerModelObject* repaintContainer, LayoutRect& rect, bool fixed) const
+LayoutRect RenderSVGText::computeRectForRepaint(const LayoutRect& rect, const RenderLayerModelObject* repaintContainer, bool fixed) const
 {
-    FloatRect repaintRect = rect;
-    computeFloatRectForRepaint(repaintContainer, repaintRect, fixed);
-    rect = enclosingLayoutRect(repaintRect);
+    return enclosingLayoutRect(computeFloatRectForRepaint(rect, repaintContainer, fixed));
 }
 
-void RenderSVGText::computeFloatRectForRepaint(const RenderLayerModelObject* repaintContainer, FloatRect& repaintRect, bool fixed) const
+FloatRect RenderSVGText::computeFloatRectForRepaint(const FloatRect& repaintRect, const RenderLayerModelObject* repaintContainer, bool fixed) const
 {
-    SVGRenderSupport::computeFloatRectForRepaint(*this, repaintContainer, repaintRect, fixed);
+    return SVGRenderSupport::computeFloatRectForRepaint(*this, repaintRect, repaintContainer, fixed);
 }
 
 void RenderSVGText::mapLocalToContainer(const RenderLayerModelObject* repaintContainer, TransformState& transformState, MapCoordinatesFlags, bool* wasFixed) const

Modified: trunk/Source/WebCore/rendering/svg/RenderSVGText.h (190684 => 190685)


--- trunk/Source/WebCore/rendering/svg/RenderSVGText.h	2015-10-07 21:12:15 UTC (rev 190684)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGText.h	2015-10-07 21:14:16 UTC (rev 190685)
@@ -78,8 +78,8 @@
     virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const override;
 
     virtual LayoutRect clippedOverflowRectForRepaint(const RenderLayerModelObject* repaintContainer) const override;
-    virtual void computeRectForRepaint(const RenderLayerModelObject* repaintContainer, LayoutRect&, bool fixed = false) const override;
-    virtual void computeFloatRectForRepaint(const RenderLayerModelObject* repaintContainer, FloatRect&, bool fixed = false) const override;
+    virtual LayoutRect computeRectForRepaint(const LayoutRect&, const RenderLayerModelObject* repaintContainer, bool fixed = false) const override;
+    virtual FloatRect computeFloatRectForRepaint(const FloatRect&, const RenderLayerModelObject* repaintContainer, bool fixed = false) const override;
 
     virtual void mapLocalToContainer(const RenderLayerModelObject* repaintContainer, TransformState&, MapCoordinatesFlags, bool* wasFixed) const override;
     virtual const RenderObject* pushMappingToContainer(const RenderLayerModelObject* ancestorToStopAt, RenderGeometryMap&) const override;

Modified: trunk/Source/WebCore/rendering/svg/SVGRenderSupport.cpp (190684 => 190685)


--- trunk/Source/WebCore/rendering/svg/SVGRenderSupport.cpp	2015-10-07 21:12:15 UTC (rev 190684)
+++ trunk/Source/WebCore/rendering/svg/SVGRenderSupport.cpp	2015-10-07 21:14:16 UTC (rev 190685)
@@ -67,20 +67,20 @@
     const SVGRenderStyle& svgStyle = renderer.style().svgStyle();
     if (const ShadowData* shadow = svgStyle.shadow())
         shadow->adjustRectForShadow(repaintRect);
-    renderer.computeFloatRectForRepaint(repaintContainer, repaintRect);
-    return enclosingLayoutRect(repaintRect);
+    return enclosingLayoutRect(renderer.computeFloatRectForRepaint(repaintRect, repaintContainer));
 }
 
-void SVGRenderSupport::computeFloatRectForRepaint(const RenderElement& renderer, const RenderLayerModelObject* repaintContainer, FloatRect& repaintRect, bool fixed)
+FloatRect SVGRenderSupport::computeFloatRectForRepaint(const RenderElement& renderer, const FloatRect& repaintRect, const RenderLayerModelObject* repaintContainer, bool fixed)
 {
+    FloatRect adjustedRect = repaintRect;
     const SVGRenderStyle& svgStyle = renderer.style().svgStyle();
     if (const ShadowData* shadow = svgStyle.shadow())
-        shadow->adjustRectForShadow(repaintRect);
-    repaintRect.inflate(renderer.style().outlineWidth());
+        shadow->adjustRectForShadow(adjustedRect);
+    adjustedRect.inflate(renderer.style().outlineWidth());
 
     // Translate to coords in our parent renderer, and then call computeFloatRectForRepaint() on our parent.
-    repaintRect = renderer.localToParentTransform().mapRect(repaintRect);
-    renderer.parent()->computeFloatRectForRepaint(repaintContainer, repaintRect, fixed);
+    adjustedRect = renderer.localToParentTransform().mapRect(adjustedRect);
+    return renderer.parent()->computeFloatRectForRepaint(adjustedRect, repaintContainer, fixed);
 }
 
 const RenderElement& SVGRenderSupport::localToParentTransform(const RenderElement& renderer, AffineTransform &transform)

Modified: trunk/Source/WebCore/rendering/svg/SVGRenderSupport.h (190684 => 190685)


--- trunk/Source/WebCore/rendering/svg/SVGRenderSupport.h	2015-10-07 21:12:15 UTC (rev 190684)
+++ trunk/Source/WebCore/rendering/svg/SVGRenderSupport.h	2015-10-07 21:14:16 UTC (rev 190685)
@@ -67,7 +67,7 @@
     // Important functions used by nearly all SVG renderers centralizing coordinate transformations / repaint rect calculations
     static FloatRect repaintRectForRendererInLocalCoordinatesExcludingSVGShadow(const RenderElement&);
     static LayoutRect clippedOverflowRectForRepaint(const RenderElement&, const RenderLayerModelObject* repaintContainer);
-    static void computeFloatRectForRepaint(const RenderElement&, const RenderLayerModelObject* repaintContainer, FloatRect&, bool fixed);
+    static FloatRect computeFloatRectForRepaint(const RenderElement&, const FloatRect&, const RenderLayerModelObject* repaintContainer, bool fixed);
     static const RenderElement& localToParentTransform(const RenderElement&, AffineTransform &);
     static void mapLocalToContainer(const RenderElement&, const RenderLayerModelObject* repaintContainer, TransformState&, bool* wasFixed);
     static const RenderElement* pushMappingToContainer(const RenderElement&, const RenderLayerModelObject* ancestorToStopAt, RenderGeometryMap&);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to