[webkit-changes] [WebKit/WebKit] 15cf18: Strengthen configuration check in UIClient::create...

Alex Christensen noreply at github.com
Mon Aug 26 13:04:29 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 15cf18453a96df5ef307c4f27f9edf03a8b3a0cb
      https://github.com/WebKit/WebKit/commit/15cf18453a96df5ef307c4f27f9edf03a8b3a0cb
  Author: Alex Christensen <achristensen at apple.com>
  Date:   2024-08-26 (Mon, 26 Aug 2024)

  Changed paths:
    M Source/WebKit/UIProcess/Cocoa/UIDelegate.mm
    M Tools/TestWebKitAPI/Tests/WebKit/GetUserMedia.mm
    M Tools/TestWebKitAPI/cocoa/UserMediaCaptureUIDelegate.h
    M Tools/TestWebKitAPI/cocoa/UserMediaCaptureUIDelegate.mm
    M Tools/TestWebKitAPI/mac/PlatformWebViewMac.mm

  Log Message:
  -----------
  Strengthen configuration check in UIClient::createNewPage
https://bugs.webkit.org/show_bug.cgi?id=278385
rdar://134346771

Reviewed by Charlie Wolfe.

When WKUIDelegate.createWebViewWithConfiguration is called, we need that configuration
to actually be used.  It used to be possible to use WKWebViewConfiguration._relatedWebView
to take another WKWebViewConfiguration and make it look similar enough that WebKit didn't
care it wasn't the same, but with site isolation we need to store more information than
the _relatedWebView on the configuration (the API::PageConfiguration::OpenerInfo) so
it is no longer possible to use _relatedWebView to retrofit another configuration and have
the opener be set up correctly.  I went through the users of _relatedWebView, and I think
the only client that still does this is WebKitTestRunner, so I strengthen the check
and fix WebKitTestRunner, and one test in TestWebKitAPI, which I replace by using the
correct configuration.

* Source/WebKit/UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::UIClient::createNewPage):
* Tools/TestWebKitAPI/Tests/WebKit/GetUserMedia.mm:
(TestWebKitAPI::TransferTrackBetweenSameProcessPages)):
* Tools/TestWebKitAPI/cocoa/UserMediaCaptureUIDelegate.h:
* Tools/TestWebKitAPI/cocoa/UserMediaCaptureUIDelegate.mm:
(-[UserMediaCaptureUIDelegate webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures:]):
(-[UserMediaCaptureUIDelegate setWebViewForPopup:]): Deleted.
* Tools/TestWebKitAPI/mac/PlatformWebViewMac.mm:
(TestWebKitAPI::PlatformWebView::initialize):

Canonical link: https://commits.webkit.org/282760@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