Backdrop filter is pulling in content from behind the window.
https://bugs.webkit.org/show_bug.cgi?id=145561
rdar://problem/20909309

Reviewed by Simon Fraser.

This patch ensures that the backdrop filter layer is positioned and sized properly.

The backdrop filter layer should take its size and position from its renderer and not
directly from the composited layer.
In certain cases the composited layer's size is expanded to cover items like box shadow or an absolute positioned descendant.
In such cases, we ended up applying the backdrop filter to those areas as well.

Source/WebCore:

Tests: css3/filters/backdrop/backdrop-filter-does-not-size-properly-absolute.html
       css3/filters/backdrop/backdrop-filter-does-not-size-properly-border-and-padding.html

* platform/graphics/GraphicsLayer.h:
(WebCore::GraphicsLayer::setBackdropFiltersRect):
(WebCore::GraphicsLayer::backdropFiltersRect):
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::setBackdropFiltersRect):
(WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
(WebCore::GraphicsLayerCA::updateBackdropFilters):
(WebCore::GraphicsLayerCA::updateBackdropFiltersRect):
(WebCore::GraphicsLayerCA::updateContentsRects):
(WebCore::GraphicsLayerCA::updateGeometry): Deleted.
* platform/graphics/ca/GraphicsLayerCA.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateBackdropFiltersGeometry):
(WebCore::RenderLayerBacking::updateGeometry):
* rendering/RenderLayerBacking.h:

LayoutTests:

* css3/filters/backdrop/backdrop-filter-does-not-size-properly-absolute-expected.txt: Added.
* css3/filters/backdrop/backdrop-filter-does-not-size-properly-absolute.html: Added.
* css3/filters/backdrop/backdrop-filter-does-not-size-properly-border-and-padding-expected.txt: Added.
* css3/filters/backdrop/backdrop-filter-does-not-size-properly-border-and-padding.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@185124 268f45cc-cd09-0410-ab3c-d52691b4dbfc
11 files changed