Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 4491a4bfde5c3babf29fc24ef7862ffabdc7595a
      
https://github.com/WebKit/WebKit/commit/4491a4bfde5c3babf29fc24ef7862ffabdc7595a
  Author: Zak Ridouh <[email protected]>
  Date:   2026-10-09 (Fri, 09 Oct 2026)

  Changed paths:
    M 
Source/WebKit/UIProcess/Notifications/WebNotificationManagerMessageHandler.cpp
    M Source/WebKit/UIProcess/RemotePageProxy.cpp
    M Source/WebKit/UIProcess/WebPageProxy.cpp
    M Source/WebKit/UIProcess/WebPageProxy.h
    M Tools/TestWebKitAPI/Helpers/TestNotificationProvider.cpp
    M Tools/TestWebKitAPI/Helpers/TestNotificationProvider.h
    M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SiteIsolation.mm

  Log Message:
  -----------
  [Site Isolation] Notifications from cross-site iframes are never shown
<https://bugs.webkit.org/show_bug.cgi?id=326159>
<rdar://problem/189051045>

Reviewed by Sihui Liu.

With site isolation, notifications created in a cross-site iframe were silently 
dropped, because the UI process only
listened for notification messages from the main frame's process. Register the 
page's notification handler for every
remote page as well. Because any of the page's processes can now show a 
notification, reject one whose origin the
sending process does not host, and use the sending process's preferences 
instead of the main frame process's.

Test: Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SiteIsolation.mm

* 
Source/WebKit/UIProcess/Notifications/WebNotificationManagerMessageHandler.cpp:
(WebKit::WebNotificationManagerMessageHandler::showNotification):
(WebKit::WebNotificationManagerMessageHandler::sharedPreferencesForWebProcess 
const):
* Source/WebKit/UIProcess/RemotePageProxy.cpp:
(WebKit::RemotePageProxy::RemotePageProxy):
(WebKit::RemotePageProxy::disconnect):
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::notificationManagerMessageHandler):
* Source/WebKit/UIProcess/WebPageProxy.h:
* Tools/TestWebKitAPI/Helpers/TestNotificationProvider.cpp:
(TestWebKitAPI::TestNotificationProvider::showWebNotification):
* Tools/TestWebKitAPI/Helpers/TestNotificationProvider.h:
(TestWebKitAPI::TestNotificationProvider::lastNotificationOrigin const):
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SiteIsolation.mm:
(TestWebKitAPI::TEST(SiteIsolation, NotificationFromCrossSiteIframeIsShown)):

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



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

Reply via email to