[webkit-changes] [WebKit/WebKit] 95e930: Stop setting _relatedWebView for Web Extensions.

Timothy Hatcher noreply at github.com
Thu Feb 6 07:14:17 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 95e9300b4ddff64d84d79306ec9c3f38889a4db8
      https://github.com/WebKit/WebKit/commit/95e9300b4ddff64d84d79306ec9c3f38889a4db8
  Author: Timothy Hatcher <timothy at apple.com>
  Date:   2025-02-06 (Thu, 06 Feb 2025)

  Changed paths:
    M Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm
    M Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h
    M Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionContextCocoa.mm
    M Tools/TestWebKitAPI/cocoa/WebExtensionUtilities.mm

  Log Message:
  -----------
  Stop setting _relatedWebView for Web Extensions.
https://webkit.org/b/281522
rdar://problem/137987256

Reviewed by Alex Christensen.

Stop using _relatedWebView and add support for running web extension API
tests with site isolation enabled. Only two dev tools tests fail currently,
which are blocked on work to make Web Inspector work with site isolation.

Added convenience property to WKPreferences for site isolation to make checking
and toggling the feature flag easy from ObjC.

* Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _siteIsolationEnabled]): Added.
(-[WKPreferences _setSiteIsolationEnabled:]): Added.
* Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h:
* Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionContextCocoa.mm:
(WebKit::WebExtensionContext::webViewConfiguration): Stop setting _relatedWebView
when site isolation is enabled.
(WebKit::WebExtensionContext::loadInspectorBackgroundPage): Stop doing work to
load the inspector background page in the same process as the inspector when
site isolation is enabled. With site isolation, we now load the extension frame
in the extension web process, matching Chrome.
* Tools/TestWebKitAPI/cocoa/WebExtensionUtilities.mm:
(-[TestWebExtensionManager initForExtension:extensionControllerConfiguration:]): Toggle
site isolation feature based on shouldEnableSiteIsolation global.
(-[TestWebExtensionTab initWithWindow:extensionController:]): Ditto.
(-[TestWebExtensionTab changeWebViewIfNeededForURL:forExtensionContext:]): Ditto.

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



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


More information about the webkit-changes mailing list