Index: Source/core/rendering/RenderObject.cpp |
diff --git a/Source/core/rendering/RenderObject.cpp b/Source/core/rendering/RenderObject.cpp |
index e3194e45b26745dd218c97f50ab36e264aaa7441..2b2c1943f75e9bf66b314802bdc7a2f4741e18c3 100644 |
--- a/Source/core/rendering/RenderObject.cpp |
+++ b/Source/core/rendering/RenderObject.cpp |
@@ -1304,7 +1304,7 @@ void RenderObject::addChildFocusRingRects(Vector<IntRect>& rects, const LayoutPo |
} |
// FIXME: In repaint-after-layout, we should be able to change the logic to remove the need for this function. See crbug.com/368416. |
-LayoutPoint RenderObject::positionFromPaintInvalidationContainer(const RenderLayerModelObject* paintInvalidationContainer) const |
+LayoutPoint RenderObject::positionFromPaintInvalidationContainer(const RenderLayerModelObject* paintInvalidationContainer, const InvalidationTreeWalkState* invalidationTreeWalkState) const |
{ |
// FIXME: This assert should be re-enabled when we move paint invalidation to after compositing update. crbug.com/360286 |
// ASSERT(containerForPaintInvalidation() == paintInvalidationContainer); |
@@ -1313,7 +1313,7 @@ LayoutPoint RenderObject::positionFromPaintInvalidationContainer(const RenderLay |
if (paintInvalidationContainer == this) |
return offset; |
- return roundedIntPoint(localToContainerPoint(offset, paintInvalidationContainer)); |
+ return roundedIntPoint(localToContainerPoint(offset, paintInvalidationContainer, 0, 0, invalidationTreeWalkState)); |
} |
IntRect RenderObject::absoluteBoundingBoxRect() const |
@@ -1459,9 +1459,9 @@ static PassRefPtr<TraceEvent::ConvertableToTraceFormat> jsonObjectForPaintInvali |
return value.finish(); |
} |
-LayoutRect RenderObject::computePaintInvalidationRect(const RenderLayerModelObject* paintInvalidationContainer) const |
+LayoutRect RenderObject::computePaintInvalidationRect(const RenderLayerModelObject* paintInvalidationContainer, const InvalidationTreeWalkState* invalidationTreeWalkState) const |
{ |
- return clippedOverflowRectForPaintInvalidation(paintInvalidationContainer); |
+ return clippedOverflowRectForPaintInvalidation(paintInvalidationContainer, invalidationTreeWalkState); |
} |
void RenderObject::invalidatePaintUsingContainer(const RenderLayerModelObject* paintInvalidationContainer, const IntRect& r, InvalidationReason invalidationReason) const |
@@ -1520,11 +1520,11 @@ void RenderObject::paintInvalidationForWholeRenderer() const |
invalidatePaintUsingContainer(paintInvalidationContainer, pixelSnappedIntRect(paintInvalidationRect), InvalidationPaint); |
} |
-LayoutRect RenderObject::boundsRectForPaintInvalidation(const RenderLayerModelObject* paintInvalidationContainer) const |
+LayoutRect RenderObject::boundsRectForPaintInvalidation(const RenderLayerModelObject* paintInvalidationContainer, const InvalidationTreeWalkState* invalidationTreeWalkState) const |
{ |
if (!paintInvalidationContainer) |
- return computePaintInvalidationRect(paintInvalidationContainer); |
- return RenderLayer::computePaintInvalidationRect(this, paintInvalidationContainer->layer()); |
+ return computePaintInvalidationRect(paintInvalidationContainer, invalidationTreeWalkState); |
+ return RenderLayer::computePaintInvalidationRect(this, paintInvalidationContainer->layer(), invalidationTreeWalkState); |
} |
void RenderObject::invalidatePaintRectangle(const LayoutRect& r) const |
@@ -1581,7 +1581,7 @@ const char* RenderObject::invalidationReasonToString(InvalidationReason reason) |
return ""; |
} |
-void RenderObject::invalidateTreeAfterLayout(const RenderLayerModelObject& paintInvalidationContainer) |
+void RenderObject::invalidateTreeAfterLayout(const InvalidationTreeWalkState& invalidationTreeWalkState) |
{ |
// If we didn't need paint invalidation then our children don't need as well. |
// Skip walking down the tree as everything should be fine below us. |
@@ -1592,7 +1592,7 @@ void RenderObject::invalidateTreeAfterLayout(const RenderLayerModelObject& paint |
for (RenderObject* child = slowFirstChild(); child; child = child->nextSibling()) { |
if (!child->isOutOfFlowPositioned()) |
- child->invalidateTreeAfterLayout(paintInvalidationContainer); |
+ child->invalidateTreeAfterLayout(invalidationTreeWalkState); |
} |
} |
@@ -1710,20 +1710,20 @@ bool RenderObject::checkForPaintInvalidation() const |
return !document().view()->needsFullPaintInvalidation() && everHadLayout(); |
} |
-LayoutRect RenderObject::rectWithOutlineForPaintInvalidation(const RenderLayerModelObject* paintInvalidationContainer, LayoutUnit outlineWidth) const |
+LayoutRect RenderObject::rectWithOutlineForPaintInvalidation(const RenderLayerModelObject* paintInvalidationContainer, LayoutUnit outlineWidth, const InvalidationTreeWalkState* invalidationTreeWalkState) const |
{ |
- LayoutRect r(clippedOverflowRectForPaintInvalidation(paintInvalidationContainer)); |
+ LayoutRect r(clippedOverflowRectForPaintInvalidation(paintInvalidationContainer, invalidationTreeWalkState)); |
r.inflate(outlineWidth); |
return r; |
} |
-LayoutRect RenderObject::clippedOverflowRectForPaintInvalidation(const RenderLayerModelObject*) const |
+LayoutRect RenderObject::clippedOverflowRectForPaintInvalidation(const RenderLayerModelObject*, const InvalidationTreeWalkState*) const |
{ |
ASSERT_NOT_REACHED(); |
return LayoutRect(); |
} |
-void RenderObject::mapRectToPaintInvalidationBacking(const RenderLayerModelObject* paintInvalidationContainer, LayoutRect& rect, bool fixed) const |
+void RenderObject::mapRectToPaintInvalidationBacking(const RenderLayerModelObject* paintInvalidationContainer, LayoutRect& rect, bool fixed, const InvalidationTreeWalkState* invalidationTreeWalkState) const |
{ |
if (paintInvalidationContainer == this) |
return; |
@@ -1742,11 +1742,11 @@ void RenderObject::mapRectToPaintInvalidationBacking(const RenderLayerModelObjec |
return; |
} |
- o->mapRectToPaintInvalidationBacking(paintInvalidationContainer, rect, fixed); |
+ o->mapRectToPaintInvalidationBacking(paintInvalidationContainer, rect, fixed, invalidationTreeWalkState); |
} |
} |
-void RenderObject::computeFloatRectForPaintInvalidation(const RenderLayerModelObject*, FloatRect&, bool) const |
+void RenderObject::computeFloatRectForPaintInvalidation(const RenderLayerModelObject*, FloatRect&, bool, const InvalidationTreeWalkState*) const |
{ |
ASSERT_NOT_REACHED(); |
} |
@@ -2303,7 +2303,7 @@ FloatQuad RenderObject::absoluteToLocalQuad(const FloatQuad& quad, MapCoordinate |
return transformState.lastPlanarQuad(); |
} |
-void RenderObject::mapLocalToContainer(const RenderLayerModelObject* paintInvalidationContainer, TransformState& transformState, MapCoordinatesFlags mode, bool* wasFixed) const |
+void RenderObject::mapLocalToContainer(const RenderLayerModelObject* paintInvalidationContainer, TransformState& transformState, MapCoordinatesFlags mode, bool* wasFixed, const InvalidationTreeWalkState* invalidationTreeWalkState) const |
{ |
if (paintInvalidationContainer == this) |
return; |
@@ -2325,7 +2325,7 @@ void RenderObject::mapLocalToContainer(const RenderLayerModelObject* paintInvali |
if (o->hasOverflowClip()) |
transformState.move(-toRenderBox(o)->scrolledContentOffset()); |
- o->mapLocalToContainer(paintInvalidationContainer, transformState, mode, wasFixed); |
+ o->mapLocalToContainer(paintInvalidationContainer, transformState, mode, wasFixed, invalidationTreeWalkState); |
} |
const RenderObject* RenderObject::pushMappingToContainer(const RenderLayerModelObject* ancestorToStopAt, RenderGeometryMap& geometryMap) const |
@@ -2396,10 +2396,10 @@ FloatQuad RenderObject::localToContainerQuad(const FloatQuad& localQuad, const R |
return transformState.lastPlanarQuad(); |
} |
-FloatPoint RenderObject::localToContainerPoint(const FloatPoint& localPoint, const RenderLayerModelObject* paintInvalidationContainer, MapCoordinatesFlags mode, bool* wasFixed) const |
+FloatPoint RenderObject::localToContainerPoint(const FloatPoint& localPoint, const RenderLayerModelObject* paintInvalidationContainer, MapCoordinatesFlags mode, bool* wasFixed, const InvalidationTreeWalkState* invalidationTreeWalkState) const |
{ |
TransformState transformState(TransformState::ApplyTransformDirection, localPoint); |
- mapLocalToContainer(paintInvalidationContainer, transformState, mode | ApplyContainerFlip | UseTransforms, wasFixed); |
+ mapLocalToContainer(paintInvalidationContainer, transformState, mode | ApplyContainerFlip | UseTransforms, wasFixed, invalidationTreeWalkState); |
transformState.flatten(); |
return transformState.lastPlanarPoint(); |