| Index: third_party/WebKit/Source/core/layout/LayoutReplaced.cpp
|
| diff --git a/third_party/WebKit/Source/core/layout/LayoutReplaced.cpp b/third_party/WebKit/Source/core/layout/LayoutReplaced.cpp
|
| index 4e67e03aea40990e3c1592219ef180bb19a0f644..1e02150baec48565c4699980e750d19875eb791c 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutReplaced.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutReplaced.cpp
|
| @@ -709,21 +709,6 @@ PositionWithAffinity LayoutReplaced::positionForPoint(const LayoutPoint& point)
|
| return LayoutBox::positionForPoint(point);
|
| }
|
|
|
| -LayoutRect LayoutReplaced::selectionRectForPaintInvalidation(const LayoutBoxModelObject* paintInvalidationContainer) const
|
| -{
|
| - ASSERT(!needsLayout());
|
| -
|
| - LayoutRect rect = localSelectionRect();
|
| - if (rect.isEmpty())
|
| - return rect;
|
| -
|
| - mapToVisibleRectInAncestorSpace(paintInvalidationContainer, rect, 0);
|
| - // FIXME: groupedMapping() leaks the squashing abstraction.
|
| - if (paintInvalidationContainer->layer()->groupedMapping())
|
| - PaintLayer::mapRectInPaintInvalidationContainerToBacking(paintInvalidationContainer, rect);
|
| - return rect;
|
| -}
|
| -
|
| LayoutRect LayoutReplaced::localSelectionRect() const
|
| {
|
| if (getSelectionState() == SelectionNone)
|
| @@ -751,8 +736,11 @@ void LayoutReplaced::setSelectionState(SelectionState state)
|
|
|
| // We only include the space below the baseline in our layer's cached paint invalidation rect if the
|
| // image is selected. Since the selection state has changed update the rect.
|
| - if (hasLayer())
|
| - setPreviousPaintInvalidationRect(boundsRectForPaintInvalidation(containerForPaintInvalidation()));
|
| + if (hasLayer()) {
|
| + LayoutRect rect = localOverflowRectForPaintInvalidation();
|
| + PaintLayer::mapRectToPaintInvalidationBacking(this, &containerForPaintInvalidation(), rect);
|
| + setPreviousPaintInvalidationRect(rect);
|
| + }
|
|
|
| if (canUpdateSelectionOnRootLineBoxes())
|
| inlineBoxWrapper()->root().setHasSelectedChildren(state != SelectionNone);
|
|
|