[webkit-changes] [WebKit/WebKit] b8064a: NotificationEvent interface exists but Notificatio...
bnham
noreply at github.com
Wed Feb 22 11:10:55 PST 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b8064a7a1a7b4a20279f29b11d423dae483436c9
https://github.com/WebKit/WebKit/commit/b8064a7a1a7b4a20279f29b11d423dae483436c9
Author: Ben Nham <nham at apple.com>
Date: 2023-02-22 (Wed, 22 Feb 2023)
Changed paths:
M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
M Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm
M Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h
M Tools/TestWebKitAPI/Tests/WebKitCocoa/PushAPI.mm
Log Message:
-----------
NotificationEvent interface exists but Notification interface does not on iOS 16.4
https://bugs.webkit.org/show_bug.cgi?id=252625
rdar://105697554
Reviewed by Chris Dumez.
On iOS, NotificationEvent is enabled by default but Notification is disabled by default. This
doesn't make any sense, since a NotificationEvent contains a Notification. Furthermore, you can't
actually even get a NotificationEvent on iOS with a default browser since the supporting machinery
to generate and fire the notification event only exists in Web.app. So it should definitely not
default to true.
To fix this, we only enable NotificationEvent where we used to (i.e. on macOS >= 13). Web.app will
enable this preference at runtime so that Web Push and NotificationEvent work as expected in that
app.
* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _setNotificationEventEnabled:]):
(-[WKPreferences _notificationEventEnabled]):
* Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/PushAPI.mm:
Canonical link: https://commits.webkit.org/260685@main
More information about the webkit-changes
mailing list