| Index: Source/core/rendering/RenderText.cpp
|
| diff --git a/Source/core/rendering/RenderText.cpp b/Source/core/rendering/RenderText.cpp
|
| index 1170cddfc7c91f7dbcc921b0c483092966cd6e6f..4a2aab7d5a37cb0b0d6c09feb97204403945914b 100644
|
| --- a/Source/core/rendering/RenderText.cpp
|
| +++ b/Source/core/rendering/RenderText.cpp
|
| @@ -1576,20 +1576,29 @@ LayoutRect RenderText::linesVisualOverflowBoundingBox() const
|
|
|
| LayoutRect RenderText::clippedOverflowRectForPaintInvalidation(const RenderLayerModelObject* paintInvalidationContainer, const PaintInvalidationState* paintInvalidationState) const
|
| {
|
| + const RenderObject* rendererToIssuePaintInvalidations = containingObjectForPaintInvalidation();
|
| + return rendererToIssuePaintInvalidations->clippedOverflowRectForPaintInvalidation(paintInvalidationContainer, paintInvalidationState);
|
| +}
|
| +
|
| +const RenderObject* RenderText::containingObjectForPaintInvalidation() const
|
| +{
|
| RenderObject* rendererToIssuePaintInvalidations = containingBlock();
|
|
|
| // Do not cross self-painting layer boundaries.
|
| RenderObject* enclosingLayerRenderer = enclosingLayer()->renderer();
|
| if (enclosingLayerRenderer != rendererToIssuePaintInvalidations && !rendererToIssuePaintInvalidations->isDescendantOf(enclosingLayerRenderer))
|
| rendererToIssuePaintInvalidations = enclosingLayerRenderer;
|
| + return enclosingLayerRenderer;
|
| +}
|
|
|
| - // The renderer we chose to issue paint invalidations may be an ancestor of paintInvalidationContainer, but we need to do a paintInvalidationContainer-relative paint invalidation.
|
| - if (paintInvalidationContainer && paintInvalidationContainer != rendererToIssuePaintInvalidations && !rendererToIssuePaintInvalidations->isDescendantOf(paintInvalidationContainer))
|
| - return paintInvalidationContainer->clippedOverflowRectForPaintInvalidation(paintInvalidationContainer, paintInvalidationState);
|
| -
|
| - return rendererToIssuePaintInvalidations->clippedOverflowRectForPaintInvalidation(paintInvalidationContainer, paintInvalidationState);
|
| +const RenderLayerModelObject* RenderText::containerForPaintInvalidation() const
|
| +{
|
| + const RenderObject* rendererToIssuePaintInvalidations = containingObjectForPaintInvalidation();
|
| + ASSERT(rendererToIssuePaintInvalidations);
|
| + return rendererToIssuePaintInvalidations->containerForPaintInvalidation();
|
| }
|
|
|
| +
|
| LayoutRect RenderText::selectionRectForPaintInvalidation(const RenderLayerModelObject* paintInvalidationContainer, bool clipToVisibleContent)
|
| {
|
| ASSERT(!needsLayout());
|
|
|