[CSS Filters] RenderLayerCompositor::addToOverlapMap should take into account the filters outsets (ie. blur and drop-shadow)
https://bugs.webkit.org/show_bug.cgi?id=94022

Reviewed by Simon Fraser.

Source/WebCore:

When a layer has a filter that moves pixels, we need to add its entire bounds, including its
outsets and children, to the overlap map. The filter can move the children's pixels
anywhere in the layer, so we can't rely on the children's bounds.

Eventually, we should avoid adding children to the overlap map if the parent's bounds used
for overlap testing already include the children. I've added a FIXME for this optimization.

Tests: compositing/filters/sw-layer-overlaps-hw-shadow.html
       compositing/filters/sw-nested-shadow-overlaps-hw-nested-shadow.html
       compositing/filters/sw-shadow-overlaps-hw-layer.html
       compositing/filters/sw-shadow-overlaps-hw-shadow.html

* rendering/RenderLayer.h:
(WebCore::RenderLayer::overlapBounds):
    If necessary, return the calculated layer bounds, including the children. Otherwise,
    return the localBoundingBox.
(RenderLayer):
(WebCore::RenderLayer::overlapBoundsIncludeChildren):
    If the layer has a filter that moves pixels, return true.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::addToOverlapMap):
    Add the overlapBounds instead of the localBoundingBox to the overlap map.
(WebCore::RenderLayerCompositor::computeCompositingRequirements):
    Use the overlapBounds instead of the localBoundingBox for overlap testing.

LayoutTests:

Add tests to check several combinations of software layer and composited layer overlap when
filter outsets are involved.

* compositing/filters/sw-layer-overlaps-hw-shadow-expected.txt: Added.
* compositing/filters/sw-layer-overlaps-hw-shadow.html: Added.
* compositing/filters/sw-nested-shadow-overlaps-hw-nested-shadow-expected.txt: Added.
* compositing/filters/sw-nested-shadow-overlaps-hw-nested-shadow.html: Added.
* compositing/filters/sw-shadow-overlaps-hw-layer-expected.txt: Added.
* compositing/filters/sw-shadow-overlaps-hw-layer.html: Added.
* compositing/filters/sw-shadow-overlaps-hw-shadow-expected.txt: Added.
* compositing/filters/sw-shadow-overlaps-hw-shadow.html: Added.
* platform/chromium/compositing/filters/sw-layer-overlaps-hw-shadow-expected.txt: Added.
* platform/chromium/compositing/filters/sw-shadow-overlaps-hw-layer-expected.txt: Added.


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