-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Declarative Web Push: Add "defaultAction" member to Notification and …
…NotificationOptions https://bugs.webkit.org/show_bug.cgi?id=262004 rdar://115938949 Reviewed by Dan Glastonbury. When a declarative web push message comes in, it is required to have a default action URL. This is so the user activating the notification can bypass service workers, as service workers are not required. If the message is mutable, and a `pushnotification` event handler decides to show a different notification, then that notification also needs a default action URL. We put that as an option on NotificationOptions, add a Notification accessor for it, and enforce that new notifications shown during `pushnotification` event handlers have one. Then we test it. * Source/WebCore/Modules/notifications/Notification.cpp: (WebCore::Notification::create): (WebCore::Notification::Notification): (WebCore::Notification::data const): * Source/WebCore/Modules/notifications/Notification.h: * Source/WebCore/Modules/notifications/Notification.idl: * Source/WebCore/Modules/notifications/NotificationOptions.idl: * Source/WebCore/workers/service/ServiceWorkerRegistration.cpp: (WebCore::ServiceWorkerRegistration::showNotification): * Tools/TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm: Canonical link: https://commits.webkit.org/268402@main
- Loading branch information
Showing
6 changed files
with
126 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters