| Summary: | Support <dialog> element close event | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Tim Nguyen (:ntim) <ntim> | ||||||
| Component: | DOM | Assignee: | Tim Nguyen (:ntim) <ntim> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Normal | CC: | cdumez, changseok, darin, dbarton, esprehn+autocc, ews-watchlist, fred.wang, gyuyoung.kim, kangil.han, koivisto, kondapallykalyan, webkit-bug-importer | ||||||
| Priority: | P2 | Keywords: | InRadar | ||||||
| Version: | WebKit Nightly Build | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Bug Depends on: | |||||||||
| Bug Blocks: | 84635, 227915 | ||||||||
| Attachments: |
|
||||||||
|
Description
Tim Nguyen (:ntim)
2021-06-29 10:54:31 PDT
Created attachment 432575 [details]
Patch
Comment on attachment 432575 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=432575&action=review > Source/WebCore/html/HTMLDialogElement.h:28 > +#include "EventSender.h" You can forward declare EventSender with template<typename T> class EventSender; so you don't need this include in the header (slightly reducing header bloat and so improving compile times). See the other EventSenders. > Source/WebCore/html/HTMLDialogElement.h:33 > +typedef EventSender<HTMLDialogElement> DialogEventSender; Modern replacement for typedef is using: using DialogEventSender = EventSender<HTMLDialogElement>; I find it more readable. > Source/WebCore/html/HTMLDialogElement.h:57 > - void toggleOpen(); > + void toggleOpen(bool newValue); This should be renamed to setOpen since it is now a setter rather than a toggle. No need for parameter name, it is obvious from context. Created attachment 432578 [details]
Patch
Committed r279406 (239271@main): <https://commits.webkit.org/239271@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 432578 [details]. Comment on attachment 432575 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=432575&action=review >> Source/WebCore/html/HTMLDialogElement.h:28 >> +#include "EventSender.h" > > You can forward declare EventSender with > > template<typename T> class EventSender; > > so you don't need this include in the header (slightly reducing header bloat and so improving compile times). See the other EventSenders. In fact, can do this: template<typename> class EventSender; |