Diff
Modified: trunk/Source/WebCore/PAL/ChangeLog (258677 => 258678)
--- trunk/Source/WebCore/PAL/ChangeLog 2020-03-19 03:07:05 UTC (rev 258677)
+++ trunk/Source/WebCore/PAL/ChangeLog 2020-03-19 03:23:18 UTC (rev 258678)
@@ -1,3 +1,13 @@
+2020-03-18 Alex Christensen <[email protected]>
+
+ Add HTTP3 as an experimental feature
+ https://bugs.webkit.org/show_bug.cgi?id=209267
+ <rdar://problem/60245262> and <rdar://problem/60245168>
+
+ Reviewed by Brent Fulgham.
+
+ * pal/spi/cf/CFNetworkSPI.h:
+
2020-03-18 Peng Liu <[email protected]>
The value of [AVPlayerViewController isPictureInPicturePossible] is NO in the first attempt to enter PiP
Modified: trunk/Source/WebCore/PAL/pal/spi/cf/CFNetworkSPI.h (258677 => 258678)
--- trunk/Source/WebCore/PAL/pal/spi/cf/CFNetworkSPI.h 2020-03-19 03:07:05 UTC (rev 258677)
+++ trunk/Source/WebCore/PAL/pal/spi/cf/CFNetworkSPI.h 2020-03-19 03:23:18 UTC (rev 258678)
@@ -209,6 +209,7 @@
#endif
#if HAVE(CFNETWORK_ALTERNATIVE_SERVICE)
@property (nullable, retain) _NSHTTPAlternativeServicesStorage *_alternativeServicesStorage;
+@property (readonly, assign) BOOL _allowsHTTP3;
#endif
@end
Modified: trunk/Source/WebKit/ChangeLog (258677 => 258678)
--- trunk/Source/WebKit/ChangeLog 2020-03-19 03:07:05 UTC (rev 258677)
+++ trunk/Source/WebKit/ChangeLog 2020-03-19 03:23:18 UTC (rev 258678)
@@ -1,3 +1,29 @@
+2020-03-18 Alex Christensen <[email protected]>
+
+ Add HTTP3 as an experimental feature
+ https://bugs.webkit.org/show_bug.cgi?id=209267
+ <rdar://problem/60245262> and <rdar://problem/60245168>
+
+ Reviewed by Brent Fulgham.
+
+ Manually verified this sets the CFNetwork SPI as expected.
+
+ * NetworkProcess/NetworkSessionCreationParameters.cpp:
+ (WebKit::NetworkSessionCreationParameters::encode const):
+ (WebKit::NetworkSessionCreationParameters::decode):
+ * NetworkProcess/NetworkSessionCreationParameters.h:
+ * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
+ (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
+ * Shared/WebPreferences.yaml:
+ * UIProcess/WebProcessPool.cpp:
+ (WebKit::WebProcessPool::ensureNetworkProcess):
+ * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
+ (WebKit::WebsiteDataStore::parameters):
+ (WebKit::WebsiteDataStore::http3Enabled):
+ * UIProcess/WebsiteData/WebsiteDataStore.cpp:
+ (WebKit::WebsiteDataStore::http3Enabled):
+ * UIProcess/WebsiteData/WebsiteDataStore.h:
+
2020-03-18 Saam Barati <[email protected]>
SharedMemory::Handle::decode shouldn't check rounded size
Modified: trunk/Source/WebKit/NetworkProcess/NetworkSessionCreationParameters.cpp (258677 => 258678)
--- trunk/Source/WebKit/NetworkProcess/NetworkSessionCreationParameters.cpp 2020-03-19 03:07:05 UTC (rev 258677)
+++ trunk/Source/WebKit/NetworkProcess/NetworkSessionCreationParameters.cpp 2020-03-19 03:23:18 UTC (rev 258678)
@@ -55,6 +55,7 @@
#if HAVE(CFNETWORK_ALTERNATIVE_SERVICE)
encoder << alternativeServiceDirectory;
encoder << alternativeServiceDirectoryExtensionHandle;
+ encoder << http3Enabled;
#endif
#if USE(SOUP)
encoder << cookiePersistentStoragePath;
@@ -143,6 +144,11 @@
decoder >> alternativeServiceDirectoryExtensionHandle;
if (!alternativeServiceDirectoryExtensionHandle)
return WTF::nullopt;
+
+ Optional<bool> http3Enabled;
+ decoder >> http3Enabled;
+ if (!http3Enabled)
+ return WTF::nullopt;
#endif
#if USE(SOUP)
@@ -255,6 +261,7 @@
#if HAVE(CFNETWORK_ALTERNATIVE_SERVICE)
, WTFMove(*alternativeServiceDirectory)
, WTFMove(*alternativeServiceDirectoryExtensionHandle)
+ , WTFMove(*http3Enabled)
#endif
#if USE(SOUP)
, WTFMove(*cookiePersistentStoragePath)
Modified: trunk/Source/WebKit/NetworkProcess/NetworkSessionCreationParameters.h (258677 => 258678)
--- trunk/Source/WebKit/NetworkProcess/NetworkSessionCreationParameters.h 2020-03-19 03:07:05 UTC (rev 258677)
+++ trunk/Source/WebKit/NetworkProcess/NetworkSessionCreationParameters.h 2020-03-19 03:23:18 UTC (rev 258678)
@@ -67,6 +67,7 @@
#if HAVE(CFNETWORK_ALTERNATIVE_SERVICE)
String alternativeServiceDirectory;
SandboxExtension::Handle alternativeServiceDirectoryExtensionHandle;
+ bool http3Enabled { false };
#endif
#if USE(SOUP)
String cookiePersistentStoragePath;
Modified: trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm (258677 => 258678)
--- trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm 2020-03-19 03:07:05 UTC (rev 258677)
+++ trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm 2020-03-19 03:23:18 UTC (rev 258678)
@@ -1113,6 +1113,7 @@
configuration._alternativeServicesStorage = [[[_NSHTTPAlternativeServicesStorage alloc] initPersistentStoreWithURL:[[NSURL fileURLWithPath:parameters.alternativeServiceDirectory isDirectory:YES] URLByAppendingPathComponent:@"AlternativeService.sqlite"]] autorelease];
} else
RELEASE_ASSERT(m_sessionID.isEphemeral());
+ configuration._allowsHTTP3 = parameters.http3Enabled;
#endif
configuration.connectionProxyDictionary = proxyDictionary(parameters.httpProxy, parameters.httpsProxy);
Modified: trunk/Source/WebKit/Shared/WebPreferences.yaml (258677 => 258678)
--- trunk/Source/WebKit/Shared/WebPreferences.yaml 2020-03-19 03:07:05 UTC (rev 258677)
+++ trunk/Source/WebKit/Shared/WebPreferences.yaml 2020-03-19 03:23:18 UTC (rev 258678)
@@ -1304,6 +1304,15 @@
category: experimental
webcoreBinding: RuntimeEnabledFeatures
+HTTP3Enabled:
+ type: bool
+ defaultValue: false
+ humanReadableName: "HTTP3"
+ humanReadableDescription: "Enable HTTP3"
+ category: experimental
+ webcoreBinding: none
+ condition: HAVE(CFNETWORK_ALTERNATIVE_SERVICE)
+
OffscreenCanvasEnabled:
type: bool
defaultValue: DEFAULT_OFFSCREEN_CANVAS_ENABLED
Modified: trunk/Source/WebKit/UIProcess/WebProcessPool.cpp (258677 => 258678)
--- trunk/Source/WebKit/UIProcess/WebProcessPool.cpp 2020-03-19 03:07:05 UTC (rev 258677)
+++ trunk/Source/WebKit/UIProcess/WebProcessPool.cpp 2020-03-19 03:23:18 UTC (rev 258678)
@@ -661,7 +661,9 @@
#if HAVE(CFNETWORK_ALTERNATIVE_SERVICE)
parameters.defaultDataStoreParameters.networkSessionParameters.alternativeServiceDirectory = WebsiteDataStore::defaultAlternativeServicesDirectory();
- SandboxExtension::createHandleForReadWriteDirectory(parameters.defaultDataStoreParameters.networkSessionParameters.alternativeServiceDirectory, parameters.defaultDataStoreParameters.networkSessionParameters.alternativeServiceDirectoryExtensionHandle);
+ if (!parameters.defaultDataStoreParameters.networkSessionParameters.alternativeServiceDirectory.isEmpty())
+ SandboxExtension::createHandleForReadWriteDirectory(parameters.defaultDataStoreParameters.networkSessionParameters.alternativeServiceDirectory, parameters.defaultDataStoreParameters.networkSessionParameters.alternativeServiceDirectoryExtensionHandle);
+ parameters.defaultDataStoreParameters.networkSessionParameters.http3Enabled = WebsiteDataStore::http3Enabled();
#endif
bool isItpStateExplicitlySet = false;
parameters.defaultDataStoreParameters.networkSessionParameters.resourceLoadStatisticsParameters = ResourceLoadStatisticsParameters {
Modified: trunk/Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm (258677 => 258678)
--- trunk/Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm 2020-03-19 03:07:05 UTC (rev 258677)
+++ trunk/Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm 2020-03-19 03:23:18 UTC (rev 258678)
@@ -164,6 +164,7 @@
SandboxExtension::Handle alternativeServiceStorageDirectoryExtensionHandle;
if (!alternativeServiceStorageDirectory.isEmpty())
SandboxExtension::createHandleForReadWriteDirectory(alternativeServiceStorageDirectory, alternativeServiceStorageDirectoryExtensionHandle);
+ bool http3Enabled = WebsiteDataStore::http3Enabled();
#endif
bool shouldIncludeLocalhostInResourceLoadStatistics = isSafari;
@@ -198,6 +199,7 @@
#if HAVE(CFNETWORK_ALTERNATIVE_SERVICE)
WTFMove(alternativeServiceStorageDirectory),
WTFMove(alternativeServiceStorageDirectoryExtensionHandle),
+ WTFMove(http3Enabled),
#endif
m_configuration->deviceManagementRestrictionsEnabled(),
m_configuration->allLoadsBlockedByDeviceManagementRestrictionsForTesting(),
@@ -260,6 +262,15 @@
return parameters;
}
+bool WebsiteDataStore::http3Enabled()
+{
+#if HAVE(CFNETWORK_ALTERNATIVE_SERVICE)
+ return [[NSUserDefaults standardUserDefaults] boolForKey:[NSString stringWithFormat:@"Experimental%@", (NSString *)WebPreferencesKey::http3EnabledKey()]];
+#else
+ return false;
+#endif
+}
+
void WebsiteDataStore::platformInitialize()
{
ASSERT(!dataStores().contains(this));
Modified: trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp (258677 => 258678)
--- trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp 2020-03-19 03:07:05 UTC (rev 258677)
+++ trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp 2020-03-19 03:23:18 UTC (rev 258678)
@@ -2265,6 +2265,11 @@
// FIXME: Implement.
return WTF::String();
}
+
+bool WebsiteDataStore::http3Enabled()
+{
+ return false;
+}
#endif
#if !USE(GLIB)
Modified: trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h (258677 => 258678)
--- trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h 2020-03-19 03:07:05 UTC (rev 258677)
+++ trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h 2020-03-19 03:23:18 UTC (rev 258678)
@@ -278,6 +278,7 @@
static WTF::String defaultMediaKeysStorageDirectory();
static WTF::String defaultDeviceIdHashSaltsStorageDirectory();
static WTF::String defaultJavaScriptConfigurationDirectory();
+ static bool http3Enabled();
void resetQuota(CompletionHandler<void()>&&);
void hasAppBoundSession(CompletionHandler<void(bool)>&&) const;