[webkit-changes] [WebKit/WebKit] 986e05: Update Declarative Web Push to some recent standar...
Brady Eidson
noreply at github.com
Fri Dec 6 17:54:35 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 986e05d99d9e6bde8dd22bb035a815564994ce2b
https://github.com/WebKit/WebKit/commit/986e05d99d9e6bde8dd22bb035a815564994ce2b
Author: Brady Eidson <beidson at apple.com>
Date: 2024-12-06 (Fri, 06 Dec 2024)
Changed paths:
M LayoutTests/platform/mac-wk2/fast/dom/navigator-detached-no-crash-expected.txt
M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
M Source/WebCore/Modules/notifications/NotificationJSONParser.cpp
M Source/WebCore/Modules/notifications/NotificationJSONParser.h
M Source/WebCore/Modules/notifications/NotificationPayload.cpp
M Source/WebCore/Modules/notifications/NotificationPayload.h
M Source/WebKit/webpushd/WebPushDaemon.h
M Source/WebKit/webpushd/WebPushDaemon.mm
M Tools/DumpRenderTree/mac/DumpRenderTree.mm
M Tools/TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm
Log Message:
-----------
Update Declarative Web Push to some recent standards changes
rdar://114886376
https://bugs.webkit.org/show_bug.cgi?id=284094
Reviewed by Ben Nham.
This patch:
- Detects as a declarative push message via the new special JSON key/value
- Shows the notification automatically when possible
- Enables it (retaining the switch to disable)
* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Source/WebCore/Modules/notifications/NotificationJSONParser.cpp:
(WebCore::hasDeclarativeMessageJSONValues):
(WebCore::NotificationJSONParser::hasDeclarativeMessageHeader):
(WebCore::NotificationJSONParser::parseNotificationPayload):
(WebCore::NotificationJSONParser::parseNotificationOptions):
(WebCore::dirKey): Deleted.
(WebCore::langKey): Deleted.
(WebCore::bodyKey): Deleted.
(WebCore::tagKey): Deleted.
(WebCore::iconKey): Deleted.
(WebCore::dataKey): Deleted.
(WebCore::silentKey): Deleted.
(WebCore::defaultActionURLKey): Deleted.
(WebCore::titleKey): Deleted.
(WebCore::appBadgeKey): Deleted.
(WebCore::mutableKey): Deleted.
* Source/WebCore/Modules/notifications/NotificationJSONParser.h:
* Source/WebCore/Modules/notifications/NotificationPayload.cpp:
(WebCore::NotificationPayload::hasDeclarativeMessageHeader):
(WebCore::NotificationPayload::toNotificationData const):
* Source/WebCore/Modules/notifications/NotificationPayload.h:
* Source/WebKit/webpushd/WebPushDaemon.h:
* Source/WebKit/webpushd/WebPushDaemon.mm:
(WebPushD::platformDefaultActionBundleIdentifier):
(WebPushD::WebPushDaemon::injectPushMessageForTesting):
(WebPushD::supportsBuiltinNotifications):
(WebPushD::WebPushDaemon::handleIncomingPushImpl):
(WebPushD::WebPushDaemon::showNotification):
* Tools/DumpRenderTree/mac/DumpRenderTree.mm:
(setWebPreferencesForTestOptions):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm:
(TestWebKitAPI::(WebPushD, DeclarativeWebPushHandling)):
* LayoutTests/platform/mac-wk2/fast/dom/navigator-detached-no-crash-expected.txt:
Canonical link: https://commits.webkit.org/287485@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