[webkit-changes] [WebKit/WebKit] 15e5e6: Add Declarative Web Push flags and JSON parser

Brady Eidson noreply at github.com
Fri Sep 15 12:33:58 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 15e5e670c08d732956d975c9829525d0b0f0f31e
      https://github.com/WebKit/WebKit/commit/15e5e670c08d732956d975c9829525d0b0f0f31e
  Author: Brady Eidson <beidson at apple.com>
  Date:   2023-09-15 (Fri, 15 Sep 2023)

  Changed paths:
    M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
    M Source/WTF/wtf/PlatformEnable.h
    M Source/WebCore/Modules/notifications/Notification.cpp
    M Source/WebCore/Modules/notifications/Notification.h
    A Source/WebCore/Modules/notifications/NotificationJSONParser.cpp
    A Source/WebCore/Modules/notifications/NotificationJSONParser.h
    A Source/WebCore/Modules/notifications/NotificationPayload.cpp
    A Source/WebCore/Modules/notifications/NotificationPayload.h
    M Source/WebCore/Sources.txt
    M Source/WebCore/WebCore.xcodeproj/project.pbxproj
    M Source/WebKit/Shared/PushMessageForTesting.h
    M Source/WebKit/Shared/WTFArgumentCoders.serialization.in
    M Source/WebKit/webpushd/PushClientConnection.h
    M Source/WebKit/webpushd/PushClientConnection.messages.in
    M Source/WebKit/webpushd/PushClientConnection.mm
    M Source/WebKit/webpushd/WebPushDaemon.h
    M Source/WebKit/webpushd/WebPushDaemon.mm
    M Source/WebKit/webpushd/WebPushDaemonMain.mm
    M Source/WebKit/webpushd/webpushtool/WebPushToolConnection.mm
    M Source/WebKit/webpushd/webpushtool/WebPushToolMain.mm
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm

  Log Message:
  -----------
  Add Declarative Web Push flags and JSON parser
https://bugs.webkit.org/show_bug.cgi?id=261588

Reviewed by Chris Dumez.

This adds:
- A Declarative Web Push runtime feature flag
- A Declarative Web Push compile time ENABLE flag
- The Notification payload JSON parser
- The beginnings of webpushd understanding a JSON message
- Testing the JSON parser by messaging JSON to webpushd

* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Source/WTF/wtf/PlatformEnable.h:
* Source/WebCore/Modules/notifications/Notification.cpp:
(WebCore::Notification::create):
* Source/WebCore/Modules/notifications/Notification.h:
* Source/WebCore/Modules/notifications/NotificationJSONParser.cpp: Added.
(WebCore::dirKey):
(WebCore::langKey):
(WebCore::bodyKey):
(WebCore::tagKey):
(WebCore::iconKey):
(WebCore::dataKey):
(WebCore::silentKey):
(WebCore::defaultActionURLKey):
(WebCore::titleKey):
(WebCore::appBadgeKey):
(WebCore::optionsKey):
(WebCore::parseAppBadgeString):
(WebCore::NotificationJSONParser::parseNotificationPayload):
(WebCore::NotificationJSONParser::parseNotificationOptions):
* Source/WebCore/Modules/notifications/NotificationJSONParser.h: Added.
* Source/WebCore/Modules/notifications/NotificationPayload.cpp: Added.
(WebCore::NotificationPayload::parseJSON):
* Source/WebCore/Modules/notifications/NotificationPayload.h: Added.
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebKit/Shared/PushMessageForTesting.h:
(WebKit::WebPushD::PushMessageForTesting::encode const):
(WebKit::WebPushD::PushMessageForTesting::decode):
* Source/WebKit/Shared/WTFArgumentCoders.serialization.in:
* Source/WebKit/webpushd/PushClientConnection.h:
* Source/WebKit/webpushd/PushClientConnection.messages.in:
* Source/WebKit/webpushd/PushClientConnection.mm:
(WebPushD::PushClientConnection::injectPushMessageForTesting):
* Source/WebKit/webpushd/WebPushDaemon.h:
(WebPushD::WebPushDaemon::setMachServiceName):
* Source/WebKit/webpushd/WebPushDaemon.mm:
(WebPushD::WebPushDaemon::injectPushMessageForTesting):
(WebPushD::WebPushDaemon::getPendingPushMessages):
* Source/WebKit/webpushd/WebPushDaemonMain.mm:
(WebKit::WebPushDaemonMain):
* Source/WebKit/webpushd/webpushtool/WebPushToolConnection.mm:
(WebPushTool::Connection::sendPushMessage):
* Source/WebKit/webpushd/webpushtool/WebPushToolMain.mm:
(pushMessageFromArguments):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm:

Canonical link: https://commits.webkit.org/268032@main




More information about the webkit-changes mailing list