Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 29c19d789902406975ea994e9838e33251b8422a
      
https://github.com/WebKit/WebKit/commit/29c19d789902406975ea994e9838e33251b8422a
  Author: Youenn Fablet <[email protected]>
  Date:   2024-09-06 (Fri, 06 Sep 2024)

  Changed paths:
    M Source/WebKit/WebProcess/Storage/WebSWClientConnection.cpp
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm

  Log Message:
  -----------
  A service worker should be able to focus a page that is not yet loaded
https://bugs.webkit.org/show_bug.cgi?id=279181
rdar://135337772

Reviewed by Ben Nham.

Controlled service worker clients are exposed to service workers as soon as 
their navigation load hits the network process.
At this point, in the WebProcess, there is a DocumentLoader but not yet a 
Document.
We update WebSWClientConnection::focusServiceWorkerClient to get the WebPage 
from a DocumentLoader if there is no Document.

* Source/WebKit/WebProcess/Storage/WebSWClientConnection.cpp:
(WebKit::pageFromScriptExecutionContextIdentifier):
(WebKit::WebSWClientConnection::focusServiceWorkerClient):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
((ServiceWorker, FocusNotYetLoadedClient)):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to