Currently we use the parent effect's input clip as a child effect's output clip when the child effect doesn't have an intrinsic clip. For example:
<!DOCTYPE html>
<div style="opacity:0.5;">
Foo
</div>
The opacity effect's output clip will be the root node, while the chunk "Foo" will be clipped by the frame clip.
This causes a problem when we use property tree to paint in SPv1 (a.k.a. SPv175), because the layer state included the frame clip. When we convert the effect node into cc display item, a DCHECK will fail due to the layer clip being deeper than the output clip of the effect.
This problem applies to clip other than frame clip as well. Say we have
<div style="overflow:hidden;">
<div style="will-change:opacity;">
<div style="opacity:0.5;">
</div>
</div>
</div>
The middle element creates a compositing layer, and its layer state will include the overflow clip from the outer element. We can't simply set the output clip of inner opacity effect to the layer clip because out-of-flow descendants can potentially escape the clip.
Proposal:
Set output clip to nullptr if an effect doesn't have intrinsic clip. In PAC and PaintChunksToCcLayer the effective output clip will inherit from the parent effect (as before the proposal), or the layer clip, whichever is deeper.
Comment 1 by bugdroid1@chromium.org
, Sep 16 2017