RenderLayer hasVisibleContent() has inconsistent semantics causing disappearing composited layers
https://bugs.webkit.org/show_bug.cgi?id=108118

Reviewed by Simon Fraser.

Source/WebCore:

RenderLayerBacking::hasVisibleNonCompositingDescendantLayers was
only checking whether direct children had visible content. As a
result, composited layers had wrong visibility status if only a
deeper descendant RenderLayer was visible.

Test: compositing/visibility/visibility-on-distant-descendant.html

* rendering/RenderLayerBacking.cpp:
(WebCore::hasVisibleNonCompositingDescendant): copied the original
implementation into this function; then added the RenderLayer
recursion as appropriate.
(WebCore):
(WebCore::RenderLayerBacking::hasVisibleNonCompositingDescendantLayers):
This is now just a wrapper to the private static recursive
function.

LayoutTests:

* compositing/visibility/visibility-on-distant-descendant-expected.png: Added.
* compositing/visibility/visibility-on-distant-descendant-expected.txt: Added.
* compositing/visibility/visibility-on-distant-descendant.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142012 268f45cc-cd09-0410-ab3c-d52691b4dbfc