Closed Bug 2084703 Opened 1 month ago Closed 24 days ago

[wpt-sync] Sync PR 63977 - WebKit export of https://bugs.webkit.org/show_bug.cgi?id=328210

Categories

(Core :: SVG, task, P4)

task

Tracking

()

RESOLVED FIXED
162 Branch
Tracking Status
firefox162 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Karl Dubost <k_dubost@apple.com> wrote:

WebKit export of https://bugs.webkit.org/show_bug.cgi?id=328210

WebKit export from bug: composedPath(<!---->)<!----> in a listener on a use element exposes its user agent shadow root

<pre>
composedPath() in a listener on a use element exposes its user agent shadow root

For a click on the shape drawn by a use element, composedPath() in a
listener on the use returns the use shadow root, and lists the use
twice:

 use &gt; ShadowRoot &gt; use &gt; svg &gt; body &gt; html &gt; document &gt; window

Firefox and Chrome return:

 use &gt; svg &gt; body &gt; html &gt; document &gt; window

SVG 2 says the use shadow tree is closed:

 The shadow tree is closed (not inspectable by script): its shadow
 root&apos;s mode is &quot;closed&quot;.

<a href="https://w3c.github.io/svgwg/svg2-draft/struct.html#UseShadowTree">https://w3c.github.io/svgwg/svg2-draft/struct.html#UseShadowTree</a>

For a closed tree, composedPath() leaves its nodes out when the listener
is outside it. The DOM steps also look for the current target starting
from the end of the event path:

<a href="https://dom.spec.whatwg.org/#dom-event-composedpath">https://dom.spec.whatwg.org/#dom-event-composedpath</a>

The nodes of the use shadow tree report the use as their current target,
so the event path has several entries for it. WebKit used the first
one, the copy inside the shadow tree, and filtered the path from there.
Use the last one, the use itself.

The listener still runs once per click. Only the path was wrong.

WebKit-Bug: <a href="https://bugs.webkit.org/show_bug.cgi?id=328210">https://bugs.webkit.org/show_bug.cgi?id=328210</a>
</pre>

Component: web-platform-tests → SVG
Product: Testing → Core

CI Results

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

Total 25 tests and 6 subtests

Status Summary

Firefox

OK : 1[GitHub] 23[Gecko-windows11-32-25h2-opt] 24[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
PASS: 2[GitHub] 50[Gecko-windows11-32-25h2-opt] 53[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
FAIL: 7

Chrome

OK : 1
PASS: 2

Safari

OK : 1
PASS: 1
FAIL: 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

Tests Disabled in Gecko Infrastructure

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