| Index: third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
|
| diff --git a/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp b/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
|
| index 0a6cd48300b7e41f78ac9b20ab5826a3b42661dc..8110d1ce68d4f047acb50866a605897db3d80ac6 100644
|
| --- a/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
|
| +++ b/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
|
| @@ -747,7 +747,17 @@ PaintResult PaintLayerPainter::PaintLayerWithTransform(
|
|
|
| ClipRect ancestor_background_clip_rect;
|
| if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
|
| - if (parent_layer) {
|
| + if (painting_info.root_layer == &paint_layer_) {
|
| + // This works around a bug in squashed-layer painting.
|
| + // Squashed layers paint into a backing in its compositing container's
|
| + // space, but painting_info.root_layer points to the squashed layer
|
| + // itself, thus PaintLayerClipper would return a clip rect in the
|
| + // squashed layer's local space, instead of the backing's space.
|
| + // Fortunately, CompositedLayerMapping::DoPaintTask already applied
|
| + // appropriate ancestor clip for us, we can simply skip it.
|
| + DCHECK_EQ(paint_layer_.GetCompositingState(), kPaintsIntoGroupedBacking);
|
| + ancestor_background_clip_rect.SetRect(FloatClipRect());
|
| + } else if (parent_layer) {
|
| // Calculate the clip rectangle that the ancestors establish.
|
| ClipRectsContext clip_rects_context(
|
| painting_info.root_layer,
|
|
|