Cleanup RuntimeEnabledFeatures
https://bugs.webkit.org/show_bug.cgi?id=167228
Reviewed by Simon Fraser.
LayoutTests/imported/w3c:
* web-platform-tests/resource-timing/resource_cached-expected.txt:
* web-platform-tests/resource-timing/resource_connection_reuse-expected.txt:
* web-platform-tests/resource-timing/resource_dynamic_insertion-expected.txt:
The previous internals API didn't appear to be working. Making it work
improved these results.
Source/WebCore:
RuntimeEnabledFeatures::reset() is bad for tests. It was getting called
after the TestRunners had set up all the Settings and RuntimeEnabledFeatures
they expected, so it was clearing the "consistent state" set by TestRunners.
Cleanup within RuntimeEnabledFeatures:
- Initialize all members.
- Remove unused features.
- Remove reset() no longer used.
- Document features that do not change (potentially removable).
- Document features that are not used but have APIs (use or remove later).
- Drop webkit prefix for these internal only apis.
- Move things around a bit to make it more readable.
- Enable the Fetch API by default (WebKit levels all were enabling it).
Cleanup within Internals:
- Move all RuntimeEnabledFeature toggling to InternalSettings
- Save and restore these RuntimeEnabledFeatures in InternalSettings
* Modules/mediastream/MediaStreamEvent.idl:
* Modules/mediastream/NavigatorMediaDevices.idl:
* Modules/mediastream/NavigatorUserMedia.idl:
* Modules/mediastream/RTCDTMFToneChangeEvent.idl:
* Modules/mediastream/RTCIceCandidate.idl:
* Modules/mediastream/RTCPeerConnection.idl:
* Modules/mediastream/RTCRtpReceiver.idl:
* Modules/mediastream/RTCRtpSender.idl:
* Modules/mediastream/RTCRtpTransceiver.idl:
* Modules/mediastream/RTCSessionDescription.idl:
* Modules/mediastream/RTCTrackEvent.idl:
Canonical usage is to start with a capital letter.
* dom/EventNames.in:
No port has API/SPI to disable this feature at runtime and the default is
to have the feature enabled, so this is no different from the runtime flag.
* page/DOMWindow.cpp:
(WebCore::DOMWindow::addEventListener):
These features were always enabled and not toggleable. So drop the runtime
feature check.
* page/csp/ContentSecurityPolicy.h:
* page/csp/ContentSecurityPolicy.cpp:
(WebCore::ContentSecurityPolicy::experimentalFeaturesEnabled): Deleted.
Nobody calls this method. Drop it.
* page/RuntimeEnabledFeatures.cpp:
(WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures):
(WebCore::RuntimeEnabledFeatures::reset):
(WebCore::RuntimeEnabledFeatures::javaScriptI18NAPIEnabled): Deleted.
* page/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::langAttributeAwareFormControlUIEnabled):
(WebCore::RuntimeEnabledFeatures::setLangAttributeAwareFormControlUIEnabled):
(WebCore::RuntimeEnabledFeatures::setLinkPreloadEnabled):
(WebCore::RuntimeEnabledFeatures::linkPreloadEnabled):
(WebCore::RuntimeEnabledFeatures::setResourceTimingEnabled):
(WebCore::RuntimeEnabledFeatures::resourceTimingEnabled):
(WebCore::RuntimeEnabledFeatures::setShadowDOMEnabled):
(WebCore::RuntimeEnabledFeatures::shadowDOMEnabled):
(WebCore::RuntimeEnabledFeatures::setInputEventsEnabled):
(WebCore::RuntimeEnabledFeatures::inputEventsEnabled):
(WebCore::RuntimeEnabledFeatures::setInteractiveFormValidationEnabled):
(WebCore::RuntimeEnabledFeatures::interactiveFormValidationEnabled):
(WebCore::RuntimeEnabledFeatures::setCustomElementsEnabled):
(WebCore::RuntimeEnabledFeatures::customElementsEnabled):
(WebCore::RuntimeEnabledFeatures::setModernMediaControlsEnabled):
(WebCore::RuntimeEnabledFeatures::modernMediaControlsEnabled):
(WebCore::RuntimeEnabledFeatures::setIndexedDBEnabled):
(WebCore::RuntimeEnabledFeatures::fontLoadEventsEnabled):
(WebCore::RuntimeEnabledFeatures::setMediaStreamEnabled):
(WebCore::RuntimeEnabledFeatures::setPeerConnectionEnabled):
(WebCore::RuntimeEnabledFeatures::setLocalStorageEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::localStorageEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::setSessionStorageEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::sessionStorageEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::setWebkitNotificationsEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::webkitNotificationsEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::setApplicationCacheEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::applicationCacheEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::setDataTransferItemsEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::dataTransferItemsEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::setWebkitIndexedDBEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::webkitIndexedDBEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::touchEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::setTouchEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::setDeviceMotionEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::deviceMotionEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::deviceMotionEventEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::ondevicemotionEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::setDeviceOrientationEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::deviceOrientationEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::deviceOrientationEventEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::ondeviceorientationEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::setJavaScriptI18NAPIEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::webkitGetUserMediaEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::webkitMediaStreamEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::webkitRTCPeerConnectionEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::experimentalContentSecurityPolicyFeaturesEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::setExperimentalContentSecurityPolicyFeaturesEnabled): Deleted.
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::Backup::Backup):
(WebCore::InternalSettings::Backup::restoreTo):
(WebCore::InternalSettings::setLangAttributeAwareFormControlUIEnabled):
(WebCore::InternalSettings::setResourceTimingEnabled):
(WebCore::InternalSettings::setLinkPreloadEnabled):
(WebCore::InternalSettings::setCSSGridLayoutEnabled):
(WebCore::InternalSettings::setWebGL2Enabled):
* testing/InternalSettings.h:
* testing/InternalSettings.idl:
* testing/Internals.cpp:
(WebCore::Internals::Internals):
(WebCore::Internals::setLinkPreloadSupport): Deleted.
(WebCore::Internals::setCSSGridLayoutEnabled): Deleted.
(WebCore::Internals::webGL2Enabled): Deleted.
(WebCore::Internals::setWebGL2Enabled): Deleted.
(WebCore::Internals::setResourceTimingSupport): Deleted.
* testing/Internals.h:
* testing/Internals.idl:
Move toggling of RuntimeEnabledFeatures to InternalSettings and
properly remember to save and restore them in Internals.
Source/WebKit/mac:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):
Source/WebKit/win:
* WebView.cpp:
(WebView::notifyPreferencesChanged):
Source/WebKit2:
* WebProcess/WebProcess.cpp:
(WebKit::m_resourceLoadStatisticsStorage):
Tools:
* DumpRenderTree/mac/DumpRenderTree.mm:
(enableExperimentalFeatures):
(resetWebPreferencesToConsistentValues):
(setWebPreferencesForTestOptions):
(resetWebViewToConsistentStateBeforeTesting):
* DumpRenderTree/win/DumpRenderTree.cpp:
(enableExperimentalFeatures):
(resetWebPreferencesToConsistentValues):
More closely match WebKitTestRunner initialization of preferences
for experimental features.
LayoutTests:
Update tests that toggle runtime enabled features to use
consistently named internals.settings.setFooEnabled setters.
* css3/flexbox/flexbox-lines-must-be-stretched-by-default.html:
* css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled.html:
* fast/canvas/webgl/bufferData-offset-length.html:
* fast/canvas/webgl/copyBufferSubData.html:
* fast/canvas/webgl/getBufferSubData-webgl1.html:
* fast/canvas/webgl/webgl2-buffer-targets.html:
* fast/canvas/webgl/webgl2-buffers.html:
* fast/canvas/webgl/webgl2-context-creation.html:
* fast/canvas/webgl/webgl2-runtime-flag.html:
* fast/canvas/webgl/webgl2-texStorage.html:
* fast/canvas/webgl/webgl2-texture-upload-enums.html:
* fast/css-grid-layout/grid-disable.html:
* fast/css/ensure-flexbox-compatibility-with-initial-values.html:
* fast/dom/Window/window-properties-performance-resource-timing.html:
* http/tests/fetch/redirectmode-and-preload.html:
* http/tests/misc/resource-timing-resolution.html:
* http/tests/performance/performance-resource-timing-cached-entries.html:
* http/tests/performance/performance-resource-timing-entries-iterable.html:
* http/tests/performance/performance-resource-timing-entries.html:
* http/tests/performance/performance-resource-timing-initiator-css.html:
* http/tests/performance/performance-resource-timing-initiator-no-override.html:
* http/tests/performance/performance-resource-timing-xhr-single-entry.html:
* http/tests/preload/delaying_onload_link_preload_after_discovery.html:
* http/tests/preload/delaying_onload_link_preload_after_discovery_image.html:
* http/tests/preload/download_resources.html:
* http/tests/preload/download_resources_from_header_iframe.html:
* http/tests/preload/download_resources_from_invalid_headers.html:
* http/tests/preload/dynamic_adding_preload.html:
* http/tests/preload/dynamic_remove_preload_href.html:
* http/tests/preload/not_delaying_window_onload_before_discovery.html:
* http/tests/preload/onerror_event.html:
* http/tests/preload/onload_event.html:
* http/tests/preload/resources/download_resources_from_header.php:
* http/tests/preload/resources/invalid_resources_from_header.php:
* http/tests/preload/single_download_preload_runner.html:
* http/tests/security/cached-cross-origin-preloading-css-stylesheet.html:
* resources/testharnessreport.js:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@211006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
76 files changed