| Index: third_party/WebKit/Source/core/paint/BoxPaintInvalidator.cpp
|
| diff --git a/third_party/WebKit/Source/core/paint/BoxPaintInvalidator.cpp b/third_party/WebKit/Source/core/paint/BoxPaintInvalidator.cpp
|
| index f813347b85cce652662f1f1a2eaadc35f60fc2a0..14a155c34efc0fb52ab3b22bad9d1ad8b9137e71 100644
|
| --- a/third_party/WebKit/Source/core/paint/BoxPaintInvalidator.cpp
|
| +++ b/third_party/WebKit/Source/core/paint/BoxPaintInvalidator.cpp
|
| @@ -157,17 +157,27 @@ PaintInvalidationReason BoxPaintInvalidator::computePaintInvalidationReason() {
|
| return reason;
|
| }
|
|
|
| - // If the transform is not identity or translation, incremental invalidation
|
| - // is not applicable because the difference between oldBounds and newBounds
|
| - // doesn't cover all area needing invalidation.
|
| - // FIXME: Should also consider ancestor transforms since
|
| - // paintInvalidationContainer. crbug.com/426111.
|
| if (reason == PaintInvalidationIncremental &&
|
| - m_context.oldBounds != m_context.newBounds &&
|
| - m_context.paintInvalidationContainer != m_box && m_box.hasLayer() &&
|
| - m_box.layer()->transform() &&
|
| - !m_box.layer()->transform()->isIdentityOrTranslation())
|
| - return PaintInvalidationBoundsChange;
|
| + m_context.oldBounds != m_context.newBounds) {
|
| + if (m_context.newBoundsCoversExtraPixels ||
|
| + m_context.oldBoundsCoversExtraPixels) {
|
| + // Incremental invalidation is not applicable because the difference
|
| + // between oldBounds and newBounds may not cover all changed pixels along
|
| + // the edges.
|
| + return PaintInvalidationBoundsChange;
|
| + }
|
| +
|
| + // If the transform is not identity or translation, incremental invalidation
|
| + // is not applicable because the difference between oldBounds and newBounds
|
| + // doesn't cover all area needing invalidation.
|
| + // TODO(crbug.com/426111): Should also consider ancestor transforms
|
| + // since paintInvalidationContainer. Combine this logic into the above
|
| + // boundsCoversExtraPixels logic.
|
| + if (m_context.paintInvalidationContainer != m_box && m_box.hasLayer() &&
|
| + m_box.layer()->transform() &&
|
| + !m_box.layer()->transform()->isIdentityOrTranslation())
|
| + return PaintInvalidationBoundsChange;
|
| + }
|
|
|
| const ComputedStyle& style = m_box.styleRef();
|
| if (style.backgroundLayers().thisOrNextLayersUseContentBox() ||
|
|
|