haikuwebkit/Source/WebCore/testing/FakeXRButtonStateInit.idl

57 lines
2.4 KiB
Plaintext
Raw Permalink Normal View History

[WebXR] Test IDLs and stubs https://bugs.webkit.org/show_bug.cgi?id=209859 Reviewed by Dean Jackson and Youenn Fablet. Source/WebCore: WebXR testing is hard as it might involve interaction with actual devices. That's why the WebXR testing API (https://immersive-web.github.io/webxr-test-api/) was proposed. In fact, all the current WebXR tests from web-platform-tests are using that testing API. This new testing API supplements navigator.xr and is accessed through navigator.xr.test. In order not to expose the API to the web we're adding the XRTest interface to Internals instead. The mapping from internals.xrTest to navigator.xr.test happens in the WPT code. We're adding the required IDLs and very basic (mostly empty) implementations for testing methods. We're adding testing infrastructure, adding tests make no sense for this change. * CMakeLists.txt: Added new files. * DerivedSources.make: Ditto. * Modules/webxr/NavigatorWebXR.h: Export API to be used in testing code. * Modules/webxr/WebXRSystem.h: Export ::from and ::xr methods. * WebCore.xcodeproj/project.pbxproj: Ditto. * bindings/js/WebCoreBuiltinNames.h: Added some new macros. * testing/FakeXRBoundsPoint.h: Added. * testing/FakeXRBoundsPoint.idl: Added. * testing/FakeXRButtonStateInit.h: Added. * testing/FakeXRButtonStateInit.idl: Added. * testing/FakeXRInputSourceInit.h: Added. * testing/FakeXRInputSourceInit.idl: Added. * testing/FakeXRRigidTransformInit.h: Added. * testing/FakeXRRigidTransformInit.idl: Added. * testing/FakeXRViewInit.h: Added. * testing/FakeXRViewInit.idl: Added. * testing/Internals.cpp: (WebCore::Internals::xrTest): Added WebXRTest to Internals. * testing/Internals.h: Added xrTest() accessor. * testing/Internals.idl: Added xrTest attribute. * testing/WebFakeXRDevice.cpp: Added. (WebCore::WebFakeXRDevice::setViews): (WebCore::WebFakeXRDevice::disconnect): (WebCore::WebFakeXRDevice::setViewerOrigin): (WebCore::WebFakeXRDevice::clearViewerOrigin): (WebCore::WebFakeXRDevice::simulateVisibilityChange): (WebCore::WebFakeXRDevice::setBoundsGeometry): (WebCore::WebFakeXRDevice::setFloorOrigin): (WebCore::WebFakeXRDevice::clearFloorOrigin): (WebCore::WebFakeXRDevice::simulateResetPose): (WebCore::WebFakeXRDevice::simulateInputSourceConnection): * testing/WebFakeXRDevice.h: Added. * testing/WebFakeXRDevice.idl: Added. * testing/WebFakeXRInputController.cpp: Added. (WebCore::WebFakeXRInputController::setHandedness): (WebCore::WebFakeXRInputController::setTargetRayMode): (WebCore::WebFakeXRInputController::setProfiles): (WebCore::WebFakeXRInputController::setGripOrigin): (WebCore::WebFakeXRInputController::clearGripOrigin): (WebCore::WebFakeXRInputController::setPointerOrigin): (WebCore::WebFakeXRInputController::disconnect): (WebCore::WebFakeXRInputController::reconnect): (WebCore::WebFakeXRInputController::startSelection): (WebCore::WebFakeXRInputController::endSelection): (WebCore::WebFakeXRInputController::simulateSelect): (WebCore::WebFakeXRInputController::setSupportedButtons): (WebCore::WebFakeXRInputController::updateButtonState): * testing/WebFakeXRInputController.h: Added. * testing/WebFakeXRInputController.idl: Added. * testing/WebXRTest.cpp: Added. (WebCore::WebXRTest::simulateDeviceConnection const): (WebCore::WebXRTest::simulateUserActivation): (WebCore::WebXRTest::disconnectAllDevices): * testing/WebXRTest.h: Added. (WebCore::WebXRTest::create): * testing/WebXRTest.idl: Added. * testing/XRSimulateUserActivationFunction.h: Added. * testing/XRSimulateUserActivationFunction.idl: Ditto. LayoutTests: * platform/wpe/TestExpectations: Added bug number to the passing webxr test. Canonical link: https://commits.webkit.org/223740@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@260505 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-04-22 10:19:30 +00:00
/*
* Copyright (C) 2020 Igalia S.L. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
// Because the primary button is always guaranteed to be present, and other buttons
// should fulfill the role of validating any state from FakeXRButtonStateInit
// the primary button is not present in this enum.
[
Move RuntimeEnabledFeatures to Settings (Part 1) https://bugs.webkit.org/show_bug.cgi?id=224440 Reviewed by Alex Christensen. Move a few RuntimeEnabledFeatures to Settings to consolidate settings in one object and removes the need for additional boilerplate. This is now possible as Settings are now accessible in workers. Moves PeerConnectionEnabled, WebGLUsingMetal, WebGL2Enabled, WebGPUEnabled and MaskWebGLStringsEnabled. Source/WebCore: * Modules/mediastream/RTCAnswerOptions.idl: * Modules/mediastream/RTCCertificate.idl: * Modules/mediastream/RTCConfiguration.idl: * Modules/mediastream/RTCDTMFSender.idl: * Modules/mediastream/RTCDTMFToneChangeEvent.idl: * Modules/mediastream/RTCDataChannel.idl: * Modules/mediastream/RTCDataChannelEvent.idl: * Modules/mediastream/RTCIceCandidate.idl: * Modules/mediastream/RTCIceCandidateInit.idl: * Modules/mediastream/RTCIceConnectionState.idl: * Modules/mediastream/RTCIceGatheringState.idl: * Modules/mediastream/RTCIceServer.idl: * Modules/mediastream/RTCIceTransport.idl: * Modules/mediastream/RTCIceTransportState.idl: * Modules/mediastream/RTCOfferAnswerOptions.idl: * Modules/mediastream/RTCOfferOptions.idl: * Modules/mediastream/RTCPeerConnection.idl: * Modules/mediastream/RTCPeerConnectionIceErrorEvent.idl: * Modules/mediastream/RTCPeerConnectionIceEvent.idl: * Modules/mediastream/RTCPeerConnectionState.idl: * Modules/mediastream/RTCPriorityType.idl: * Modules/mediastream/RTCRtcpParameters.idl: * Modules/mediastream/RTCRtpCapabilities.idl: * Modules/mediastream/RTCRtpCodecCapability.idl: * Modules/mediastream/RTCRtpCodecParameters.idl: * Modules/mediastream/RTCRtpCodingParameters.idl: * Modules/mediastream/RTCRtpContributingSource.idl: * Modules/mediastream/RTCRtpDecodingParameters.idl: * Modules/mediastream/RTCRtpEncodingParameters.idl: * Modules/mediastream/RTCRtpFecParameters.idl: * Modules/mediastream/RTCRtpHeaderExtensionParameters.idl: * Modules/mediastream/RTCRtpParameters.idl: * Modules/mediastream/RTCRtpReceiver.idl: * Modules/mediastream/RTCRtpRtxParameters.idl: * Modules/mediastream/RTCRtpSendParameters.idl: * Modules/mediastream/RTCRtpSender.idl: * Modules/mediastream/RTCRtpSynchronizationSource.idl: * Modules/mediastream/RTCRtpTransceiver.idl: * Modules/mediastream/RTCRtpTransceiverDirection.idl: * Modules/mediastream/RTCSdpType.idl: * Modules/mediastream/RTCSessionDescription.idl: * Modules/mediastream/RTCSignalingState.idl: * Modules/mediastream/RTCStatsReport.idl: * Modules/mediastream/RTCTrackEvent.idl: * Modules/webgpu/GPUBindGroupLayoutBinding.idl: * Modules/webgpu/GPUBindGroupLayoutDescriptor.idl: * Modules/webgpu/GPUBlendDescriptor.idl: * Modules/webgpu/GPUBufferDescriptor.idl: * Modules/webgpu/GPUBufferUsage.idl: * Modules/webgpu/GPUCanvasContext.idl: * Modules/webgpu/GPUColor.idl: * Modules/webgpu/GPUColorStateDescriptor.idl: * Modules/webgpu/GPUColorWrite.idl: * Modules/webgpu/GPUCompareFunction.idl: * Modules/webgpu/GPUDepthStencilStateDescriptor.idl: * Modules/webgpu/GPUErrorFilter.idl: * Modules/webgpu/GPUExtent3D.idl: * Modules/webgpu/GPULoadOp.idl: * Modules/webgpu/GPUOrigin3D.idl: * Modules/webgpu/GPUOutOfMemoryError.idl: * Modules/webgpu/GPURequestAdapterOptions.idl: * Modules/webgpu/GPUSamplerDescriptor.idl: * Modules/webgpu/GPUShaderStage.idl: * Modules/webgpu/GPUStoreOp.idl: * Modules/webgpu/GPUTextureDescriptor.idl: * Modules/webgpu/GPUTextureFormat.idl: * Modules/webgpu/GPUTextureUsage.idl: * Modules/webgpu/GPUUncapturedErrorEvent.idl: * Modules/webgpu/GPUValidationError.idl: * Modules/webgpu/GPUVertexAttributeDescriptor.idl: * Modules/webgpu/GPUVertexBufferDescriptor.idl: * Modules/webgpu/GPUVertexInputDescriptor.idl: * Modules/webgpu/Navigator+GPU.idl: * Modules/webgpu/NavigatorGPU.cpp: * Modules/webgpu/WebGPU.idl: * Modules/webgpu/WebGPUAdapter.idl: * Modules/webgpu/WebGPUBindGroup.idl: * Modules/webgpu/WebGPUBindGroupBinding.idl: * Modules/webgpu/WebGPUBindGroupDescriptor.idl: * Modules/webgpu/WebGPUBindGroupLayout.idl: * Modules/webgpu/WebGPUBuffer.idl: * Modules/webgpu/WebGPUBufferBinding.idl: * Modules/webgpu/WebGPUCommandBuffer.idl: * Modules/webgpu/WebGPUCommandEncoder.idl: * Modules/webgpu/WebGPUComputePassEncoder.idl: * Modules/webgpu/WebGPUComputePipeline.idl: * Modules/webgpu/WebGPUComputePipelineDescriptor.idl: * Modules/webgpu/WebGPUDevice.idl: * Modules/webgpu/WebGPUDeviceErrorScopes.idl: * Modules/webgpu/WebGPUDeviceEventHandler.idl: * Modules/webgpu/WebGPUPipelineDescriptorBase.idl: * Modules/webgpu/WebGPUPipelineLayout.idl: * Modules/webgpu/WebGPUPipelineLayoutDescriptor.idl: * Modules/webgpu/WebGPUProgrammablePassEncoder.idl: * Modules/webgpu/WebGPUProgrammableStageDescriptor.idl: * Modules/webgpu/WebGPUQueue.idl: * Modules/webgpu/WebGPURenderPassDescriptor.idl: * Modules/webgpu/WebGPURenderPassEncoder.idl: * Modules/webgpu/WebGPURenderPipeline.idl: * Modules/webgpu/WebGPURenderPipelineDescriptor.idl: * Modules/webgpu/WebGPUSampler.idl: * Modules/webgpu/WebGPUShaderModule.idl: * Modules/webgpu/WebGPUShaderModuleDescriptor.idl: * Modules/webgpu/WebGPUSwapChain.idl: * Modules/webgpu/WebGPUTexture.idl: * Modules/webgpu/WebGPUTextureView.idl: * Modules/webgpu/WorkerNavigator+GPU.idl: * Modules/webgpu/WorkerNavigatorGPU.cpp: * Modules/webxr/Navigator+WebXR.idl: * Modules/webxr/WebXRBoundedReferenceSpace.idl: * Modules/webxr/WebXRFrame.idl: * Modules/webxr/WebXRInputSource.idl: * Modules/webxr/WebXRInputSourceArray.idl: * Modules/webxr/WebXRLayer.idl: * Modules/webxr/WebXRPose.idl: * Modules/webxr/WebXRReferenceSpace.idl: * Modules/webxr/WebXRRenderState.idl: * Modules/webxr/WebXRRigidTransform.idl: * Modules/webxr/WebXRSession.idl: * Modules/webxr/WebXRSpace.idl: * Modules/webxr/WebXRSystem.cpp: * Modules/webxr/WebXRSystem.idl: * Modules/webxr/WebXRView.idl: * Modules/webxr/WebXRViewerPose.idl: * Modules/webxr/WebXRViewport.idl: * Modules/webxr/WebXRWebGLLayer.idl: * Modules/webxr/XREnvironmentBlendMode.idl: * Modules/webxr/XREye.idl: * Modules/webxr/XRHandedness.idl: * Modules/webxr/XRInputSourceEvent.idl: * Modules/webxr/XRInputSourcesChangeEvent.idl: * Modules/webxr/XRInteractionMode.idl: * Modules/webxr/XRReferenceSpaceEvent.idl: * Modules/webxr/XRReferenceSpaceType.idl: * Modules/webxr/XRRenderStateInit.idl: * Modules/webxr/XRSessionEvent.idl: * Modules/webxr/XRSessionInit.idl: * Modules/webxr/XRSessionMode.idl: * Modules/webxr/XRTargetRayMode.idl: * Modules/webxr/XRVisibilityState.idl: * Modules/webxr/XRWebGLLayerInit.idl: * html/HTMLCanvasElement.cpp: * html/canvas/WebGL2RenderingContext.cpp: * html/canvas/WebGL2RenderingContext.idl: * html/canvas/WebGLRenderingContextBase.cpp: * html/canvas/WebGLTransformFeedback.idl: * html/canvas/WebGLVertexArrayObject.idl: * page/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::peerConnectionEnabled const): Deleted. (WebCore::RuntimeEnabledFeatures::setPeerConnectionEnabled): Deleted. (WebCore::RuntimeEnabledFeatures::setWebGLUsingMetal): Deleted. (WebCore::RuntimeEnabledFeatures::webGLUsingMetal const): Deleted. (WebCore::RuntimeEnabledFeatures::setWebGL2Enabled): Deleted. (WebCore::RuntimeEnabledFeatures::webGL2Enabled const): Deleted. (WebCore::RuntimeEnabledFeatures::setWebGPUEnabled): Deleted. (WebCore::RuntimeEnabledFeatures::webGPUEnabled const): Deleted. (WebCore::RuntimeEnabledFeatures::setMaskWebGLStringsEnabled): Deleted. (WebCore::RuntimeEnabledFeatures::maskWebGLStringsEnabled const): Deleted. * testing/FakeXRBoundsPoint.idl: * testing/FakeXRButtonStateInit.idl: * testing/FakeXRInputSourceInit.idl: * testing/FakeXRRigidTransformInit.idl: * testing/FakeXRViewInit.idl: * testing/InternalSettings.cpp: (WebCore::InternalSettings::Backup::Backup): (WebCore::InternalSettings::Backup::restoreTo): (WebCore::InternalSettings::setWebGL2Enabled): Deleted. (WebCore::InternalSettings::setWebGPUEnabled): Deleted. * testing/InternalSettings.h: * testing/InternalSettings.idl: * testing/Internals.cpp: * testing/WebFakeXRDevice.idl: * testing/WebFakeXRInputController.idl: * testing/WebXRTest.idl: * testing/XRSimulateUserActivationFunction.idl: Source/WebKit: * WebProcess/Inspector/RemoteWebInspectorUI.cpp: (WebKit::RemoteWebInspectorUI::RemoteWebInspectorUI): * WebProcess/Inspector/WebInspectorUI.cpp: (WebKit::WebInspectorUI::enableFrontendFeatures): (WebKit::WebInspectorUI::WebInspectorUI): * WebProcess/Inspector/WebInspectorUI.h: Source/WTF: * Scripts/Preferences/WebPreferences.yaml: * Scripts/Preferences/WebPreferencesExperimental.yaml: Canonical link: https://commits.webkit.org/236686@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@276204 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-04-17 20:07:30 +00:00
EnabledBySetting=WebXR,
[WebXR] Test IDLs and stubs https://bugs.webkit.org/show_bug.cgi?id=209859 Reviewed by Dean Jackson and Youenn Fablet. Source/WebCore: WebXR testing is hard as it might involve interaction with actual devices. That's why the WebXR testing API (https://immersive-web.github.io/webxr-test-api/) was proposed. In fact, all the current WebXR tests from web-platform-tests are using that testing API. This new testing API supplements navigator.xr and is accessed through navigator.xr.test. In order not to expose the API to the web we're adding the XRTest interface to Internals instead. The mapping from internals.xrTest to navigator.xr.test happens in the WPT code. We're adding the required IDLs and very basic (mostly empty) implementations for testing methods. We're adding testing infrastructure, adding tests make no sense for this change. * CMakeLists.txt: Added new files. * DerivedSources.make: Ditto. * Modules/webxr/NavigatorWebXR.h: Export API to be used in testing code. * Modules/webxr/WebXRSystem.h: Export ::from and ::xr methods. * WebCore.xcodeproj/project.pbxproj: Ditto. * bindings/js/WebCoreBuiltinNames.h: Added some new macros. * testing/FakeXRBoundsPoint.h: Added. * testing/FakeXRBoundsPoint.idl: Added. * testing/FakeXRButtonStateInit.h: Added. * testing/FakeXRButtonStateInit.idl: Added. * testing/FakeXRInputSourceInit.h: Added. * testing/FakeXRInputSourceInit.idl: Added. * testing/FakeXRRigidTransformInit.h: Added. * testing/FakeXRRigidTransformInit.idl: Added. * testing/FakeXRViewInit.h: Added. * testing/FakeXRViewInit.idl: Added. * testing/Internals.cpp: (WebCore::Internals::xrTest): Added WebXRTest to Internals. * testing/Internals.h: Added xrTest() accessor. * testing/Internals.idl: Added xrTest attribute. * testing/WebFakeXRDevice.cpp: Added. (WebCore::WebFakeXRDevice::setViews): (WebCore::WebFakeXRDevice::disconnect): (WebCore::WebFakeXRDevice::setViewerOrigin): (WebCore::WebFakeXRDevice::clearViewerOrigin): (WebCore::WebFakeXRDevice::simulateVisibilityChange): (WebCore::WebFakeXRDevice::setBoundsGeometry): (WebCore::WebFakeXRDevice::setFloorOrigin): (WebCore::WebFakeXRDevice::clearFloorOrigin): (WebCore::WebFakeXRDevice::simulateResetPose): (WebCore::WebFakeXRDevice::simulateInputSourceConnection): * testing/WebFakeXRDevice.h: Added. * testing/WebFakeXRDevice.idl: Added. * testing/WebFakeXRInputController.cpp: Added. (WebCore::WebFakeXRInputController::setHandedness): (WebCore::WebFakeXRInputController::setTargetRayMode): (WebCore::WebFakeXRInputController::setProfiles): (WebCore::WebFakeXRInputController::setGripOrigin): (WebCore::WebFakeXRInputController::clearGripOrigin): (WebCore::WebFakeXRInputController::setPointerOrigin): (WebCore::WebFakeXRInputController::disconnect): (WebCore::WebFakeXRInputController::reconnect): (WebCore::WebFakeXRInputController::startSelection): (WebCore::WebFakeXRInputController::endSelection): (WebCore::WebFakeXRInputController::simulateSelect): (WebCore::WebFakeXRInputController::setSupportedButtons): (WebCore::WebFakeXRInputController::updateButtonState): * testing/WebFakeXRInputController.h: Added. * testing/WebFakeXRInputController.idl: Added. * testing/WebXRTest.cpp: Added. (WebCore::WebXRTest::simulateDeviceConnection const): (WebCore::WebXRTest::simulateUserActivation): (WebCore::WebXRTest::disconnectAllDevices): * testing/WebXRTest.h: Added. (WebCore::WebXRTest::create): * testing/WebXRTest.idl: Added. * testing/XRSimulateUserActivationFunction.h: Added. * testing/XRSimulateUserActivationFunction.idl: Ditto. LayoutTests: * platform/wpe/TestExpectations: Added bug number to the passing webxr test. Canonical link: https://commits.webkit.org/223740@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@260505 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-04-22 10:19:30 +00:00
Conditional=WEBXR,
] enum FakeXRButtonType {
"grip",
"touchpad",
"thumbstick",
// Represents a button whose position is not specified by the xr-standard mapping.
// Should appear at one past the last reserved button index.
"optional-button",
// Represents a thumbstick whose position is not specified by the xr-standard mapping.
// Should appear at two past the last reserved button index.
"optional-thumbstick"
};
// Used to update the state of optionally supported buttons.
[
Move RuntimeEnabledFeatures to Settings (Part 1) https://bugs.webkit.org/show_bug.cgi?id=224440 Reviewed by Alex Christensen. Move a few RuntimeEnabledFeatures to Settings to consolidate settings in one object and removes the need for additional boilerplate. This is now possible as Settings are now accessible in workers. Moves PeerConnectionEnabled, WebGLUsingMetal, WebGL2Enabled, WebGPUEnabled and MaskWebGLStringsEnabled. Source/WebCore: * Modules/mediastream/RTCAnswerOptions.idl: * Modules/mediastream/RTCCertificate.idl: * Modules/mediastream/RTCConfiguration.idl: * Modules/mediastream/RTCDTMFSender.idl: * Modules/mediastream/RTCDTMFToneChangeEvent.idl: * Modules/mediastream/RTCDataChannel.idl: * Modules/mediastream/RTCDataChannelEvent.idl: * Modules/mediastream/RTCIceCandidate.idl: * Modules/mediastream/RTCIceCandidateInit.idl: * Modules/mediastream/RTCIceConnectionState.idl: * Modules/mediastream/RTCIceGatheringState.idl: * Modules/mediastream/RTCIceServer.idl: * Modules/mediastream/RTCIceTransport.idl: * Modules/mediastream/RTCIceTransportState.idl: * Modules/mediastream/RTCOfferAnswerOptions.idl: * Modules/mediastream/RTCOfferOptions.idl: * Modules/mediastream/RTCPeerConnection.idl: * Modules/mediastream/RTCPeerConnectionIceErrorEvent.idl: * Modules/mediastream/RTCPeerConnectionIceEvent.idl: * Modules/mediastream/RTCPeerConnectionState.idl: * Modules/mediastream/RTCPriorityType.idl: * Modules/mediastream/RTCRtcpParameters.idl: * Modules/mediastream/RTCRtpCapabilities.idl: * Modules/mediastream/RTCRtpCodecCapability.idl: * Modules/mediastream/RTCRtpCodecParameters.idl: * Modules/mediastream/RTCRtpCodingParameters.idl: * Modules/mediastream/RTCRtpContributingSource.idl: * Modules/mediastream/RTCRtpDecodingParameters.idl: * Modules/mediastream/RTCRtpEncodingParameters.idl: * Modules/mediastream/RTCRtpFecParameters.idl: * Modules/mediastream/RTCRtpHeaderExtensionParameters.idl: * Modules/mediastream/RTCRtpParameters.idl: * Modules/mediastream/RTCRtpReceiver.idl: * Modules/mediastream/RTCRtpRtxParameters.idl: * Modules/mediastream/RTCRtpSendParameters.idl: * Modules/mediastream/RTCRtpSender.idl: * Modules/mediastream/RTCRtpSynchronizationSource.idl: * Modules/mediastream/RTCRtpTransceiver.idl: * Modules/mediastream/RTCRtpTransceiverDirection.idl: * Modules/mediastream/RTCSdpType.idl: * Modules/mediastream/RTCSessionDescription.idl: * Modules/mediastream/RTCSignalingState.idl: * Modules/mediastream/RTCStatsReport.idl: * Modules/mediastream/RTCTrackEvent.idl: * Modules/webgpu/GPUBindGroupLayoutBinding.idl: * Modules/webgpu/GPUBindGroupLayoutDescriptor.idl: * Modules/webgpu/GPUBlendDescriptor.idl: * Modules/webgpu/GPUBufferDescriptor.idl: * Modules/webgpu/GPUBufferUsage.idl: * Modules/webgpu/GPUCanvasContext.idl: * Modules/webgpu/GPUColor.idl: * Modules/webgpu/GPUColorStateDescriptor.idl: * Modules/webgpu/GPUColorWrite.idl: * Modules/webgpu/GPUCompareFunction.idl: * Modules/webgpu/GPUDepthStencilStateDescriptor.idl: * Modules/webgpu/GPUErrorFilter.idl: * Modules/webgpu/GPUExtent3D.idl: * Modules/webgpu/GPULoadOp.idl: * Modules/webgpu/GPUOrigin3D.idl: * Modules/webgpu/GPUOutOfMemoryError.idl: * Modules/webgpu/GPURequestAdapterOptions.idl: * Modules/webgpu/GPUSamplerDescriptor.idl: * Modules/webgpu/GPUShaderStage.idl: * Modules/webgpu/GPUStoreOp.idl: * Modules/webgpu/GPUTextureDescriptor.idl: * Modules/webgpu/GPUTextureFormat.idl: * Modules/webgpu/GPUTextureUsage.idl: * Modules/webgpu/GPUUncapturedErrorEvent.idl: * Modules/webgpu/GPUValidationError.idl: * Modules/webgpu/GPUVertexAttributeDescriptor.idl: * Modules/webgpu/GPUVertexBufferDescriptor.idl: * Modules/webgpu/GPUVertexInputDescriptor.idl: * Modules/webgpu/Navigator+GPU.idl: * Modules/webgpu/NavigatorGPU.cpp: * Modules/webgpu/WebGPU.idl: * Modules/webgpu/WebGPUAdapter.idl: * Modules/webgpu/WebGPUBindGroup.idl: * Modules/webgpu/WebGPUBindGroupBinding.idl: * Modules/webgpu/WebGPUBindGroupDescriptor.idl: * Modules/webgpu/WebGPUBindGroupLayout.idl: * Modules/webgpu/WebGPUBuffer.idl: * Modules/webgpu/WebGPUBufferBinding.idl: * Modules/webgpu/WebGPUCommandBuffer.idl: * Modules/webgpu/WebGPUCommandEncoder.idl: * Modules/webgpu/WebGPUComputePassEncoder.idl: * Modules/webgpu/WebGPUComputePipeline.idl: * Modules/webgpu/WebGPUComputePipelineDescriptor.idl: * Modules/webgpu/WebGPUDevice.idl: * Modules/webgpu/WebGPUDeviceErrorScopes.idl: * Modules/webgpu/WebGPUDeviceEventHandler.idl: * Modules/webgpu/WebGPUPipelineDescriptorBase.idl: * Modules/webgpu/WebGPUPipelineLayout.idl: * Modules/webgpu/WebGPUPipelineLayoutDescriptor.idl: * Modules/webgpu/WebGPUProgrammablePassEncoder.idl: * Modules/webgpu/WebGPUProgrammableStageDescriptor.idl: * Modules/webgpu/WebGPUQueue.idl: * Modules/webgpu/WebGPURenderPassDescriptor.idl: * Modules/webgpu/WebGPURenderPassEncoder.idl: * Modules/webgpu/WebGPURenderPipeline.idl: * Modules/webgpu/WebGPURenderPipelineDescriptor.idl: * Modules/webgpu/WebGPUSampler.idl: * Modules/webgpu/WebGPUShaderModule.idl: * Modules/webgpu/WebGPUShaderModuleDescriptor.idl: * Modules/webgpu/WebGPUSwapChain.idl: * Modules/webgpu/WebGPUTexture.idl: * Modules/webgpu/WebGPUTextureView.idl: * Modules/webgpu/WorkerNavigator+GPU.idl: * Modules/webgpu/WorkerNavigatorGPU.cpp: * Modules/webxr/Navigator+WebXR.idl: * Modules/webxr/WebXRBoundedReferenceSpace.idl: * Modules/webxr/WebXRFrame.idl: * Modules/webxr/WebXRInputSource.idl: * Modules/webxr/WebXRInputSourceArray.idl: * Modules/webxr/WebXRLayer.idl: * Modules/webxr/WebXRPose.idl: * Modules/webxr/WebXRReferenceSpace.idl: * Modules/webxr/WebXRRenderState.idl: * Modules/webxr/WebXRRigidTransform.idl: * Modules/webxr/WebXRSession.idl: * Modules/webxr/WebXRSpace.idl: * Modules/webxr/WebXRSystem.cpp: * Modules/webxr/WebXRSystem.idl: * Modules/webxr/WebXRView.idl: * Modules/webxr/WebXRViewerPose.idl: * Modules/webxr/WebXRViewport.idl: * Modules/webxr/WebXRWebGLLayer.idl: * Modules/webxr/XREnvironmentBlendMode.idl: * Modules/webxr/XREye.idl: * Modules/webxr/XRHandedness.idl: * Modules/webxr/XRInputSourceEvent.idl: * Modules/webxr/XRInputSourcesChangeEvent.idl: * Modules/webxr/XRInteractionMode.idl: * Modules/webxr/XRReferenceSpaceEvent.idl: * Modules/webxr/XRReferenceSpaceType.idl: * Modules/webxr/XRRenderStateInit.idl: * Modules/webxr/XRSessionEvent.idl: * Modules/webxr/XRSessionInit.idl: * Modules/webxr/XRSessionMode.idl: * Modules/webxr/XRTargetRayMode.idl: * Modules/webxr/XRVisibilityState.idl: * Modules/webxr/XRWebGLLayerInit.idl: * html/HTMLCanvasElement.cpp: * html/canvas/WebGL2RenderingContext.cpp: * html/canvas/WebGL2RenderingContext.idl: * html/canvas/WebGLRenderingContextBase.cpp: * html/canvas/WebGLTransformFeedback.idl: * html/canvas/WebGLVertexArrayObject.idl: * page/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::peerConnectionEnabled const): Deleted. (WebCore::RuntimeEnabledFeatures::setPeerConnectionEnabled): Deleted. (WebCore::RuntimeEnabledFeatures::setWebGLUsingMetal): Deleted. (WebCore::RuntimeEnabledFeatures::webGLUsingMetal const): Deleted. (WebCore::RuntimeEnabledFeatures::setWebGL2Enabled): Deleted. (WebCore::RuntimeEnabledFeatures::webGL2Enabled const): Deleted. (WebCore::RuntimeEnabledFeatures::setWebGPUEnabled): Deleted. (WebCore::RuntimeEnabledFeatures::webGPUEnabled const): Deleted. (WebCore::RuntimeEnabledFeatures::setMaskWebGLStringsEnabled): Deleted. (WebCore::RuntimeEnabledFeatures::maskWebGLStringsEnabled const): Deleted. * testing/FakeXRBoundsPoint.idl: * testing/FakeXRButtonStateInit.idl: * testing/FakeXRInputSourceInit.idl: * testing/FakeXRRigidTransformInit.idl: * testing/FakeXRViewInit.idl: * testing/InternalSettings.cpp: (WebCore::InternalSettings::Backup::Backup): (WebCore::InternalSettings::Backup::restoreTo): (WebCore::InternalSettings::setWebGL2Enabled): Deleted. (WebCore::InternalSettings::setWebGPUEnabled): Deleted. * testing/InternalSettings.h: * testing/InternalSettings.idl: * testing/Internals.cpp: * testing/WebFakeXRDevice.idl: * testing/WebFakeXRInputController.idl: * testing/WebXRTest.idl: * testing/XRSimulateUserActivationFunction.idl: Source/WebKit: * WebProcess/Inspector/RemoteWebInspectorUI.cpp: (WebKit::RemoteWebInspectorUI::RemoteWebInspectorUI): * WebProcess/Inspector/WebInspectorUI.cpp: (WebKit::WebInspectorUI::enableFrontendFeatures): (WebKit::WebInspectorUI::WebInspectorUI): * WebProcess/Inspector/WebInspectorUI.h: Source/WTF: * Scripts/Preferences/WebPreferences.yaml: * Scripts/Preferences/WebPreferencesExperimental.yaml: Canonical link: https://commits.webkit.org/236686@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@276204 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-04-17 20:07:30 +00:00
EnabledBySetting=WebXR,
[WebXR] Test IDLs and stubs https://bugs.webkit.org/show_bug.cgi?id=209859 Reviewed by Dean Jackson and Youenn Fablet. Source/WebCore: WebXR testing is hard as it might involve interaction with actual devices. That's why the WebXR testing API (https://immersive-web.github.io/webxr-test-api/) was proposed. In fact, all the current WebXR tests from web-platform-tests are using that testing API. This new testing API supplements navigator.xr and is accessed through navigator.xr.test. In order not to expose the API to the web we're adding the XRTest interface to Internals instead. The mapping from internals.xrTest to navigator.xr.test happens in the WPT code. We're adding the required IDLs and very basic (mostly empty) implementations for testing methods. We're adding testing infrastructure, adding tests make no sense for this change. * CMakeLists.txt: Added new files. * DerivedSources.make: Ditto. * Modules/webxr/NavigatorWebXR.h: Export API to be used in testing code. * Modules/webxr/WebXRSystem.h: Export ::from and ::xr methods. * WebCore.xcodeproj/project.pbxproj: Ditto. * bindings/js/WebCoreBuiltinNames.h: Added some new macros. * testing/FakeXRBoundsPoint.h: Added. * testing/FakeXRBoundsPoint.idl: Added. * testing/FakeXRButtonStateInit.h: Added. * testing/FakeXRButtonStateInit.idl: Added. * testing/FakeXRInputSourceInit.h: Added. * testing/FakeXRInputSourceInit.idl: Added. * testing/FakeXRRigidTransformInit.h: Added. * testing/FakeXRRigidTransformInit.idl: Added. * testing/FakeXRViewInit.h: Added. * testing/FakeXRViewInit.idl: Added. * testing/Internals.cpp: (WebCore::Internals::xrTest): Added WebXRTest to Internals. * testing/Internals.h: Added xrTest() accessor. * testing/Internals.idl: Added xrTest attribute. * testing/WebFakeXRDevice.cpp: Added. (WebCore::WebFakeXRDevice::setViews): (WebCore::WebFakeXRDevice::disconnect): (WebCore::WebFakeXRDevice::setViewerOrigin): (WebCore::WebFakeXRDevice::clearViewerOrigin): (WebCore::WebFakeXRDevice::simulateVisibilityChange): (WebCore::WebFakeXRDevice::setBoundsGeometry): (WebCore::WebFakeXRDevice::setFloorOrigin): (WebCore::WebFakeXRDevice::clearFloorOrigin): (WebCore::WebFakeXRDevice::simulateResetPose): (WebCore::WebFakeXRDevice::simulateInputSourceConnection): * testing/WebFakeXRDevice.h: Added. * testing/WebFakeXRDevice.idl: Added. * testing/WebFakeXRInputController.cpp: Added. (WebCore::WebFakeXRInputController::setHandedness): (WebCore::WebFakeXRInputController::setTargetRayMode): (WebCore::WebFakeXRInputController::setProfiles): (WebCore::WebFakeXRInputController::setGripOrigin): (WebCore::WebFakeXRInputController::clearGripOrigin): (WebCore::WebFakeXRInputController::setPointerOrigin): (WebCore::WebFakeXRInputController::disconnect): (WebCore::WebFakeXRInputController::reconnect): (WebCore::WebFakeXRInputController::startSelection): (WebCore::WebFakeXRInputController::endSelection): (WebCore::WebFakeXRInputController::simulateSelect): (WebCore::WebFakeXRInputController::setSupportedButtons): (WebCore::WebFakeXRInputController::updateButtonState): * testing/WebFakeXRInputController.h: Added. * testing/WebFakeXRInputController.idl: Added. * testing/WebXRTest.cpp: Added. (WebCore::WebXRTest::simulateDeviceConnection const): (WebCore::WebXRTest::simulateUserActivation): (WebCore::WebXRTest::disconnectAllDevices): * testing/WebXRTest.h: Added. (WebCore::WebXRTest::create): * testing/WebXRTest.idl: Added. * testing/XRSimulateUserActivationFunction.h: Added. * testing/XRSimulateUserActivationFunction.idl: Ditto. LayoutTests: * platform/wpe/TestExpectations: Added bug number to the passing webxr test. Canonical link: https://commits.webkit.org/223740@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@260505 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-04-22 10:19:30 +00:00
Conditional=WEBXR,
] dictionary FakeXRButtonStateInit {
required FakeXRButtonType buttonType;
required boolean pressed;
required boolean touched;
required float pressedValue;
// x and y value are ignored if the FakeXRButtonType is not touchpad, thumbstick, or optional-thumbstick
float xValue = 0.0;
float yValue = 0.0;
};