Bug 227534 - Implement support for <dialog> element cancel event
Summary: Implement support for <dialog> element cancel event
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tim Nguyen (:ntim)
URL:
Keywords: InRadar
Depends on: 227800 228822
Blocks: dialog-element
  Show dependency treegraph
 
Reported: 2021-06-30 09:37 PDT by Tim Nguyen (:ntim)
Modified: 2021-08-05 13:57 PDT (History)
12 users (show)

See Also:


Attachments
Patch (80.57 KB, patch)
2021-07-12 06:20 PDT, Tim Nguyen (:ntim)
no flags Details | Formatted Diff | Diff
Patch (92.45 KB, patch)
2021-08-05 10:42 PDT, Tim Nguyen (:ntim)
no flags Details | Formatted Diff | Diff
Patch (96.35 KB, patch)
2021-08-05 13:46 PDT, Tim Nguyen (:ntim)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Nguyen (:ntim) 2021-06-30 09:37:39 PDT
Pressing "Esc" should "cancel" the dialog: e.g. close it, and emit a "cancel" event.
Comment 1 Tim Nguyen (:ntim) 2021-06-30 09:48:53 PDT
This is only for modal dialogs.
Comment 2 Radar WebKit Bug Importer 2021-06-30 09:49:10 PDT
<rdar://problem/79971694>
Comment 3 Tim Nguyen (:ntim) 2021-07-12 06:20:24 PDT
Created attachment 433314 [details]
Patch
Comment 4 Tim Nguyen (:ntim) 2021-08-05 10:42:48 PDT
Created attachment 435004 [details]
Patch
Comment 5 EWS Watchlist 2021-08-05 10:43:45 PDT
This patch modifies the imported WPT tests. Please ensure that any changes on the tests (not coming from a WPT import) are exported to WPT. Please see https://trac.webkit.org/wiki/WPTExportProcess
Comment 6 Tim Nguyen (:ntim) 2021-08-05 11:09:10 PDT
WPT PR: https://github.com/web-platform-tests/wpt/pull/29917
Comment 7 Chris Dumez 2021-08-05 12:49:17 PDT
Comment on attachment 435004 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=435004&action=review

r=me

> Source/WebCore/page/EventHandler.cpp:3514
> +    if (HTMLDialogElement* activeModalDialog = m_frame.document()->activeModalDialog()) {

auto*
Comment 8 Tim Nguyen (:ntim) 2021-08-05 13:46:08 PDT
Created attachment 435021 [details]
Patch
Comment 9 Tim Nguyen (:ntim) 2021-08-05 13:57:04 PDT
Committed r280703 (240299@main): <https://commits.webkit.org/240299@main>