Source/core/rendering/compositing/RenderLayerCompositor.cpp
// Return true if the given layer has some ancestor in the RenderLayer hierarchy that clips,
// up to the enclosing compositing ancestor. This is required because compositing layers are parented
// according to the z-order hierarchy, yet clipping goes down the renderer hierarchy.
// Thus, a RenderLayer can be clipped by a RenderLayer that is an ancestor in the renderer hierarchy,
// but a sibling in the z-order hierarchy.
Return true if the given layer has some ancestor in the RenderLayer hierarchy that clips,
up to the enclosing compositing ancestor. This is required because compositing layers are parented
according to the z-order hierarchy, yet clipping goes down the renderer hierarchy.
Thus, a RenderLayer can be clipped by a RenderLayer that is an ancestor in the renderer hierarchy,
but a sibling in the z-order hierarchy.
Return true if the given layer has some ancestor in the RenderLayer hierarchy that clips up to the enclosing compositing ancestor . This is required because compositing layers are parented according to the z - order hierarchy yet clipping goes down the renderer hierarchy . Thus a RenderLayer can be clipped by a RenderLayer that is an ancestor in the renderer hierarchy but a sibling in the z - order hierarchy .
bool RenderLayerCompositor::clippedByNonAncestorInStackingTree(const RenderLayer* layer) const
{
    if (!layer->hasCompositedLayerMapping() || !layer->parent())
        return false;
    const RenderLayer* compositingAncestor = layer->ancestorCompositingLayer();
    if (!compositingAncestor)
        return false;
    RenderObject* clippingContainer = layer->renderer()->clippingContainer();
    if (!clippingContainer)
        return false;
    if (compositingAncestor->renderer()->isDescendantOf(clippingContainer))
        return false;
    return true;
}
bool RenderLayerCompositor :: clippedByNonAncestorInStackingTree ( const RenderLayer * layer ) const { if ( ! layer -> hasCompositedLayerMapping ( ) || ! layer -> parent ( ) ) return false ; const RenderLayer * compositingAncestor = layer -> ancestorCompositingLayer ( ) ; if ( ! compositingAncestor ) return false ; RenderObject * clippingContainer = layer -> renderer ( ) -> clippingContainer ( ) ; if ( ! clippingContainer ) return false ; if ( compositingAncestor -> renderer ( ) -> isDescendantOf ( clippingContainer ) ) return false ; return true ; }
Return true if the given layer has some ancestor in the RenderLayer hierarchy that clips,
up to the enclosing compositing ancestor.
Return true if the given layer has some ancestor in the RenderLayer hierarchy that clips up to the enclosing compositing ancestor .