| Index: Source/core/rendering/RenderObject.cpp
|
| diff --git a/Source/core/rendering/RenderObject.cpp b/Source/core/rendering/RenderObject.cpp
|
| index 290e8647180f67e079c96ed66173f4eda51ea773..771e0ad4203c7647046241075c2810411ae9ddcd 100644
|
| --- a/Source/core/rendering/RenderObject.cpp
|
| +++ b/Source/core/rendering/RenderObject.cpp
|
| @@ -1319,7 +1319,7 @@
|
| }
|
|
|
| // 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 PaintInvalidationState* paintInvalidationState) const
|
| {
|
| // FIXME: This assert should be re-enabled when we move paint invalidation to after compositing update. crbug.com/360286
|
| // ASSERT(containerForPaintInvalidation() == paintInvalidationContainer);
|
| @@ -1328,7 +1328,7 @@
|
| if (paintInvalidationContainer == this)
|
| return offset;
|
|
|
| - return roundedIntPoint(localToContainerPoint(offset, paintInvalidationContainer));
|
| + return roundedIntPoint(localToContainerPoint(offset, paintInvalidationContainer, 0, 0, paintInvalidationState));
|
| }
|
|
|
| IntRect RenderObject::absoluteBoundingBoxRect() const
|
| @@ -1474,9 +1474,9 @@
|
| return value.finish();
|
| }
|
|
|
| -LayoutRect RenderObject::computePaintInvalidationRect(const RenderLayerModelObject* paintInvalidationContainer) const
|
| -{
|
| - return clippedOverflowRectForPaintInvalidation(paintInvalidationContainer);
|
| +LayoutRect RenderObject::computePaintInvalidationRect(const RenderLayerModelObject* paintInvalidationContainer, const PaintInvalidationState* paintInvalidationState) const
|
| +{
|
| + return clippedOverflowRectForPaintInvalidation(paintInvalidationContainer, paintInvalidationState);
|
| }
|
|
|
| void RenderObject::invalidatePaintUsingContainer(const RenderLayerModelObject* paintInvalidationContainer, const LayoutRect& r, InvalidationReason invalidationReason) const
|
| @@ -1535,11 +1535,11 @@
|
| invalidatePaintUsingContainer(paintInvalidationContainer, paintInvalidationRect, InvalidationPaint);
|
| }
|
|
|
| -LayoutRect RenderObject::boundsRectForPaintInvalidation(const RenderLayerModelObject* paintInvalidationContainer) const
|
| +LayoutRect RenderObject::boundsRectForPaintInvalidation(const RenderLayerModelObject* paintInvalidationContainer, const PaintInvalidationState* paintInvalidationState) const
|
| {
|
| if (!paintInvalidationContainer)
|
| - return computePaintInvalidationRect(paintInvalidationContainer);
|
| - return RenderLayer::computePaintInvalidationRect(this, paintInvalidationContainer->layer());
|
| + return computePaintInvalidationRect(paintInvalidationContainer, paintInvalidationState);
|
| + return RenderLayer::computePaintInvalidationRect(this, paintInvalidationContainer->layer(), paintInvalidationState);
|
| }
|
|
|
| void RenderObject::invalidatePaintRectangle(const LayoutRect& r) const
|
| @@ -1596,7 +1596,7 @@
|
| return "";
|
| }
|
|
|
| -void RenderObject::invalidateTreeAfterLayout(const RenderLayerModelObject& paintInvalidationContainer)
|
| +void RenderObject::invalidateTreeAfterLayout(const PaintInvalidationState& paintInvalidationState)
|
| {
|
| // 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.
|
| @@ -1607,7 +1607,7 @@
|
|
|
| for (RenderObject* child = slowFirstChild(); child; child = child->nextSibling()) {
|
| if (!child->isOutOfFlowPositioned())
|
| - child->invalidateTreeAfterLayout(paintInvalidationContainer);
|
| + child->invalidateTreeAfterLayout(paintInvalidationState);
|
| }
|
| }
|
|
|
| @@ -1730,20 +1730,20 @@
|
| return !document().view()->needsFullPaintInvalidation() && everHadLayout();
|
| }
|
|
|
| -LayoutRect RenderObject::rectWithOutlineForPaintInvalidation(const RenderLayerModelObject* paintInvalidationContainer, LayoutUnit outlineWidth) const
|
| -{
|
| - LayoutRect r(clippedOverflowRectForPaintInvalidation(paintInvalidationContainer));
|
| +LayoutRect RenderObject::rectWithOutlineForPaintInvalidation(const RenderLayerModelObject* paintInvalidationContainer, LayoutUnit outlineWidth, const PaintInvalidationState* paintInvalidationState) const
|
| +{
|
| + LayoutRect r(clippedOverflowRectForPaintInvalidation(paintInvalidationContainer, paintInvalidationState));
|
| r.inflate(outlineWidth);
|
| return r;
|
| }
|
|
|
| -LayoutRect RenderObject::clippedOverflowRectForPaintInvalidation(const RenderLayerModelObject*) const
|
| +LayoutRect RenderObject::clippedOverflowRectForPaintInvalidation(const RenderLayerModelObject*, const PaintInvalidationState*) 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 PaintInvalidationState* paintInvalidationState) const
|
| {
|
| if (paintInvalidationContainer == this)
|
| return;
|
| @@ -1762,11 +1762,11 @@
|
| return;
|
| }
|
|
|
| - o->mapRectToPaintInvalidationBacking(paintInvalidationContainer, rect, fixed);
|
| - }
|
| -}
|
| -
|
| -void RenderObject::computeFloatRectForPaintInvalidation(const RenderLayerModelObject*, FloatRect&, bool) const
|
| + o->mapRectToPaintInvalidationBacking(paintInvalidationContainer, rect, fixed, paintInvalidationState);
|
| + }
|
| +}
|
| +
|
| +void RenderObject::computeFloatRectForPaintInvalidation(const RenderLayerModelObject*, FloatRect&, bool, const PaintInvalidationState*) const
|
| {
|
| ASSERT_NOT_REACHED();
|
| }
|
| @@ -2316,7 +2316,7 @@
|
| 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 PaintInvalidationState* paintInvalidationState) const
|
| {
|
| if (paintInvalidationContainer == this)
|
| return;
|
| @@ -2338,7 +2338,7 @@
|
| if (o->hasOverflowClip())
|
| transformState.move(-toRenderBox(o)->scrolledContentOffset());
|
|
|
| - o->mapLocalToContainer(paintInvalidationContainer, transformState, mode, wasFixed);
|
| + o->mapLocalToContainer(paintInvalidationContainer, transformState, mode, wasFixed, paintInvalidationState);
|
| }
|
|
|
| const RenderObject* RenderObject::pushMappingToContainer(const RenderLayerModelObject* ancestorToStopAt, RenderGeometryMap& geometryMap) const
|
| @@ -2409,10 +2409,10 @@
|
| 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 PaintInvalidationState* paintInvalidationState) const
|
| {
|
| TransformState transformState(TransformState::ApplyTransformDirection, localPoint);
|
| - mapLocalToContainer(paintInvalidationContainer, transformState, mode | ApplyContainerFlip | UseTransforms, wasFixed);
|
| + mapLocalToContainer(paintInvalidationContainer, transformState, mode | ApplyContainerFlip | UseTransforms, wasFixed, paintInvalidationState);
|
| transformState.flatten();
|
|
|
| return transformState.lastPlanarPoint();
|
|
|