Index: Source/core/rendering/RenderObject.cpp |
diff --git a/Source/core/rendering/RenderObject.cpp b/Source/core/rendering/RenderObject.cpp |
index 336efebfd33999b7f863d51446c583ff5476e64b..8d2b45f8afe5275fa503a80f9da07f5f3e087cdf 100644 |
--- a/Source/core/rendering/RenderObject.cpp |
+++ b/Source/core/rendering/RenderObject.cpp |
@@ -1411,14 +1411,9 @@ static PassRefPtr<JSONValue> jsonObjectForRepaintInfo(const IntRect& rect, const |
return object.release(); |
} |
-LayoutRect RenderObject::computeRepaintRect() const |
+LayoutRect RenderObject::computeRepaintRect(const RenderLayerModelObject* repaintContainer) const |
{ |
- return computeRepaintRectInternal(containerForRepaint()); |
-} |
- |
-LayoutRect RenderObject::computeRepaintRectInternal(const RenderLayerModelObject* repaintContainer) const |
-{ |
- return clippedOverflowRectForRepaint(repaintContainer); |
+ return clippedOverflowRectForRepaint(repaintContainer ? repaintContainer: containerForRepaint()); |
leviw_travelin_and_unemployed
2014/05/29 18:27:08
I don't really want this ternary to exist, but you
chrishtr
2014/05/29 18:34:11
Done.
|
} |
void RenderObject::repaintUsingContainer(const RenderLayerModelObject* repaintContainer, const IntRect& r, InvalidationReason invalidationReason) const |
@@ -1485,7 +1480,15 @@ void RenderObject::repaint() const |
// Until those states are fully fledged, I'll just disable the ASSERTS. |
DisableCompositingQueryAsserts disabler; |
const RenderLayerModelObject* repaintContainer = containerForRepaint(); |
- repaintUsingContainer(repaintContainer, pixelSnappedIntRect(computeRepaintRectInternal(repaintContainer)), InvalidationRepaint); |
+ LayoutRect repaintRect = boundsRectForRepaint(repaintContainer); |
leviw_travelin_and_unemployed
2014/05/29 18:27:08
Why add the local?
|
+ repaintUsingContainer(repaintContainer, pixelSnappedIntRect(repaintRect), InvalidationRepaint); |
+} |
+ |
+LayoutRect RenderObject::boundsRectForRepaint(const RenderLayerModelObject* repaintContainer) const |
+{ |
+ if (hasLayer()) |
+ return toRenderLayerModelObject(this)->layer()->computeRepaintRect(repaintContainer); |
+ return computeRepaintRect(repaintContainer); |
} |
void RenderObject::repaintRectangle(const LayoutRect& r) const |
@@ -1505,7 +1508,10 @@ void RenderObject::repaintRectangle(const LayoutRect& r) const |
} |
const RenderLayerModelObject* repaintContainer = containerForRepaint(); |
- computeRectForRepaint(repaintContainer, dirtyRect); |
+ if (hasLayer()) |
+ toRenderLayerModelObject(this)->layer()->computeRectForRepaint(repaintContainer, dirtyRect); |
+ else |
+ computeRectForRepaint(repaintContainer, dirtyRect); |
repaintUsingContainer(repaintContainer, pixelSnappedIntRect(dirtyRect), InvalidationRepaintRectangle); |
} |