| Index: third_party/WebKit/Source/core/paint/PaintLayer.cpp
|
| diff --git a/third_party/WebKit/Source/core/paint/PaintLayer.cpp b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
|
| index 1f9148f70c35bc50321b277d0a6b01410f2b6fb7..16f625873668c322d216058212ebb91e6e3d0ab5 100644
|
| --- a/third_party/WebKit/Source/core/paint/PaintLayer.cpp
|
| +++ b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
|
| @@ -1303,18 +1303,19 @@ PaintLayer* PaintLayer::RemoveChild(PaintLayer* old_child) {
|
| if (last_ == old_child)
|
| last_ = old_child->PreviousSibling();
|
|
|
| - if (Compositor()) {
|
| - if (!old_child->StackingNode()->IsStacked() &&
|
| - !GetLayoutObject().DocumentBeingDestroyed())
|
| - Compositor()->SetNeedsCompositingUpdate(kCompositingUpdateRebuildTree);
|
| - }
|
| + if (!GetLayoutObject().DocumentBeingDestroyed()) {
|
| + if (Compositor()) {
|
| + if (!old_child->StackingNode()->IsStacked())
|
| + Compositor()->SetNeedsCompositingUpdate(kCompositingUpdateRebuildTree);
|
| + }
|
|
|
| - if (old_child->StackingNode()->IsStacked() || old_child->FirstChild()) {
|
| - // Dirty the z-order list in which we are contained. When called via the
|
| - // reattachment process in removeOnlyThisLayer, the layer may already be
|
| - // disconnected from the main layer tree, so we need to null-check the
|
| - // |stackingContext| value.
|
| - old_child->StackingNode()->DirtyStackingContextZOrderLists();
|
| + if (old_child->StackingNode()->IsStacked() || old_child->FirstChild()) {
|
| + // Dirty the z-order list in which we are contained. When called via the
|
| + // reattachment process in removeOnlyThisLayer, the layer may already be
|
| + // disconnected from the main layer tree, so we need to null-check the
|
| + // |stackingContext| value.
|
| + old_child->StackingNode()->DirtyStackingContextZOrderLists();
|
| + }
|
| }
|
|
|
| if (GetLayoutObject().Style()->Visibility() != EVisibility::kVisible)
|
|
|