Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e7fcdaa2dc687c21f8191d72ed837e645f574dd4
      
https://github.com/WebKit/WebKit/commit/e7fcdaa2dc687c21f8191d72ed837e645f574dd4
  Author: Elijah Sawyers <[email protected]>
  Date:   2026-09-22 (Tue, 22 Sep 2026)

  Changed paths:
    M Source/WebKit/CMakeLists.txt
    M Source/WebKit/DerivedSources-input.xcfilelist
    M Source/WebKit/DerivedSources.make
    A Source/WebKit/Shared/Extensions/WebExtensionNotification.serialization.in
    A Source/WebKit/Shared/Extensions/WebExtensionNotificationParameters.h
    M Source/WebKit/SourcesCocoa.txt
    M Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionNotification.mm
    A Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionNotificationInternal.h
    A 
Source/WebKit/UIProcess/Extensions/Cocoa/API/WebExtensionContextAPINotificationsCocoa.mm
    M Source/WebKit/UIProcess/Extensions/WebExtensionContext.h
    M Source/WebKit/UIProcess/Extensions/WebExtensionContext.messages.in
    M Source/WebKit/WebKit.xcodeproj/project.pbxproj
    M 
Source/WebKit/WebProcess/Extensions/API/Cocoa/WebExtensionAPINotificationsCocoa.mm
    M Source/WebKit/WebProcess/Extensions/API/WebExtensionAPIKeys.h
    M Source/WebKit/WebProcess/Extensions/API/WebExtensionAPINotifications.h
    M 
Source/WebKit/WebProcess/Extensions/Interfaces/WebExtensionAPINotifications.idl
    M Tools/TestWebKitAPI/Helpers/cocoa/TestWebExtensionsDelegate.h
    M Tools/TestWebKitAPI/Helpers/cocoa/TestWebExtensionsDelegate.mm
    M Tools/TestWebKitAPI/SourcesCocoa.txt
    A 
Tools/TestWebKitAPI/Tests/WebKit/WKWebView/WKWebExtensionAPINotifications.mm

  Log Message:
  -----------
  Implement browser.notifications.create() for the web extension API
https://bugs.webkit.org/show_bug.cgi?id=324708
rdar://187615546

Reviewed by Kiara Rose.

This patch implements browser.notifications.create(). The web process validates
and parses the create options into a WebExtensionNotificationParameters and 
sends
them to the UI process, which builds a _WKWebExtensionNotification and hands it 
to
the app through the new delegate method. WebKit owns the notification state in 
the
context, and the app owns presentation.

Only the fields that _WKWebExtensionNotification exposes are carried: 
identifier,
title, message, contextMessage, and buttons (each with a title). Other options 
that
Safari does not act on are accepted and ignored rather than rejected, and any
notification type is presented as basic.

Tests are included.

* Source/WebKit/CMakeLists.txt:
* Source/WebKit/DerivedSources-input.xcfilelist:
* Source/WebKit/DerivedSources.make:
* Source/WebKit/Shared/Extensions/WebExtensionNotification.serialization.in: 
Added.
* Source/WebKit/Shared/Extensions/WebExtensionNotificationParameters.h: Added.
* Source/WebKit/SourcesCocoa.txt:
* Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionNotification.mm:
* Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionNotificationInternal.h: 
Added.
* 
Source/WebKit/UIProcess/Extensions/Cocoa/API/WebExtensionContextAPINotificationsCocoa.mm:
 Added.
(WebKit::WebExtensionContext::isNotificationsMessageAllowed):
(WebKit::WebExtensionContext::notificationsCreate):
* Source/WebKit/UIProcess/Extensions/WebExtensionContext.h:
* Source/WebKit/UIProcess/Extensions/WebExtensionContext.messages.in:
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
* 
Source/WebKit/WebProcess/Extensions/API/Cocoa/WebExtensionAPINotificationsCocoa.mm:
(WebKit::parseNotificationOptions):
(WebKit::WebExtensionAPINotifications::createNotification):
* Source/WebKit/WebProcess/Extensions/API/WebExtensionAPIKeys.h:
* Source/WebKit/WebProcess/Extensions/API/WebExtensionAPINotifications.h:
* 
Source/WebKit/WebProcess/Extensions/Interfaces/WebExtensionAPINotifications.idl:
* Tools/TestWebKitAPI/Helpers/cocoa/TestWebExtensionsDelegate.h:
* Tools/TestWebKitAPI/Helpers/cocoa/TestWebExtensionsDelegate.mm:
* Tools/TestWebKitAPI/SourcesCocoa.txt:
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/WKWebExtensionAPINotifications.mm: 
Added.

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to