| Index: Source/core/rendering/RenderInline.cpp
|
| diff --git a/Source/core/rendering/RenderInline.cpp b/Source/core/rendering/RenderInline.cpp
|
| index b3e7aa8d588416ca8bb09c3bdff31ec3aa5cdacb..3e027761b0f47bfa11c64866ef5ff01ae106908b 100644
|
| --- a/Source/core/rendering/RenderInline.cpp
|
| +++ b/Source/core/rendering/RenderInline.cpp
|
| @@ -988,10 +988,8 @@ LayoutRect RenderInline::linesVisualOverflowBoundingBox() const
|
| return rect;
|
| }
|
|
|
| -LayoutRect RenderInline::clippedOverflowRectForPaintInvalidation(const RenderLayerModelObject* paintInvalidationContainer) const
|
| +LayoutRect RenderInline::clippedOverflowRectForPaintInvalidation(const RenderLayerModelObject* paintInvalidationContainer, const InvalidationTreeWalkState* invalidationTreeWalkState) const
|
| {
|
| - ASSERT(!view() || !view()->layoutStateCachedOffsetsEnabled());
|
| -
|
| if (!firstLineBoxIncludingCulling() && !continuation())
|
| return LayoutRect();
|
|
|
| @@ -1023,7 +1021,7 @@ LayoutRect RenderInline::clippedOverflowRectForPaintInvalidation(const RenderLay
|
| if (cb->hasOverflowClip())
|
| cb->applyCachedClipAndScrollOffsetForRepaint(repaintRect);
|
|
|
| - cb->mapRectToPaintInvalidationBacking(paintInvalidationContainer, repaintRect);
|
| + cb->mapRectToPaintInvalidationBacking(paintInvalidationContainer, repaintRect, invalidationTreeWalkState);
|
|
|
| if (outlineSize) {
|
| for (RenderObject* curr = firstChild(); curr; curr = curr->nextSibling()) {
|
| @@ -1038,29 +1036,25 @@ LayoutRect RenderInline::clippedOverflowRectForPaintInvalidation(const RenderLay
|
| return repaintRect;
|
| }
|
|
|
| -LayoutRect RenderInline::rectWithOutlineForPaintInvalidation(const RenderLayerModelObject* paintInvalidationContainer, LayoutUnit outlineWidth) const
|
| +LayoutRect RenderInline::rectWithOutlineForPaintInvalidation(const RenderLayerModelObject* paintInvalidationContainer, LayoutUnit outlineWidth, const InvalidationTreeWalkState* invalidationTreeWalkState) const
|
| {
|
| - LayoutRect r(RenderBoxModelObject::rectWithOutlineForPaintInvalidation(paintInvalidationContainer, outlineWidth));
|
| + LayoutRect r(RenderBoxModelObject::rectWithOutlineForPaintInvalidation(paintInvalidationContainer, outlineWidth, invalidationTreeWalkState));
|
| for (RenderObject* curr = firstChild(); curr; curr = curr->nextSibling()) {
|
| if (!curr->isText())
|
| - r.unite(curr->rectWithOutlineForPaintInvalidation(paintInvalidationContainer, outlineWidth));
|
| + r.unite(curr->rectWithOutlineForPaintInvalidation(paintInvalidationContainer, outlineWidth, invalidationTreeWalkState));
|
| }
|
| return r;
|
| }
|
|
|
| -void RenderInline::mapRectToPaintInvalidationBacking(const RenderLayerModelObject* paintInvalidationContainer, LayoutRect& rect, bool fixed) const
|
| +void RenderInline::mapRectToPaintInvalidationBacking(const RenderLayerModelObject* paintInvalidationContainer, LayoutRect& rect, bool fixed, const InvalidationTreeWalkState* invalidationTreeWalkState) const
|
| {
|
| - if (RenderView* v = view()) {
|
| - // LayoutState is only valid for root-relative repainting
|
| - if (v->canMapUsingLayoutStateForContainer(paintInvalidationContainer)) {
|
| - LayoutState* layoutState = v->layoutState();
|
| - if (style()->hasInFlowPosition() && layer())
|
| - rect.move(layer()->offsetForInFlowPosition());
|
| - rect.move(layoutState->paintOffset());
|
| - if (layoutState->isClipped())
|
| - rect.intersect(layoutState->clipRect());
|
| - return;
|
| - }
|
| + if (invalidationTreeWalkState && invalidationTreeWalkState->canMapToContainer(paintInvalidationContainer)) {
|
| + if (style()->hasInFlowPosition() && layer())
|
| + rect.move(layer()->offsetForInFlowPosition());
|
| + rect.move(invalidationTreeWalkState->paintOffset());
|
| + if (invalidationTreeWalkState->isClipped())
|
| + rect.intersect(invalidationTreeWalkState->clipRect());
|
| + return;
|
| }
|
|
|
| if (paintInvalidationContainer == this)
|
| @@ -1108,7 +1102,7 @@ void RenderInline::mapRectToPaintInvalidationBacking(const RenderLayerModelObjec
|
| return;
|
| }
|
|
|
| - o->mapRectToPaintInvalidationBacking(paintInvalidationContainer, rect, fixed);
|
| + o->mapRectToPaintInvalidationBacking(paintInvalidationContainer, rect, fixed, invalidationTreeWalkState);
|
| }
|
|
|
| LayoutSize RenderInline::offsetFromContainer(const RenderObject* container, const LayoutPoint& point, bool* offsetDependsOnPoint) const
|
| @@ -1133,20 +1127,17 @@ LayoutSize RenderInline::offsetFromContainer(const RenderObject* container, cons
|
| return offset;
|
| }
|
|
|
| -void RenderInline::mapLocalToContainer(const RenderLayerModelObject* repaintContainer, TransformState& transformState, MapCoordinatesFlags mode, bool* wasFixed) const
|
| +void RenderInline::mapLocalToContainer(const RenderLayerModelObject* repaintContainer, TransformState& transformState, MapCoordinatesFlags mode, bool* wasFixed, const InvalidationTreeWalkState* invalidationTreeWalkState) const
|
| {
|
| if (repaintContainer == this)
|
| return;
|
|
|
| - if (RenderView *v = view()) {
|
| - if (v->canMapUsingLayoutStateForContainer(repaintContainer)) {
|
| - LayoutState* layoutState = v->layoutState();
|
| - LayoutSize offset = layoutState->paintOffset();
|
| - if (style()->hasInFlowPosition() && layer())
|
| - offset += layer()->offsetForInFlowPosition();
|
| - transformState.move(offset);
|
| - return;
|
| - }
|
| + if (invalidationTreeWalkState && invalidationTreeWalkState->canMapToContainer(repaintContainer)) {
|
| + LayoutSize offset = invalidationTreeWalkState->paintOffset();
|
| + if (style()->hasInFlowPosition() && layer())
|
| + offset += layer()->offsetForInFlowPosition();
|
| + transformState.move(offset);
|
| + return;
|
| }
|
|
|
| bool containerSkipped;
|
| @@ -1180,7 +1171,7 @@ void RenderInline::mapLocalToContainer(const RenderLayerModelObject* repaintCont
|
| return;
|
| }
|
|
|
| - o->mapLocalToContainer(repaintContainer, transformState, mode, wasFixed);
|
| + o->mapLocalToContainer(repaintContainer, transformState, mode, wasFixed, invalidationTreeWalkState);
|
| }
|
|
|
| void RenderInline::updateDragState(bool dragOn)
|
| @@ -1568,10 +1559,12 @@ void RenderInline::addAnnotatedRegions(Vector<AnnotatedRegionValue>& regions)
|
| regions.append(region);
|
| }
|
|
|
| -void RenderInline::invalidateTreeAfterLayout(const RenderLayerModelObject& paintInvalidationContainer)
|
| +void RenderInline::invalidateTreeAfterLayout(const InvalidationTreeWalkState& invalidationTreeWalkState)
|
| {
|
| - LayoutState state(*this);
|
| - RenderObject::invalidateTreeAfterLayout(paintInvalidationContainer);
|
| + bool establishesNewPaintInvalidationContainer = isPaintInvalidationContainer();
|
| + const RenderLayerModelObject& newPaintInvalidationContainer = *adjustCompositedContainerForSpecialAncestors(establishesNewPaintInvalidationContainer ? this : &invalidationTreeWalkState.paintInvalidationContainer());
|
| + InvalidationTreeWalkState childInvalidationTreeWalkState(invalidationTreeWalkState, *this, newPaintInvalidationContainer);
|
| + RenderObject::invalidateTreeAfterLayout(invalidationTreeWalkState);
|
| }
|
|
|
| } // namespace WebCore
|
|
|