Bug 239636

Summary: Add WKNotification and WKWebsiteDataStore SPI for handling click/close of persistent notifications
Product: WebKit Reporter: Brady Eidson <beidson>
Component: WebKit Misc.Assignee: Brady Eidson <beidson>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, nham, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
EWS v1
ews-feeder: commit-queue-
Patch
cdumez: review+, ews-feeder: commit-queue-
Patch for landing v1
ews-feeder: commit-queue-
PFL v2
none
PFL v3
beidson: review+, beidson: commit-queue-
PFL v4
ews-feeder: commit-queue-
THANK YOU FOR THE PAIN UNIFIED BUILD v5
ews-feeder: commit-queue-
Never had this much of a problem fighting missing includes in unified build v6
ews-feeder: commit-queue-
Maybe found the source of problems v7 none

Description Brady Eidson 2022-04-21 20:31:38 PDT
Add WKWebsiteDataStore SPI for handling click/close of persistent notifications

This is to move us off of the current stop-gap to something actually works for clients.
Comment 1 Brady Eidson 2022-04-21 20:47:19 PDT
Created attachment 458109 [details]
EWS v1
Comment 2 Brady Eidson 2022-04-22 13:30:24 PDT
Created attachment 458170 [details]
Patch
Comment 3 Chris Dumez 2022-04-22 15:00:08 PDT
Comment on attachment 458170 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=458170&action=review

> Source/WebCore/Modules/notifications/NotificationDataCocoa.mm:72
> +    NotificationData data { title, body, iconURL, tag, language, direction, originString, URL { String { serviceWorkerRegistrationURL } }, *uuid, PAL::SessionID { sessionID.unsignedLongLongValue }, { } };

Return we could just:
return { title, body, iconURL, tag, language, direction, originString, URL { String { serviceWorkerRegistrationURL } }, *uuid, PAL::SessionID { sessionID.unsignedLongLongValue }, { } };

> Tools/WebKitTestRunner/cocoa/WebNotificationProviderCocoa.mm:39
> +        RetainPtr<NSDictionary> dictionaryRepresentation = adoptNS(WKNotificationCopyDictionaryRepresentation(notification.get()));

could use auto.
Comment 4 Brady Eidson 2022-04-22 15:37:51 PDT
Created attachment 458179 [details]
Patch for landing v1
Comment 5 Brady Eidson 2022-04-22 16:24:16 PDT
Created attachment 458182 [details]
PFL v2
Comment 6 Brady Eidson 2022-04-22 18:26:24 PDT
Created attachment 458192 [details]
PFL v3
Comment 7 Brady Eidson 2022-04-23 09:20:31 PDT
Created attachment 458211 [details]
PFL v4
Comment 8 Brady Eidson 2022-04-23 12:02:35 PDT
Created attachment 458220 [details]
THANK YOU FOR THE PAIN UNIFIED BUILD v5
Comment 9 Brady Eidson 2022-04-23 13:20:42 PDT
Created attachment 458221 [details]
Never had this much of a problem fighting missing includes in unified build v6
Comment 10 Brady Eidson 2022-04-23 13:31:58 PDT
Created attachment 458222 [details]
Maybe found the source of problems v7
Comment 11 EWS 2022-04-23 15:28:05 PDT
Committed r293296 (249921@main): <https://commits.webkit.org/249921@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 458222 [details].
Comment 12 Radar WebKit Bug Importer 2022-04-23 15:29:14 PDT
<rdar://problem/92222113>