Backdrop filter doesn't show if removed then re-added
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 23 Oct 2016 02:43:48 +0000 (02:43 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 23 Oct 2016 02:43:48 +0000 (02:43 +0000)
commitb69f3432ca030113143c38a0d282f2f2572b76a4
treee5f55a4088cc1821026df80cfb4ca3376521459a
parentf8f95542837ed818dec4390a4e6200d5f641ca62
Backdrop filter doesn't show if removed then re-added
https://bugs.webkit.org/show_bug.cgi?id=163860

Reviewed by Dan Bernstein.

Source/WebCore:

When a backdrop filter is removed the re-added, updateBackdropFiltersRect() never
runs the second time because m_backdropFiltersRect doesn't change. However, we need
to run that code to size and position the newly re-created backdrop layer, so run
it explicitly if we just created the backdrop layer. This is similar to how
updateContentsImage() calls updateContentsRects().

Test: css3/filters/backdrop/add-remove-add-backdrop-filter.html

* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::setBackdropFilters):
(WebCore::GraphicsLayerCA::updateBackdropFilters):

LayoutTests:

* css3/filters/backdrop/add-remove-add-backdrop-filter-expected.html: Added.
* css3/filters/backdrop/add-remove-add-backdrop-filter.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@207722 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/css3/filters/backdrop/add-remove-add-backdrop-filter-expected.html [new file with mode: 0644]
LayoutTests/css3/filters/backdrop/add-remove-add-backdrop-filter.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp