Closed Bug 2086991 Opened 1 month ago Closed 19 days ago

[wpt-sync] Sync PR 64146 - [html-in-canvas] Disallow canvas-external SVG filters

Categories

(Core :: Graphics: Canvas2D, task, P4)

task

Tracking

()

RESOLVED FIXED
162 Branch
Tracking Status
firefox162 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Attachments

(1 file)

Sync web-platform-tests PR 64146 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/64146
Details from upstream follow.

Philip Rogers <pdr@chromium.org> wrote:

[html-in-canvas] Disallow canvas-external SVG filters

This patch prevents elements in a canvas subtree from referencing SVG
\<filter> elements outside the canvas subtree, similar to
https://crrev.com/c/8455562. Previously,
FilterEffectBuilder::BuildReferenceFilter did not check
IsInCanvasSubtree() on the target SVGFilterElement, allowing CSS
filter, CSS backdrop-filter, and SVG filter references to leak
external state such as :visited styles.

FilterEffectBuilder now accepts is_in_canvas_subtree from
PaintLayer and SVGElementResourceClient, ignoring external
\<filter> elements when set. SVGElement and SVGFilterElement also
invalidate cached filter state in DidChangeIsInCanvasSubtree.
Existing drawElementImage filter tests that placed allowed \<filter>
elements outside \<canvas> are updated to define them inside
\<canvas>.

Fixed: 576312229
Change-Id: I5174e5ac783667d18535cee8fd30ca8dbc596849
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8615847
Commit-Queue: Philip Rogers \<pdr@chromium.org>
Reviewed-by: Stephen Chenney \<schenney@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1726439}

PR 64146 applied with additional changes from upstream: f3af6a89e7af65f14b54983e543e0cd0fb26d15f

Component: web-platform-tests → Graphics: Canvas2D
Product: Testing → Core
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Attached file Notable wpt changes —

CI Results

Ran 4 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 156 tests

Status Summary

Firefox

OK : 9[GitHub] 141[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
PASS : 12
FAIL : 9[GitHub] 233[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
TIMEOUT: 1[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt] 3[GitHub]
ERROR : 8
NOTRUN : 25

Chrome

OK : 9
PASS : 11
FAIL : 1

Safari

OK : 9
FAIL : 9
TIMEOUT: 3

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

(See attachment for full changes)

Status: NEW → RESOLVED
Closed: 19 days ago
Resolution: --- → FIXED
Target Milestone: --- → 162 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: