Bug 1825646 [wpt PR 39288] - Add support for "dropShadow" in CanvasFilter., a=testonly
commit5d6c4c5646cc40146ed6db4d88ac56c04be3838b
authorJean-Philippe Gravel <jpgravel@chromium.org>
Thu, 13 Apr 2023 04:30:57 +0000 (13 04:30 +0000)
committermoz-wptsync-bot <wptsync@mozilla.com>
Fri, 14 Apr 2023 11:15:46 +0000 (14 11:15 +0000)
tree141d89118284b166abb0661e435abfb023f48ea4
parentdd8ab39dd8ed50a15d00d1f45c605fa39a5da691
Bug 1825646 [wpt PR 39288] - Add support for "dropShadow" in CanvasFilter., a=testonly

Automatic update from web-platform-tests
Add support for "dropShadow" in CanvasFilter.

This is based on the SVG feDropShadow specification:
https://drafts.fxtf.org/filter-effects/#feDropShadowElement

There are a few known limitations right now:
 - SVG's feDropShadow supports different blur values for the X and
   the Y directions. We can't easily support this with CanvasFilter
   right now because it's implemented by leveraging the CSS code
   and CSS doesn't support different X/Y blur values.

 - For now, `currentColor` and `color-scheme` are not supported.
   These depend on the DOM element computed style, which is not
   available when we do `new CanvasFilter(...)`. To support
   `CurrentColor` and `color-schemes`, we would need maintain
   unresolved colors in the CanvasFilter object and resolve these
   colors only when the filter is assigned to a canvas element
   context. This is possible, but it's better if we only add this
   complexity if it's really needed.

Change-Id: I402c8a43c9e227ac3e5f363aee1946619a408716
Bug: 1428652
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4386673
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Commit-Queue: Jean-Philippe Gravel <jpgravel@chromium.org>
Reviewed-by: Aaron Krajeski <aaronhk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1126225}

--

wpt-commits: 97908a14c0ba125be6d284b30ccb7f822e830525
wpt-pr: 39288
testing/web-platform/tests/html/canvas/element/filters/2d.filter.canvasFilterObject.dropShadow.exceptions.tentative.html [new file with mode: 0644]
testing/web-platform/tests/html/canvas/element/manual/filters/tentative/canvas-filter-object-drop-shadow-expected.html [new file with mode: 0644]
testing/web-platform/tests/html/canvas/element/manual/filters/tentative/canvas-filter-object-drop-shadow.html [new file with mode: 0644]
testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.exceptions.tentative.html [new file with mode: 0644]
testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.exceptions.tentative.worker.js [new file with mode: 0644]
testing/web-platform/tests/html/canvas/tools/gentestutilsunion.py
testing/web-platform/tests/html/canvas/tools/yaml-new/filters.yaml