haikuwebkit/LayoutTests/pointer-lock/pointerlock-interface.html

33 lines
972 B
HTML
Raw Permalink Normal View History

Remove runtime toggle for pointer-lock https://bugs.webkit.org/show_bug.cgi?id=165577 <rdar://problems/29566996> Reviewed by Jon Lee. Source/WebCore: Remove any runtime calls to check if pointer-lock is enabled. It's either compiled in or out. Covered by existing tests. * bindings/generic/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::setPointerLockEnabled): Deleted. (WebCore::RuntimeEnabledFeatures::pointerLockEnabled): Deleted. * dom/Document.idl: * dom/Element.idl: * page/Page.h: * page/PointerLockController.cpp: (WebCore::PointerLockController::requestPointerLock): (WebCore::PointerLockController::requestPointerUnlock): (WebCore::PointerLockController::requestPointerUnlockAndForceCursorVisible): Source/WebKit/mac: Remove any runtime calls to check if pointer-lock is enabled. It's either compiled in or out. * WebView/WebPreferenceKeysPrivate.h: * WebView/WebPreferences.mm: (-[WebPreferences pointerLockEnabled]): Deleted. (-[WebPreferences setPointerLockEnabled:]): Deleted. * WebView/WebPreferencesPrivate.h: * WebView/WebView.mm: (-[WebView _preferencesChanged:]): Source/WebKit2: Remove any runtime calls to check if pointer-lock is enabled. It's either compiled in or out. * Shared/WebPreferencesDefinitions.h: * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetPointerLockEnabled): Deleted. (WKPreferencesGetPointerLockEnabled): Deleted. * UIProcess/API/C/WKPreferencesRefPrivate.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): Tools: Remove any runtime calls to check if pointer-lock is enabled. It's either compiled in or out. * DumpRenderTree/mac/DumpRenderTree.mm: (resetWebPreferencesToConsistentValues): * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetPreferencesToConsistentValues): Websites/webkit.org: No need to have pointer-lock tested. * experimental-features.html: Also sort the list alphabetically. LayoutTests: Remove any runtime calls to check if pointer-lock is enabled. It's either compiled in or out. * platform/mac/TestExpectations: Enable the pointer-lock tests that should work. * pointer-lock/pointer-lock-api.html: Fix a bad DOM call. * pointer-lock/pointerlock-interface-disabled-expected.txt: Removed. * pointer-lock/pointerlock-interface-disabled.html: Removed. Canonical link: https://commits.webkit.org/183176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209514 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-12-08 02:53:41 +00:00
<!DOCTYPE html>
pointer lock needs to be feature detectable https://bugs.webkit.org/show_bug.cgi?id=165426 <rdar://problem/29486715> Reviewed by Antoine Quint. Source/WebCore: Annotate the public-facing API for pointer-lock, so that it is hidden when not available. Also move the Setting to a RuntimeEnabledFeature, since pointer-lock is exposed from WebKit as a feature. Tests: pointer-lock/pointerlock-interface-disabled.html pointer-lock/pointerlock-interface.html * bindings/generic/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::setPointerLockEnabled): (WebCore::RuntimeEnabledFeatures::pointerLockEnabled): * dom/Document.idl: * dom/Element.idl: * page/PointerLockController.cpp: (WebCore::PointerLockController::requestPointerLock): (WebCore::PointerLockController::requestPointerUnlock): * page/Settings.in: Source/WebKit/mac: Set the RuntimeEnabledFeature as preferences change. * WebView/WebView.mm: (-[WebView _preferencesChanged:]): Source/WebKit2: Set the RuntimeEnabledFeature as preferences change. * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetPointerLockEnabled): (WKPreferencesGetPointerLockEnabled): * UIProcess/API/C/WKPreferencesRefPrivate.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): Tools: Expose the comment line to turn on/off pointer lock. * DumpRenderTree/TestOptions.h: * DumpRenderTree/TestOptions.mm: (TestOptions::TestOptions): * DumpRenderTree/mac/DumpRenderTree.mm: (resetWebPreferencesToConsistentValues): * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetPreferencesToConsistentValues): (WTR::updateTestOptionsFromTestHeader): * WebKitTestRunner/TestOptions.h: * WebKitTestRunner/ios/PlatformWebViewIOS.mm: (WTR::PlatformWebView::viewSupportsOptions): * WebKitTestRunner/mac/PlatformWebViewMac.mm: (WTR::PlatformWebView::viewSupportsOptions): Websites/webkit.org: We can now accurately detect pointer-lock. * experimental-features.html: LayoutTests: Checks that the API is hidden when the feature is turned off. * pointer-lock/pointerlock-interface-disabled-expected.txt: Added. * pointer-lock/pointerlock-interface-disabled.html: Added. * pointer-lock/pointerlock-interface-expected.txt: Added. * pointer-lock/pointerlock-interface.html: Added. Canonical link: https://commits.webkit.org/183034@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209364 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-12-05 23:48:15 +00:00
<head>
<title>PointerLock interface tests.</title>
<link rel="help" href="https://w3c.github.io/pointerlock/">
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
</head>
<body>
<div id="log"></div>
<script>
test(function() {
assert_true('exitPointerLock' in Document.prototype);
},'Document.prototype.exitPointerLock exists');
test(function() {
assert_true('pointerLockElement' in Document.prototype);
},'Document.prototype.pointerLockElement exists');
test(function() {
assert_true('onpointerlockchange' in Document.prototype);
},'Document.prototype.onpointerlockchange exists');
test(function() {
assert_true('onpointerlockerror' in Document.prototype);
},'Document.prototype.onpointerlockerror exists');
test(function() {
assert_true('requestPointerLock' in Element.prototype);
},'Element.prototype.requestPointerLock exists');
</script>
</body>
</html>