Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6da13b652a6ee8c9b536a3ef38bf3050a5d76416
      
https://github.com/WebKit/WebKit/commit/6da13b652a6ee8c9b536a3ef38bf3050a5d76416
  Author: Ian Gower <[email protected]>
  Date:   2026-09-25 (Fri, 25 Sep 2026)

  Changed paths:
    A 
LayoutTests/http/wpt/fetch/local-network-access/address-space-overrides-apply-to-both-host-forms-expected.txt
    A 
LayoutTests/http/wpt/fetch/local-network-access/address-space-overrides-apply-to-both-host-forms.html
    A 
LayoutTests/http/wpt/fetch/local-network-access/resources/lna-reporting-frame.html
    M LayoutTests/imported/w3c/resources/config.json
    M LayoutTests/platform/glib/TestExpectations
    M Source/WebKit/NetworkProcess/NetworkSession.cpp
    M Source/WebKit/NetworkProcess/NetworkSession.h
    M Source/WebKit/NetworkProcess/NetworkSessionCreationParameters.h
    M 
Source/WebKit/NetworkProcess/NetworkSessionCreationParameters.serialization.in
    M Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm
    M Source/WebKit/UIProcess/API/C/WKWebsiteDataStoreConfigurationRef.cpp
    M Source/WebKit/UIProcess/API/C/WKWebsiteDataStoreConfigurationRef.h
    M Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp
    M Source/WebKit/UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp
    M Source/WebKit/UIProcess/WebsiteData/WebsiteDataStoreConfiguration.h
    M Tools/DumpRenderTree/mac/DumpRenderTree.mm
    M Tools/Scripts/webkitpy/port/base.py
    M Tools/Scripts/webkitpy/port/driver.py
    M Tools/WebKitTestRunner/Options.cpp
    M Tools/WebKitTestRunner/Options.h
    M Tools/WebKitTestRunner/TestController.cpp
    M Tools/WebKitTestRunner/TestController.h

  Log Message:
  -----------
  [Re-land] Add a way for tests to override a host's IP address space
https://bugs.webkit.org/show_bug.cgi?id=323474
rdar://186702010

Reviewed by Alex Christensen.

Re-land of https://commits.webkit.org/321703@main, reverted as 
https://commits.webkit.org/321745@main
(https://bugs.webkit.org/show_bug.cgi?id=325081) because every WebKit1 layout 
test crashed on launch.
webkitpy passed --ip-address-space-overrides to DumpRenderTree as well as 
WebKitTestRunner, and
DumpRenderTree exits on an option it does not know. DumpRenderTree now accepts 
and ignores it, as it
already accepts the other options webkitpy always passes. WebKitLegacy has no 
Local Network Access, so
there is nothing for it to apply.

Feature work for Local Network Access 
(https://wicg.github.io/local-network-access/).

Every server the layout test runner starts binds loopback, so a connection is 
always classified
loopback and the local and public arms of the check cannot be reached from a 
test. Web Platform
Tests solve this with extra server ports plus a map telling the browser which 
port stands for which
space: 
https://github.com/web-platform-tests/rfcs/blob/master/rfcs/address_space_overrides.md

The four ports are added to the WPT config, webkitpy derives the map from it, 
and WebKitTestRunner
passes it as --ip-address-space-overrides. The map is immutable for the 
lifetime of the runner, so it
rides on WKWebsiteDataStoreConfiguration into NetworkSessionCreationParameters 
rather than being
pushed over IPC per test. NetworkSession consults it in 
classifyConnectionAddressSpace() before
falling back to classifying the resolved address, so a test can name a space no 
loopback-only server
could produce.

Cocoa only. Soup classifies inside the ResourceResponse constructor, which has 
no session to consult,
so the test is skipped on GTK and WPE against bug 295047.

* 
LayoutTests/http/wpt/fetch/local-network-access/address-space-overrides-apply-to-both-host-forms-expected.txt:
 Added.
* 
LayoutTests/http/wpt/fetch/local-network-access/address-space-overrides-apply-to-both-host-forms.html:
 Added.
* 
LayoutTests/http/wpt/fetch/local-network-access/resources/lna-reporting-frame.html:
 Added.
* LayoutTests/imported/w3c/resources/config.json:
* LayoutTests/platform/glib/TestExpectations:
* Source/WebKit/NetworkProcess/NetworkSession.cpp:
(WebKit::addressSpaceFromName):
(WebKit::NetworkSession::NetworkSession):
(WebKit::NetworkSession::setIPAddressSpaceOverridesForTesting):
(WebKit::NetworkSession::classifyConnectionAddressSpace):
* Source/WebKit/NetworkProcess/NetworkSession.h:
* Source/WebKit/NetworkProcess/NetworkSessionCreationParameters.h:
* 
Source/WebKit/NetworkProcess/NetworkSessionCreationParameters.serialization.in:
* Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
(WebKit::NetworkDataTaskCocoa::didReceiveResponse):
(WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection):
* Source/WebKit/UIProcess/API/C/WKWebsiteDataStoreConfigurationRef.cpp:
(WKWebsiteDataStoreConfigurationSetIPAddressSpaceOverridesForTesting):
* Source/WebKit/UIProcess/API/C/WKWebsiteDataStoreConfigurationRef.h:
* Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::parameters):
* Source/WebKit/UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp:
(WebKit::WebsiteDataStoreConfiguration::copy const):
* Source/WebKit/UIProcess/WebsiteData/WebsiteDataStoreConfiguration.h:
* Tools/DumpRenderTree/mac/DumpRenderTree.mm:
(initializeGlobalsFromCommandLineOptions):
* Tools/Scripts/webkitpy/port/base.py:
(Port.ip_address_space_overrides):
* Tools/Scripts/webkitpy/port/driver.py:
(Driver._command_from_driver_input):
* Tools/WebKitTestRunner/Options.cpp:
(WTR::handleOptionIPAddressSpaceOverrides):
(WTR::OptionsHandler::OptionsHandler):
* Tools/WebKitTestRunner/Options.h:
* Tools/WebKitTestRunner/TestController.cpp:
(WTR::TestController::initialize):
(WTR::TestController::defaultWebsiteDataStore):
* Tools/WebKitTestRunner/TestController.h:

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



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

Reply via email to