Chromium Code Reviews| Index: Source/core/rendering/RenderObject.cpp |
| diff --git a/Source/core/rendering/RenderObject.cpp b/Source/core/rendering/RenderObject.cpp |
| index 6df1219266d8b59f039ae3f1d17d2e3a20732261..2c997f0adfa872537bbce1bc6242c9b02fa48505 100644 |
| --- a/Source/core/rendering/RenderObject.cpp |
| +++ b/Source/core/rendering/RenderObject.cpp |
| @@ -1278,6 +1278,18 @@ static PassRefPtr<TraceEvent::ConvertableToTraceFormat> jsonObjectForOldAndNewRe |
| return value; |
| } |
| +void RenderObject::invalidateSelectionIfNeeded(const RenderLayerModelObject& paintInvalidationContainer) const |
|
dsinclair
2014/10/01 17:13:32
Should this be non-const? Its issuing invalidation
Julien - ping for review
2014/10/01 18:18:22
Done.
|
| +{ |
| + if (!shouldInvalidateSelection()) |
| + return; |
| + |
| + LayoutRect selection = selectionRectForPaintInvalidation(&paintInvalidationContainer); |
| + // FIXME: groupedMapping() leaks the squashing abstraction. See RenderBlockSelectionInfo for more details. |
| + if (paintInvalidationContainer.layer()->groupedMapping()) |
| + RenderLayer::mapRectToPaintBackingCoordinates(&paintInvalidationContainer, selection); |
| + invalidatePaintUsingContainer(&paintInvalidationContainer, selection, InvalidationSelection); |
| +} |
| + |
| InvalidationReason RenderObject::invalidatePaintIfNeeded(const PaintInvalidationState& paintInvalidationState, const RenderLayerModelObject& paintInvalidationContainer) |
| { |
| RenderView* v = view(); |
| @@ -1303,6 +1315,8 @@ InvalidationReason RenderObject::invalidatePaintIfNeeded(const PaintInvalidation |
| InvalidationReason invalidationReason = getPaintInvalidationReason(paintInvalidationContainer, oldBounds, oldLocation, newBounds, newLocation); |
| + invalidateSelectionIfNeeded(paintInvalidationContainer); |
| + |
| if (invalidationReason == InvalidationNone) |
| return invalidationReason; |
| @@ -3113,6 +3127,7 @@ void RenderObject::clearPaintInvalidationState(const PaintInvalidationState& pai |
| setShouldInvalidateOverflowForPaint(false); |
| setLayoutDidGetCalled(false); |
| setMayNeedPaintInvalidation(false); |
| + clearShouldInvalidateSelection(); |
| } |
| bool RenderObject::isAllowedToModifyRenderTreeStructure(Document& document) |