| Index: third_party/WebKit/Source/core/layout/LayoutBox.cpp
|
| diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
|
| index 3bc1709ebb82d41630deda811a4c8265d7b1c927..f2f233e5e28bbf89975e472901fc39063b2665a8 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
|
| @@ -1915,7 +1915,9 @@ void LayoutBox::mapToVisibleRectInAncestorSpace(const LayoutBoxModelObject* ance
|
| // included into the visual overflow for repaint, we wouldn't have this issue.
|
| inflatePaintInvalidationRectForReflectionAndFilter(rect);
|
|
|
| - if (paintInvalidationState && paintInvalidationState->canMapToContainer(ancestor) && position != FixedPosition) {
|
| + if (paintInvalidationState && paintInvalidationState->canMapToContainer(ancestor)
|
| + // We support fast path mapping to container for fixed-position in SPv2.
|
| + && (position != FixedPosition || RuntimeEnabledFeatures::slimmingPaintV2Enabled())) {
|
| if (layer() && layer()->transform())
|
| rect = LayoutRect(layer()->transform()->mapRect(pixelSnappedIntRect(rect)));
|
|
|
| @@ -3827,8 +3829,8 @@ PaintInvalidationReason LayoutBox::paintInvalidationReason(const LayoutBoxModelO
|
| return invalidationReason;
|
|
|
| // LayoutBox::incrementallyInvalidatePaint() depends on positionFromPaintInvalidationBacking
|
| - // which is not available when slimmingPaintOffsetCachingEnabled.
|
| - if (RuntimeEnabledFeatures::slimmingPaintOffsetCachingEnabled() && (style()->hasBoxDecorations() || style()->hasBackground()))
|
| + // which is not available in SPv2.
|
| + if (RuntimeEnabledFeatures::slimmingPaintV2Enabled() && (style()->hasBoxDecorations() || (style()->hasBackground() && hasVisualOverflow())))
|
| return PaintInvalidationBorderBoxChange;
|
|
|
| // TODO(wangxianzhu): Remove incremental invalidation when we remove rect-based paint invalidation.
|
|
|