Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2c8844dd6e6360b7dadc851e1ffe4b503f2156ae
      
https://github.com/WebKit/WebKit/commit/2c8844dd6e6360b7dadc851e1ffe4b503f2156ae
  Author: Chris Dumez <[email protected]>
  Date:   2026-03-11 (Wed, 11 Mar 2026)

  Changed paths:
    M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
    M Source/WTF/wtf/PlatformHave.h
    M Source/WTF/wtf/cocoa/SoftLinking.h
    M Source/WebCore/PAL/pal/spi/cocoa/NetworkSPI.h
    M Source/WebKit/Configurations/AllowedSPI.toml
    M Source/WebKit/NetworkProcess/cocoa/NetworkSoftLink.h
    M Source/WebKit/NetworkProcess/cocoa/NetworkSoftLink.mm
    M 
Source/WebKit/NetworkProcess/webtransport/cocoa/NetworkTransportSessionCocoa.mm
    M 
Source/WebKit/NetworkProcess/webtransport/cocoa/NetworkTransportStreamCocoa.mm
    M Source/WebKit/Shared/WebPreferencesDefaultValues.h
    M Tools/TestWebKitAPI/NetworkConnection.h
    M Tools/TestWebKitAPI/NetworkConnection.mm
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/WebTransport.mm
    M Tools/TestWebKitAPI/WebTransportServer.h
    M Tools/TestWebKitAPI/WebTransportServer.mm

  Log Message:
  -----------
  Use feature detection to turn on WebTransport instead of a compile-time flag
https://bugs.webkit.org/show_bug.cgi?id=309546

Reviewed by Per Arne Vollan.

Detect whether WebTransport is available in CFNetwork at runtime and turn
on the feature based on that, instead of relying on a compile time flag.

This should allow the feature to get turned on sooner in Safari Technology
Preview.

Also fix a crash in API tests I noticed while validating this PR. I was
seeing thread-safety assertions in RefCounted in the API test server
so I used ThreadSafeRefCounted instead.

This PR is based on initial work by Ankshit Jain.

Tests: Tools/TestWebKitAPI/NetworkConnection.h
       Tools/TestWebKitAPI/NetworkConnection.mm
       Tools/TestWebKitAPI/Tests/WebKitCocoa/WebTransport.mm
       Tools/TestWebKitAPI/WebTransportServer.h
       Tools/TestWebKitAPI/WebTransportServer.mm

* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Source/WTF/wtf/PlatformHave.h:
* Source/WTF/wtf/cocoa/SoftLinking.h:
* Source/WebCore/PAL/pal/spi/cocoa/NetworkSPI.h:
* Source/WebKit/Configurations/AllowedSPI.toml:
* Source/WebKit/NetworkProcess/cocoa/NetworkSoftLink.h:
* Source/WebKit/NetworkProcess/cocoa/NetworkSoftLink.mm:
* 
Source/WebKit/NetworkProcess/webtransport/cocoa/NetworkTransportSessionCocoa.mm:
(WebKit::createParameters):
(WebKit::NetworkTransportSession::create):
(WebKit::NetworkTransportSession::initialize):
(WebKit::NetworkTransportSession::setupDatagramConnection):
(WebKit::NetworkTransportSession::sendDatagram):
(WebKit::NetworkTransportSession::setupConnectionHandler):
(WebKit::NetworkTransportSession::createStream):
(WebKit::NetworkTransportSession::receiveDatagramLoop):
(WebKit::NetworkTransportSession::terminate):
(WebKit::NetworkTransportSession::isSessionClosed const):
* 
Source/WebKit/NetworkProcess/webtransport/cocoa/NetworkTransportStreamCocoa.mm:
(WebKit::NetworkTransportStream::initializeReadyConnection):
(WebKit::NetworkTransportStream::cancelReceive):
(WebKit::NetworkTransportStream::cancelSend):
* Source/WebKit/Shared/WebPreferencesDefaultValues.h:
* Tools/TestWebKitAPI/NetworkConnection.h:
* Tools/TestWebKitAPI/NetworkConnection.mm:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/WebTransport.mm:
(TestWebKitAPI::TEST(WebTransport, ClientBidirectional)):
(TestWebKitAPI::TEST(WebTransport, Datagram)):
(TestWebKitAPI::TEST(WebTransport, Unidirectional)):
(TestWebKitAPI::TEST(WebTransport, ServerBidirectional)):
(TestWebKitAPI::TEST(WebTransport, NetworkProcessCrash)):
(TestWebKitAPI::TEST(WebTransport, Worker)):
(TestWebKitAPI::TEST(WebTransport, WorkerAfterNetworkProcessCrash)):
(TestWebKitAPI::TEST(WebTransport, ServiceWorker)):
(TestWebKitAPI::CreateStreamsBeforeReady)):
(TestWebKitAPI::DISABLED_CSP)):
(TestWebKitAPI::ServerCertificateHashes)):
(TestWebKitAPI::ServerConnectionTermination)):
(TestWebKitAPI::BackForwardCache)):
(TestWebKitAPI::ServerDrain)):
(TestWebKitAPI::DISABLED_ClientStreamAborts)):
(TestWebKitAPI::DISABLED_ServerStreamAborts)):
* Tools/TestWebKitAPI/WebTransportServer.h:
* Tools/TestWebKitAPI/WebTransportServer.mm:
(TestWebKitAPI::WebTransportServer::isAvailable):

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



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

Reply via email to