[wpt-sync] Sync PR 52829 - Improve Event.source retargeting
Categories
(Core :: DOM: Core & HTML, task, P4)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox141 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Attachments
(2 files)
Sync web-platform-tests PR 52829 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/52829
Details from upstream follow.
Joey Arhar <jarhar@chromium.org> wrote:
Improve Event.source retargeting
Before this patch, the source attribute of ToggleEvent and CommandEvent
can be leaked from inside a ShadowRoot by looking at the attribute after
event dispatch.This patch fixes this by retargeting the source attribute against the
event's target, which is already set up to avoid leakage.Side note: This is similar to relatedTarget, but relatedTarget is
extremely complicated and it makes me wonder why we can't remove all
that code and make relatedTarget work like source.Bug: 420639769
Change-Id: I2d16741e703b109677af2cb0d882d391d63caccc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6526266
Commit-Queue: Joey Arhar \<jarhar@chromium.org>
Reviewed-by: Mason Freed \<masonf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1466495}
| Assignee | ||
Updated•11 months ago
|
| Assignee | ||
Comment 1•11 months ago
|
||
| Assignee | ||
Comment 2•11 months ago
|
||
CI Results
Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 1 tests and 3 subtests
Status Summary
Firefox
OK : 1
FAIL: 3
Chrome
OK : 1
PASS: 1
FAIL: 2
Safari
OK : 1
FAIL: 3
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
New Tests That Don't Pass
- /html/semantics/the-button-element/command-and-commandfor/source-attribute-retargeting.tentative.html [wpt.fyi]
- CommandEvent.source and ToggleEvent.source should be retargeted during and after event dispatch.:
FAIL(Chrome:FAIL, Safari:FAIL) - CommandEvent.source should be retargeted when manually dispatched with composed set to true.:
FAIL(Chrome:FAIL, Safari:FAIL) - CommandEvent.source and ToggleEvent.source should not be set to null after dispatch without ShadowDOM.:
FAIL(Chrome:PASS, Safari:FAIL)
- CommandEvent.source and ToggleEvent.source should be retargeted during and after event dispatch.:
| Assignee | ||
Comment 3•11 months ago
|
||
Automatic update from web-platform-tests
Improve Event.source retargeting
Before this patch, the source attribute of ToggleEvent and CommandEvent
can be leaked from inside a ShadowRoot by looking at the attribute after
event dispatch.
This patch fixes this by retargeting the source attribute against the
event's target, which is already set up to avoid leakage.
Side note: This is similar to relatedTarget, but relatedTarget is
extremely complicated and it makes me wonder why we can't remove all
that code and make relatedTarget work like source.
Bug: 420639769
Change-Id: I2d16741e703b109677af2cb0d882d391d63caccc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6526266
Commit-Queue: Joey Arhar <jarhar@chromium.org>
Reviewed-by: Mason Freed <masonf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1466495}
--
wpt-commits: 8c574723e8eca556df3567f2a47b2dff6df9504c
wpt-pr: 52829
| Assignee | ||
Comment 4•11 months ago
|
||
wpt-pr: 52829
wpt-type: metadata
Comment 6•11 months ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/1cd988d62af8
https://hg.mozilla.org/mozilla-central/rev/fdf7c18dab60
Description
•