Closed Bug 1968987 Opened 7 months ago Closed 3 months ago

Implement ToggleEvent.source

Categories

(Core :: DOM: Core & HTML, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
145 Branch
Tracking Status
firefox145 --- fixed

People

(Reporter: jarhar, Assigned: keithamus)

References

(Blocks 1 open bug)

Details

(Keywords: dev-doc-complete)

Attachments

(2 files)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36

Steps to reproduce:

The ToggleEvent interface is getting a new "source" attribute added which is set to the element which triggered the toggling of the target element, such as a popover's invoker button: https://github.com/whatwg/html/pull/11186

The Bugbug bot thinks this bug should belong to the 'Core::DOM: Core & HTML' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → DOM: Core & HTML
Product: Firefox → Core
Assignee: nobody → mozilla
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true

This takes the generated code of ToggleEvent and moves it into
dom/events, so that we can add the SetSource & GetSource members,
which set a Source RefPtr. This also requires us to add cycle collection
for mSource.

mSource is always retargeted against currentTarget just like
CommandEvent.

This uses the implicit "invoker" from each element to set the
ToggleEvent Source, so that toggle events dispatched from Dialogs &
Popovers include the source attribute.

Pushed by amarc@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/4dd97b58efff https://hg.mozilla.org/integration/autoland/rev/b1f76add2c5b Revert "Bug 1968987 - Part 2 - Set ToggleEvent source on Popover/Dialog r=smaug,dom-core" for causing build bustages @ ToggleEvent.cpp

Backed out for causing build bustages

Flags: needinfo?(mozilla)
Flags: needinfo?(mozilla)
Pushed by sstanca@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/9ecc18eebfd5 https://hg.mozilla.org/integration/autoland/rev/93d0472557e9 Revert "Bug 1968987 - fix linting failure in details-toggle-source.html." for causing wpt failures in details-toggle-source.html .

Reverted this because it was causing wpt failures in details-toggle-source.html .

  • Revert link
  • Push with failures
  • Failure Log
  • Failure line: TEST-UNEXPECTED-FAIL | /html/semantics/interactive-elements/the-details-element/details-toggle-source.html | ToggleEvent.source on <details> elements: click details. - assert_true: An opening toggle event should have been fired. expected true got false
Flags: needinfo?(mozilla)
Flags: needinfo?(mozilla)
Blocks: 1991074
Pushed by agoloman@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/654ef7406815 https://hg.mozilla.org/integration/autoland/rev/54b91e60b1c5 Revert "Bug 1968987: apply code formatting via Lando" for causing wpt failures @details-toggle-source.html.

Backed out for causing wpt failures @details-toggle-source.html.

Flags: needinfo?(mozilla)
Flags: needinfo?(mozilla)
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 145 Branch
QA Whiteboard: [qa-triage-done-c146/b145]
Keywords: dev-doc-needed

FF145 MDN work for this can be tracked in https://github.com/mdn/content/issues/41543

Depends on: 2004709
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: