[webkit-changes] [WebKit/WebKit] bd7649: Implement toggleevents for dialog open/close
Keith Cirkel
noreply at github.com
Sun Feb 2 02:28:38 PST 2025
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: bd7649ea03d308c55de707c6cf8488dc552d43f9
https://github.com/WebKit/WebKit/commit/bd7649ea03d308c55de707c6cf8488dc552d43f9
Author: Keith Cirkel <webkit at keithcirkel.co.uk>
Date: 2025-02-02 (Sun, 02 Feb 2025)
Changed paths:
M LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/toggle-events.tentative-expected.txt
M Source/WebCore/html/HTMLDialogElement.cpp
M Source/WebCore/html/HTMLDialogElement.h
Log Message:
-----------
Implement toggleevents for dialog open/close
https://bugs.webkit.org/show_bug.cgi?id=268160
Reviewed by Tim Nguyen.
This adds the `beforetoggle` cancelable event to `show()`/`showModal()`
calls. If `beforetoggle` isn't cancelled, it will show the dialog and
dispatch a `toggle` event.
Likewise, the close method adds a NON cancelable `beforetoggle` and
`toggle` event.
These events can help developers when prepping a dialog to be shown or
hidden, such as doing page calculations or kicking off animations.
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/toggle-events.tentative-expected.txt:
* Source/WebCore/html/HTMLDialogElement.cpp:
(WebCore::HTMLDialogElement::show):
(WebCore::HTMLDialogElement::showModal):
(WebCore::HTMLDialogElement::close):
(WebCore::HTMLDialogElement::queueDialogToggleEventTask):
* Source/WebCore/html/HTMLDialogElement.h:
Canonical link: https://commits.webkit.org/289695@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list