| Index: Source/core/rendering/compositing/CompositingLayerAssigner.cpp
|
| diff --git a/Source/core/rendering/compositing/CompositingLayerAssigner.cpp b/Source/core/rendering/compositing/CompositingLayerAssigner.cpp
|
| index 373a95089479f819c5c3a501dcb9e84c10d02c6c..53dd66887c3fbe3ff34d1f51192da69d195768d5 100644
|
| --- a/Source/core/rendering/compositing/CompositingLayerAssigner.cpp
|
| +++ b/Source/core/rendering/compositing/CompositingLayerAssigner.cpp
|
| @@ -121,6 +121,9 @@ CompositingReasons CompositingLayerAssigner::getReasonsPreventingSquashing(const
|
| if (!squashingState.haveAssignedBackingsToEntireSquashingLayerSubtree)
|
| return CompositingReasonSquashingWouldBreakPaintOrder;
|
|
|
| + ASSERT(squashingState.hasMostRecentMapping);
|
| + const RenderLayer& squashingLayer = squashingState.mostRecentMapping->owningLayer();
|
| +
|
| // FIXME: this special case for video exists only to deal with corner cases
|
| // where a RenderVideo does not report that it needs to be directly composited.
|
| // Video does not currently support sharing a backing, but this could be
|
| @@ -128,12 +131,12 @@ CompositingReasons CompositingLayerAssigner::getReasonsPreventingSquashing(const
|
| // video to share a backing with other layers.
|
| //
|
| // compositing/video/video-controls-layer-creation.html
|
| - if (layer->renderer()->isVideo())
|
| + if (layer->renderer()->isVideo() || squashingLayer.renderer()->isVideo())
|
| return CompositingReasonSquashingVideoIsDisallowed;
|
|
|
| // Don't squash iframes, frames or plugins.
|
| // FIXME: this is only necessary because there is frame code that assumes that composited frames are not squashed.
|
| - if (layer->renderer()->isRenderPart())
|
| + if (layer->renderer()->isRenderPart() || squashingLayer.renderer()->isRenderPart())
|
| return CompositingReasonSquashingRenderPartIsDisallowed;
|
|
|
| if (layer->reflectionInfo())
|
| @@ -142,10 +145,7 @@ CompositingReasons CompositingLayerAssigner::getReasonsPreventingSquashing(const
|
| if (squashingWouldExceedSparsityTolerance(layer, squashingState))
|
| return CompositingReasonSquashingSparsityExceeded;
|
|
|
| - // FIXME: this is not efficient, since it walks up the tree . We should store these values on the CompositingInputsCache.
|
| - ASSERT(squashingState.hasMostRecentMapping);
|
| - const RenderLayer& squashingLayer = squashingState.mostRecentMapping->owningLayer();
|
| -
|
| + // FIXME: this is not efficient, since it walks up the tree. We should store these values on the CompositingInputsCache.
|
| if (layer->clippingContainer() != squashingLayer.clippingContainer() && !squashingLayer.compositedLayerMapping()->containingSquashedLayer(layer->clippingContainer()))
|
| return CompositingReasonSquashingClippingContainerMismatch;
|
|
|
|
|