Index: trunk/Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.cpp
===================================================================
--- trunk/Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.cpp	(revision 269111)
+++ trunk/Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.cpp	(revision 269236)
@@ -151,211 +151,8 @@
 }
 
-void InjectedBundle::overrideBoolPreferenceForTestRunner(WebPageGroupProxy* pageGroup, const String& preference, bool enabled)
-{
-    const HashSet<Page*>& pages = PageGroup::pageGroup(pageGroup->identifier())->pages();
-
-    if (preference == "WebKit2AsynchronousPluginInitializationEnabled") {
-        WebPreferencesStore::overrideBoolValueForKey(WebPreferencesKey::asynchronousPluginInitializationEnabledKey(), enabled);
-        for (auto* page : pages)
-            WebPage::fromCorePage(*page).setAsynchronousPluginInitializationEnabled(enabled);
-    }
-
-    if (preference == "WebKit2AsynchronousPluginInitializationEnabledForAllPlugins") {
-        WebPreferencesStore::overrideBoolValueForKey(WebPreferencesKey::asynchronousPluginInitializationEnabledForAllPluginsKey(), enabled);
-        for (auto* page : pages)
-            WebPage::fromCorePage(*page).setAsynchronousPluginInitializationEnabledForAllPlugins(enabled);
-    }
-
-    if (preference == "WebKit2ArtificialPluginInitializationDelayEnabled") {
-        WebPreferencesStore::overrideBoolValueForKey(WebPreferencesKey::artificialPluginInitializationDelayEnabledKey(), enabled);
-        for (auto* page : pages)
-            WebPage::fromCorePage(*page).setArtificialPluginInitializationDelayEnabled(enabled);
-    }
-
-#if ENABLE(SERVICE_CONTROLS)
-    if (preference == "WebKitImageControlsEnabled") {
-        WebPreferencesStore::overrideBoolValueForKey(WebPreferencesKey::imageControlsEnabledKey(), enabled);
-        for (auto* page : pages)
-            page->settings().setImageControlsEnabled(enabled);
-        return;
-    }
-#endif
-
-    if (preference == "WebKitCacheAPIEnabled")
-        RuntimeEnabledFeatures::sharedFeatures().setCacheAPIEnabled(enabled);
-
-    if (preference == "WebKitReadableByteStreamAPIEnabled")
-        RuntimeEnabledFeatures::sharedFeatures().setReadableByteStreamAPIEnabled(enabled);
-    if (preference == "WebKitWritableStreamAPIEnabled")
-        RuntimeEnabledFeatures::sharedFeatures().setWritableStreamAPIEnabled(enabled);
-    if (preference == "WebKitTransformStreamAPIEnabled")
-        RuntimeEnabledFeatures::sharedFeatures().setTransformStreamAPIEnabled(enabled);
-
-#if ENABLE(WEBGL2)
-    if (preference == "WebKitWebGL2Enabled")
-        RuntimeEnabledFeatures::sharedFeatures().setWebGL2Enabled(enabled);
-#endif
-
-#if ENABLE(WEBGPU)
-    if (preference == "WebKitWebGPUEnabled")
-        RuntimeEnabledFeatures::sharedFeatures().setWebGPUEnabled(enabled);
-#endif
-
-    if (preference == "WebKitModernMediaControlsEnabled")
-        RuntimeEnabledFeatures::sharedFeatures().setModernMediaControlsEnabled(enabled);
-
-#if ENABLE(WEB_RTC)
-    if (preference == "WebKitWebRTCMDNSICECandidatesEnabled")
-        RuntimeEnabledFeatures::sharedFeatures().setWebRTCMDNSICECandidatesEnabled(enabled);
-#endif
-
-    if (preference == "WebKitGenericCueAPIEnabled") {
-        WebPreferencesStore::overrideBoolValueForKey(WebPreferencesKey::genericCueAPIEnabledKey(), enabled);
-        for (auto* page : pages)
-            page->settings().setGenericCueAPIEnabled(enabled);
-        return;
-    }
-
-#if ENABLE(GPU_PROCESS)
-    if (preference == "WebKitUseGPUProcessForMediaEnabled" || preference == "WebKitCaptureAudioInGPUProcessEnabledKey") {
-        WebPreferencesStore::overrideBoolValueForKey(WebPreferencesKey::useGPUProcessForMediaEnabledKey(), enabled);
-        for (auto* page : pages)
-            page->settings().setUseGPUProcessForMediaEnabled(enabled);
-        return;
-    }
-#endif
-
-    if (preference == "WebKitWebAPIStatisticsEnabled")
-        RuntimeEnabledFeatures::sharedFeatures().setWebAPIStatisticsEnabled(enabled);
-
-#if ENABLE(LAYOUT_FORMATTING_CONTEXT)
-    if (preference == "LayoutFormattingContextEnabled")
-        RuntimeEnabledFeatures::sharedFeatures().setLayoutFormattingContextEnabled(enabled);
-    if (preference == "LayoutFormattingContextIntegrationEnabled")
-        RuntimeEnabledFeatures::sharedFeatures().setLayoutFormattingContextIntegrationEnabled(enabled);
-#endif
-
-#if ENABLE(CSS_PAINTING_API)
-    if (preference == "CSSPaintingAPIEnabled")
-        RuntimeEnabledFeatures::sharedFeatures().setCSSPaintingAPIEnabled(enabled);
-#endif
-
-#if ENABLE(CSS_TYPED_OM)
-    if (preference == "CSSTypedOMEnabled")
-        RuntimeEnabledFeatures::sharedFeatures().setCSSTypedOMEnabled(enabled);
-#endif
-
-#if ENABLE(OFFSCREEN_CANVAS)
-    if (preference == "OffscreenCanvasEnabled")
-        RuntimeEnabledFeatures::sharedFeatures().setOffscreenCanvasEnabled(enabled);
-#endif
-
-#if ENABLE(WEBXR)
-    if (preference == "WebKitWebXREnabled")
-        RuntimeEnabledFeatures::sharedFeatures().setWebXREnabled(enabled);
-#endif
-
-#if ENABLE(ACCESSIBILITY_ISOLATED_TREE)
-    if (preference == "IsAccessibilityIsolatedTreeEnabled")
-        RuntimeEnabledFeatures::sharedFeatures().setIsAccessibilityIsolatedTreeEnabled(enabled);
-#endif
-
-    // Map the names used in LayoutTests with the names used in WebCore::Settings and WebPreferencesStore.
-
-#define OVERRIDE_PREFERENCE_AND_SET_IN_EXISTING_PAGES(TestRunnerName, SettingsName, WebPreferencesName) \
-    if (preference == #TestRunnerName) { \
-        WebPreferencesStore::overrideBoolValueForKey(WebPreferencesKey::WebPreferencesName##Key(), enabled); \
-        for (HashSet<Page*>::iterator iter = pages.begin(); iter != pages.end(); ++iter) \
-            (*iter)->settings().set##SettingsName(enabled); \
-        return; \
-    }
-
-    OVERRIDE_PREFERENCE_AND_SET_IN_EXISTING_PAGES(WebKitAnimatedImageAsyncDecodingEnabled, AnimatedImageAsyncDecodingEnabled, animatedImageAsyncDecodingEnabled)
-    OVERRIDE_PREFERENCE_AND_SET_IN_EXISTING_PAGES(WebKitDisplayImagesKey, LoadsImagesAutomatically, loadsImagesAutomatically)
-    OVERRIDE_PREFERENCE_AND_SET_IN_EXISTING_PAGES(WebKitHiddenPageDOMTimerThrottlingEnabled, HiddenPageDOMTimerThrottlingEnabled, hiddenPageDOMTimerThrottlingEnabled)
-    OVERRIDE_PREFERENCE_AND_SET_IN_EXISTING_PAGES(WebKitJavaEnabled, JavaEnabled, javaEnabled)
-    OVERRIDE_PREFERENCE_AND_SET_IN_EXISTING_PAGES(WebKitJavaScriptEnabled, ScriptEnabled, javaScriptEnabled)
-    OVERRIDE_PREFERENCE_AND_SET_IN_EXISTING_PAGES(WebKitLargeImageAsyncDecodingEnabled, LargeImageAsyncDecodingEnabled, largeImageAsyncDecodingEnabled)
-    OVERRIDE_PREFERENCE_AND_SET_IN_EXISTING_PAGES(WebKitPluginsEnabled, PluginsEnabled, pluginsEnabled)
-    OVERRIDE_PREFERENCE_AND_SET_IN_EXISTING_PAGES(WebKitShouldRespectImageOrientation, ShouldRespectImageOrientation, shouldRespectImageOrientation)
-    OVERRIDE_PREFERENCE_AND_SET_IN_EXISTING_PAGES(WebKitWebGLEnabled, WebGLEnabled, webGLEnabled)
-    OVERRIDE_PREFERENCE_AND_SET_IN_EXISTING_PAGES(WebKitXSSAuditorEnabled, XSSAuditorEnabled, xssAuditorEnabled)
-
-#if ENABLE(WEB_AUDIO)
-    OVERRIDE_PREFERENCE_AND_SET_IN_EXISTING_PAGES(WebKitWebAudioEnabled, WebAudioEnabled, webAudioEnabled)
-#endif
-
-#undef OVERRIDE_PREFERENCE_AND_SET_IN_EXISTING_PAGES
-}
-
-void InjectedBundle::setAllowUniversalAccessFromFileURLs(WebPageGroupProxy* pageGroup, bool enabled)
-{
-    const HashSet<Page*>& pages = PageGroup::pageGroup(pageGroup->identifier())->pages();
-    for (HashSet<Page*>::iterator iter = pages.begin(); iter != pages.end(); ++iter)
-        (*iter)->settings().setAllowUniversalAccessFromFileURLs(enabled);
-}
-
-void InjectedBundle::setAllowFileAccessFromFileURLs(WebPageGroupProxy* pageGroup, bool enabled)
-{
-    const HashSet<Page*>& pages = PageGroup::pageGroup(pageGroup->identifier())->pages();
-    for (HashSet<Page*>::iterator iter = pages.begin(); iter != pages.end(); ++iter)
-        (*iter)->settings().setAllowFileAccessFromFileURLs(enabled);
-}
-
-void InjectedBundle::setNeedsStorageAccessFromFileURLsQuirk(WebPageGroupProxy* pageGroup, bool needsQuirk)
-{
-    const HashSet<Page*>& pages = PageGroup::pageGroup(pageGroup->identifier())->pages();
-    for (auto page : pages)
-        page->settings().setNeedsStorageAccessFromFileURLsQuirk(needsQuirk);
-}
-
-void InjectedBundle::setMinimumLogicalFontSize(WebPageGroupProxy* pageGroup, int size)
-{
-    const HashSet<Page*>& pages = PageGroup::pageGroup(pageGroup->identifier())->pages();
-    for (HashSet<Page*>::iterator iter = pages.begin(); iter != pages.end(); ++iter)
-        (*iter)->settings().setMinimumLogicalFontSize(size);
-}
-
-void InjectedBundle::setFrameFlatteningEnabled(WebPageGroupProxy* pageGroup, bool enabled)
-{
-    const HashSet<Page*>& pages = PageGroup::pageGroup(pageGroup->identifier())->pages();
-    for (HashSet<Page*>::iterator iter = pages.begin(); iter != pages.end(); ++iter)
-        (*iter)->settings().setFrameFlattening(enabled ? FrameFlattening::FullyEnabled : FrameFlattening::Disabled);
-}
-
-void InjectedBundle::setAsyncFrameScrollingEnabled(WebPageGroupProxy* pageGroup, bool enabled)
-{
-    const HashSet<Page*>& pages = PageGroup::pageGroup(pageGroup->identifier())->pages();
-    for (HashSet<Page*>::iterator iter = pages.begin(); iter != pages.end(); ++iter)
-        (*iter)->settings().setAsyncFrameScrollingEnabled(enabled);
-}
-
-void InjectedBundle::setJavaScriptCanAccessClipboard(WebPageGroupProxy* pageGroup, bool enabled)
-{
-    const HashSet<Page*>& pages = PageGroup::pageGroup(pageGroup->identifier())->pages();
-    for (HashSet<Page*>::iterator iter = pages.begin(); iter != pages.end(); ++iter)
-        (*iter)->settings().setJavaScriptCanAccessClipboard(enabled);
-}
-
-void InjectedBundle::setPopupBlockingEnabled(WebPageGroupProxy* pageGroup, bool enabled)
-{
-    const HashSet<Page*>& pages = PageGroup::pageGroup(pageGroup->identifier())->pages();
-    HashSet<Page*>::const_iterator end = pages.end();
-    for (HashSet<Page*>::const_iterator iter = pages.begin(); iter != end; ++iter)
-        (*iter)->settings().setJavaScriptCanOpenWindowsAutomatically(!enabled);
-}
-
-void InjectedBundle::setAuthorAndUserStylesEnabled(WebPageGroupProxy* pageGroup, bool enabled)
-{
-    const HashSet<Page*>& pages = PageGroup::pageGroup(pageGroup->identifier())->pages();
-    for (HashSet<Page*>::iterator iter = pages.begin(); iter != pages.end(); ++iter)
-        (*iter)->settings().setAuthorAndUserStylesEnabled(enabled);
-}
-
 void InjectedBundle::addOriginAccessAllowListEntry(const String& sourceOrigin, const String& destinationProtocol, const String& destinationHost, bool allowDestinationSubdomains)
 {
     SecurityPolicy::addOriginAccessAllowlistEntry(SecurityOrigin::createFromString(sourceOrigin).get(), destinationProtocol, destinationHost, allowDestinationSubdomains);
     WebProcess::singleton().ensureNetworkProcessConnection().connection().send(Messages::NetworkConnectionToWebProcess::AddOriginAccessAllowListEntry { sourceOrigin, destinationProtocol, destinationHost, allowDestinationSubdomains }, 0);
-
 }
 
