Bug 1680005 [wpt PR 26695] - Fix SVG filter data invalidation for empty containers...
commit7e8873fef96af18b8060f4bdecdf0b6e938115e3
authorFredrik Söderqvist <fs@opera.com>
Fri, 4 Dec 2020 03:52:19 +0000 (4 03:52 +0000)
committermoz-wptsync-bot <wptsync@mozilla.com>
Mon, 7 Dec 2020 09:25:57 +0000 (7 09:25 +0000)
tree30b3ff718680f85af200b98be7533b3c2ff19d8e
parent82ec99e89935fbf30f22c626d4e5af1331feeeff
Bug 1680005 [wpt PR 26695] - Fix SVG filter data invalidation for empty containers, a=testonly

Automatic update from web-platform-tests
Fix SVG filter data invalidation for empty containers

Empty containers will fail to create FilterData because they have an
empty bounding box. When children were added to the container, making
the bounding box non-empty we would fail to mark the paint properties as
needing update because of the check for existing FilterData in
SVGElementResourceClient::InvalidateFilterData().

Instead always dispose of the filter data and mark paint properties for
update, and use the |filter_data_dirty_| flag as an early-out check.

Since we can now call InvalidateFilterData() directly in
SVGElementResourceClient::ResourceElementChanged(), fold
ClearFilterData() into InvalidateFilterData().

Bug: 1154050
Change-Id: I01c8ebac4f62532e2c17aabc3d998d7601dbb71b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2566992
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#832391}

--

wpt-commits: d2137c1a81095c78c1c227b379b6690af33c1240
wpt-pr: 26695
testing/web-platform/tests/css/filter-effects/svg-empty-container-with-filter-content-added.html [new file with mode: 0644]