Title: [285376] trunk/Source
Revision
285376
Author
[email protected]
Date
2021-11-06 13:50:48 -0700 (Sat, 06 Nov 2021)

Log Message

[WebGPU] Bindings part 1: Bring back Adapter/Device bindings code
https://bugs.webkit.org/show_bug.cgi?id=232550

Reviewed by Alex Christensen.

Source/WebCore:

This is the first chunk of bindings code, brought back from r280467.
This chunk includes the Adapter and Device object. The Device object
has no methods inside it yet - those will come later.

No new tests because there is no behavior change yet.

* CMakeLists.txt:
* DerivedSources-input.xcfilelist:
* DerivedSources-output.xcfilelist:
* DerivedSources.make:
* Modules/WebGPU/GPU.cpp: Added.
(WebCore::GPU::requestAdapter):
* Modules/WebGPU/GPU.h: Added.
(WebCore::GPU::create):
* Modules/WebGPU/GPU.idl: Added.
* Modules/WebGPU/GPUAdapter.cpp: Added.
(WebCore::GPUAdapter::name const):
(WebCore::GPUAdapter::features const):
(WebCore::GPUAdapter::limits const):
(WebCore::GPUAdapter::isFallbackAdapter const):
(WebCore::GPUAdapter::requestDevice):
* Modules/WebGPU/GPUAdapter.h: Added.
(WebCore::GPUAdapter::create):
* Modules/WebGPU/GPUAdapter.idl: Added.
* Modules/WebGPU/GPUDevice.cpp: Added.
(WebCore::GPUDevice::label const):
(WebCore::GPUDevice::setLabel):
(WebCore::GPUDevice::features const):
(WebCore::GPUDevice::limits const):
* Modules/WebGPU/GPUDevice.h: Added.
(WebCore::GPUDevice::create):
(WebCore::GPUDevice::GPUDevice):
* Modules/WebGPU/GPUDevice.idl: Added.
* Modules/WebGPU/GPUDeviceDescriptor.h: Added.
* Modules/WebGPU/GPUDeviceDescriptor.idl: Added.
* Modules/WebGPU/GPUFeatureName.h: Added.
* Modules/WebGPU/GPUFeatureName.idl: Added.
* Modules/WebGPU/GPUObjectBase.idl: Added.
* Modules/WebGPU/GPUObjectDescriptorBase.h: Added.
* Modules/WebGPU/GPUObjectDescriptorBase.idl: Added.
* Modules/WebGPU/GPUPowerPreference.h: Added.
* Modules/WebGPU/GPUPowerPreference.idl: Added.
* Modules/WebGPU/GPUPredefinedColorSpace.h: Added.
* Modules/WebGPU/GPUPredefinedColorSpace.idl: Added.
* Modules/WebGPU/GPURequestAdapterOptions.h: Added.
* Modules/WebGPU/GPURequestAdapterOptions.idl: Added.
* Modules/WebGPU/GPUSupportedFeatures.cpp: Added.
(WebCore::GPUSupportedFeatures::initializeSetLike const):
* Modules/WebGPU/GPUSupportedFeatures.h: Added.
(WebCore::GPUSupportedFeatures::create):
* Modules/WebGPU/GPUSupportedFeatures.idl: Added.
* Modules/WebGPU/GPUSupportedLimits.cpp: Added.
(WebCore::GPUSupportedLimits::maxTextureDimension1D const):
(WebCore::GPUSupportedLimits::maxTextureDimension2D const):
(WebCore::GPUSupportedLimits::maxTextureDimension3D const):
(WebCore::GPUSupportedLimits::maxTextureArrayLayers const):
(WebCore::GPUSupportedLimits::maxBindGroups const):
(WebCore::GPUSupportedLimits::maxDynamicUniformBuffersPerPipelineLayout const):
(WebCore::GPUSupportedLimits::maxDynamicStorageBuffersPerPipelineLayout const):
(WebCore::GPUSupportedLimits::maxSampledTexturesPerShaderStage const):
(WebCore::GPUSupportedLimits::maxSamplersPerShaderStage const):
(WebCore::GPUSupportedLimits::maxStorageBuffersPerShaderStage const):
(WebCore::GPUSupportedLimits::maxStorageTexturesPerShaderStage const):
(WebCore::GPUSupportedLimits::maxUniformBuffersPerShaderStage const):
(WebCore::GPUSupportedLimits::maxUniformBufferBindingSize const):
(WebCore::GPUSupportedLimits::maxStorageBufferBindingSize const):
(WebCore::GPUSupportedLimits::minUniformBufferOffsetAlignment const):
(WebCore::GPUSupportedLimits::minStorageBufferOffsetAlignment const):
(WebCore::GPUSupportedLimits::maxVertexBuffers const):
(WebCore::GPUSupportedLimits::maxVertexAttributes const):
(WebCore::GPUSupportedLimits::maxVertexBufferArrayStride const):
(WebCore::GPUSupportedLimits::maxInterStageShaderComponents const):
(WebCore::GPUSupportedLimits::maxComputeWorkgroupStorageSize const):
(WebCore::GPUSupportedLimits::maxComputeInvocationsPerWorkgroup const):
(WebCore::GPUSupportedLimits::maxComputeWorkgroupSizeX const):
(WebCore::GPUSupportedLimits::maxComputeWorkgroupSizeY const):
(WebCore::GPUSupportedLimits::maxComputeWorkgroupSizeZ const):
(WebCore::GPUSupportedLimits::maxComputeWorkgroupsPerDimension const):
* Modules/WebGPU/GPUSupportedLimits.h: Added.
(WebCore::GPUSupportedLimits::create):
* Modules/WebGPU/GPUSupportedLimits.idl: Added.
* Modules/WebGPU/NavigatorGPU.idl: Added.
* Modules/applepay/PaymentCoordinator.cpp:
* Modules/mediasource/SourceBuffer.h:
* Modules/webauthn/PublicKeyCredentialRequestOptions.h:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/WebCoreBuiltinNames.h:
* bindings/scripts/CodeGenerator.pm:
(ProcessDocument):
* dom/EventTargetFactory.in:
* page/Navigator.idl:
* page/NavigatorBase.cpp:
(WebCore::NavigatorBase::NavigatorBase):
* page/NavigatorBase.h:
(WebCore::NavigatorBase::gpu):
* page/WorkerNavigator.idl:

Source/WTF:

* Scripts/Preferences/WebPreferences.yaml:

Modified Paths

Added Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (285375 => 285376)


--- trunk/Source/WTF/ChangeLog	2021-11-06 19:43:54 UTC (rev 285375)
+++ trunk/Source/WTF/ChangeLog	2021-11-06 20:50:48 UTC (rev 285376)
@@ -1,3 +1,12 @@
+2021-11-04  Myles C. Maxfield  <[email protected]>
+
+        [WebGPU] Bindings part 1: Bring back Adapter/Device bindings code
+        https://bugs.webkit.org/show_bug.cgi?id=232550
+
+        Reviewed by Alex Christensen.
+
+        * Scripts/Preferences/WebPreferences.yaml:
+
 2021-11-05  Alex Christensen  <[email protected]>
 
         Restructure WKContentRuleList Action storage during compilation and interpretation

Modified: trunk/Source/WTF/Scripts/Preferences/WebPreferences.yaml (285375 => 285376)


--- trunk/Source/WTF/Scripts/Preferences/WebPreferences.yaml	2021-11-06 19:43:54 UTC (rev 285375)
+++ trunk/Source/WTF/Scripts/Preferences/WebPreferences.yaml	2021-11-06 20:50:48 UTC (rev 285376)
@@ -2536,6 +2536,16 @@
     WebCore:
       default: false
 
+WebGPU:
+  type: bool
+  defaultValue:
+    WebKitLegacy:
+      default: false
+    WebKit:
+      default: false
+    WebCore:
+      default: false
+
 WebSecurityEnabled:
   type: bool
   inspectorOverride: true

Modified: trunk/Source/WebCore/CMakeLists.txt (285375 => 285376)


--- trunk/Source/WebCore/CMakeLists.txt	2021-11-06 19:43:54 UTC (rev 285375)
+++ trunk/Source/WebCore/CMakeLists.txt	2021-11-06 20:50:48 UTC (rev 285376)
@@ -18,6 +18,7 @@
     "${CMAKE_BINARY_DIR}"
     "${WebCore_DERIVED_SOURCES_DIR}"
     "${WEBCORE_DIR}"
+    "${WEBCORE_DIR}/Modules/WebGPU"
     "${WEBCORE_DIR}/Modules/airplay"
     "${WEBCORE_DIR}/Modules/applepay"
     "${WEBCORE_DIR}/Modules/applepay/paymentrequest"
@@ -191,6 +192,7 @@
     workers
     xml
 
+    Modules/WebGPU
     Modules/airplay
     Modules/cache
     Modules/credentialmanagement
@@ -1465,6 +1467,22 @@
     Modules/webxr/XRWebGLLayerInit.idl
 )
 
+list(APPEND WebCore_NON_SVG_IDL_FILES
+    Modules/WebGPU/GPU.idl
+    Modules/WebGPU/GPUAdapter.idl
+    Modules/WebGPU/GPUDevice.idl
+    Modules/WebGPU/GPUDeviceDescriptor.idl
+    Modules/WebGPU/GPUFeatureName.idl
+    Modules/WebGPU/GPUObjectBase.idl
+    Modules/WebGPU/GPUObjectDescriptorBase.idl
+    Modules/WebGPU/GPUPowerPreference.idl
+    Modules/WebGPU/GPUPredefinedColorSpace.idl
+    Modules/WebGPU/GPURequestAdapterOptions.idl
+    Modules/WebGPU/GPUSupportedFeatures.idl
+    Modules/WebGPU/GPUSupportedLimits.idl
+    Modules/WebGPU/NavigatorGPU.idl
+)
+
 set(WebCore_IDL_FILES
     ${WebCore_NON_SVG_IDL_FILES}
     ${WebCore_SVG_IDL_FILES}

Modified: trunk/Source/WebCore/ChangeLog (285375 => 285376)


--- trunk/Source/WebCore/ChangeLog	2021-11-06 19:43:54 UTC (rev 285375)
+++ trunk/Source/WebCore/ChangeLog	2021-11-06 20:50:48 UTC (rev 285376)
@@ -1,3 +1,108 @@
+2021-11-04  Myles C. Maxfield  <[email protected]>
+
+        [WebGPU] Bindings part 1: Bring back Adapter/Device bindings code
+        https://bugs.webkit.org/show_bug.cgi?id=232550
+
+        Reviewed by Alex Christensen.
+
+        This is the first chunk of bindings code, brought back from r280467.
+        This chunk includes the Adapter and Device object. The Device object
+        has no methods inside it yet - those will come later.
+
+        No new tests because there is no behavior change yet.
+
+        * CMakeLists.txt:
+        * DerivedSources-input.xcfilelist:
+        * DerivedSources-output.xcfilelist:
+        * DerivedSources.make:
+        * Modules/WebGPU/GPU.cpp: Added.
+        (WebCore::GPU::requestAdapter):
+        * Modules/WebGPU/GPU.h: Added.
+        (WebCore::GPU::create):
+        * Modules/WebGPU/GPU.idl: Added.
+        * Modules/WebGPU/GPUAdapter.cpp: Added.
+        (WebCore::GPUAdapter::name const):
+        (WebCore::GPUAdapter::features const):
+        (WebCore::GPUAdapter::limits const):
+        (WebCore::GPUAdapter::isFallbackAdapter const):
+        (WebCore::GPUAdapter::requestDevice):
+        * Modules/WebGPU/GPUAdapter.h: Added.
+        (WebCore::GPUAdapter::create):
+        * Modules/WebGPU/GPUAdapter.idl: Added.
+        * Modules/WebGPU/GPUDevice.cpp: Added.
+        (WebCore::GPUDevice::label const):
+        (WebCore::GPUDevice::setLabel):
+        (WebCore::GPUDevice::features const):
+        (WebCore::GPUDevice::limits const):
+        * Modules/WebGPU/GPUDevice.h: Added.
+        (WebCore::GPUDevice::create):
+        (WebCore::GPUDevice::GPUDevice):
+        * Modules/WebGPU/GPUDevice.idl: Added.
+        * Modules/WebGPU/GPUDeviceDescriptor.h: Added.
+        * Modules/WebGPU/GPUDeviceDescriptor.idl: Added.
+        * Modules/WebGPU/GPUFeatureName.h: Added.
+        * Modules/WebGPU/GPUFeatureName.idl: Added.
+        * Modules/WebGPU/GPUObjectBase.idl: Added.
+        * Modules/WebGPU/GPUObjectDescriptorBase.h: Added.
+        * Modules/WebGPU/GPUObjectDescriptorBase.idl: Added.
+        * Modules/WebGPU/GPUPowerPreference.h: Added.
+        * Modules/WebGPU/GPUPowerPreference.idl: Added.
+        * Modules/WebGPU/GPUPredefinedColorSpace.h: Added.
+        * Modules/WebGPU/GPUPredefinedColorSpace.idl: Added.
+        * Modules/WebGPU/GPURequestAdapterOptions.h: Added.
+        * Modules/WebGPU/GPURequestAdapterOptions.idl: Added.
+        * Modules/WebGPU/GPUSupportedFeatures.cpp: Added.
+        (WebCore::GPUSupportedFeatures::initializeSetLike const):
+        * Modules/WebGPU/GPUSupportedFeatures.h: Added.
+        (WebCore::GPUSupportedFeatures::create):
+        * Modules/WebGPU/GPUSupportedFeatures.idl: Added.
+        * Modules/WebGPU/GPUSupportedLimits.cpp: Added.
+        (WebCore::GPUSupportedLimits::maxTextureDimension1D const):
+        (WebCore::GPUSupportedLimits::maxTextureDimension2D const):
+        (WebCore::GPUSupportedLimits::maxTextureDimension3D const):
+        (WebCore::GPUSupportedLimits::maxTextureArrayLayers const):
+        (WebCore::GPUSupportedLimits::maxBindGroups const):
+        (WebCore::GPUSupportedLimits::maxDynamicUniformBuffersPerPipelineLayout const):
+        (WebCore::GPUSupportedLimits::maxDynamicStorageBuffersPerPipelineLayout const):
+        (WebCore::GPUSupportedLimits::maxSampledTexturesPerShaderStage const):
+        (WebCore::GPUSupportedLimits::maxSamplersPerShaderStage const):
+        (WebCore::GPUSupportedLimits::maxStorageBuffersPerShaderStage const):
+        (WebCore::GPUSupportedLimits::maxStorageTexturesPerShaderStage const):
+        (WebCore::GPUSupportedLimits::maxUniformBuffersPerShaderStage const):
+        (WebCore::GPUSupportedLimits::maxUniformBufferBindingSize const):
+        (WebCore::GPUSupportedLimits::maxStorageBufferBindingSize const):
+        (WebCore::GPUSupportedLimits::minUniformBufferOffsetAlignment const):
+        (WebCore::GPUSupportedLimits::minStorageBufferOffsetAlignment const):
+        (WebCore::GPUSupportedLimits::maxVertexBuffers const):
+        (WebCore::GPUSupportedLimits::maxVertexAttributes const):
+        (WebCore::GPUSupportedLimits::maxVertexBufferArrayStride const):
+        (WebCore::GPUSupportedLimits::maxInterStageShaderComponents const):
+        (WebCore::GPUSupportedLimits::maxComputeWorkgroupStorageSize const):
+        (WebCore::GPUSupportedLimits::maxComputeInvocationsPerWorkgroup const):
+        (WebCore::GPUSupportedLimits::maxComputeWorkgroupSizeX const):
+        (WebCore::GPUSupportedLimits::maxComputeWorkgroupSizeY const):
+        (WebCore::GPUSupportedLimits::maxComputeWorkgroupSizeZ const):
+        (WebCore::GPUSupportedLimits::maxComputeWorkgroupsPerDimension const):
+        * Modules/WebGPU/GPUSupportedLimits.h: Added.
+        (WebCore::GPUSupportedLimits::create):
+        * Modules/WebGPU/GPUSupportedLimits.idl: Added.
+        * Modules/WebGPU/NavigatorGPU.idl: Added.
+        * Modules/applepay/PaymentCoordinator.cpp:
+        * Modules/mediasource/SourceBuffer.h:
+        * Modules/webauthn/PublicKeyCredentialRequestOptions.h:
+        * Sources.txt:
+        * WebCore.xcodeproj/project.pbxproj:
+        * bindings/js/WebCoreBuiltinNames.h:
+        * bindings/scripts/CodeGenerator.pm:
+        (ProcessDocument):
+        * dom/EventTargetFactory.in:
+        * page/Navigator.idl:
+        * page/NavigatorBase.cpp:
+        (WebCore::NavigatorBase::NavigatorBase):
+        * page/NavigatorBase.h:
+        (WebCore::NavigatorBase::gpu):
+        * page/WorkerNavigator.idl:
+
 2021-11-06  Simon Fraser  <[email protected]>
 
         WheelEventDeltaFilter::shouldApplyFilteringForEvent can be a static function

Modified: trunk/Source/WebCore/DerivedSources-input.xcfilelist (285375 => 285376)


--- trunk/Source/WebCore/DerivedSources-input.xcfilelist	2021-11-06 19:43:54 UTC (rev 285375)
+++ trunk/Source/WebCore/DerivedSources-input.xcfilelist	2021-11-06 20:50:48 UTC (rev 285376)
@@ -21,6 +21,20 @@
 $(_javascript_CORE_PRIVATE_HEADERS_DIR)/wkbuiltins.py
 $(_javascript_CORE_PRIVATE_HEADERS_DIR)/xxd.pl
 $(PROJECT_DIR)/DerivedSources.make
+$(PROJECT_DIR)/Modules/WebGPU/GPU.idl
+$(PROJECT_DIR)/Modules/WebGPU/GPUAdapter.idl
+$(PROJECT_DIR)/Modules/WebGPU/GPUDevice.idl
+$(PROJECT_DIR)/Modules/WebGPU/GPUDeviceDescriptor.idl
+$(PROJECT_DIR)/Modules/WebGPU/GPUFeatureName.idl
+$(PROJECT_DIR)/Modules/WebGPU/GPUObjectBase.idl
+$(PROJECT_DIR)/Modules/WebGPU/GPUObjectDescriptorBase.idl
+$(PROJECT_DIR)/Modules/WebGPU/GPUPowerPreference.idl
+$(PROJECT_DIR)/Modules/WebGPU/GPUPredefinedColorSpace.idl
+$(PROJECT_DIR)/Modules/WebGPU/GPURequestAdapterOptions.idl
+$(PROJECT_DIR)/Modules/WebGPU/GPUSize64.idl
+$(PROJECT_DIR)/Modules/WebGPU/GPUSupportedFeatures.idl
+$(PROJECT_DIR)/Modules/WebGPU/GPUSupportedLimits.idl
+$(PROJECT_DIR)/Modules/WebGPU/NavigatorGPU.idl
 $(PROJECT_DIR)/Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.idl
 $(PROJECT_DIR)/Modules/applepay/ApplePayCancelEvent.idl
 $(PROJECT_DIR)/Modules/applepay/ApplePayContactField.idl

Modified: trunk/Source/WebCore/DerivedSources-output.xcfilelist (285375 => 285376)


--- trunk/Source/WebCore/DerivedSources-output.xcfilelist	2021-11-06 19:43:54 UTC (rev 285375)
+++ trunk/Source/WebCore/DerivedSources-output.xcfilelist	2021-11-06 20:50:48 UTC (rev 285376)
@@ -867,6 +867,32 @@
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSFormDataEvent.h
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGCObservation.cpp
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGCObservation.h
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPU.cpp
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPU.h
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUAdapter.cpp
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUAdapter.h
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUDevice.cpp
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUDevice.h
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUDeviceDescriptor.cpp
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUDeviceDescriptor.h
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUFeatureName.cpp
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUFeatureName.h
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUObjectBase.cpp
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUObjectBase.h
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUObjectDescriptorBase.cpp
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUObjectDescriptorBase.h
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUPowerPreference.cpp
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUPowerPreference.h
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUPredefinedColorSpace.cpp
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUPredefinedColorSpace.h
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPURequestAdapterOptions.cpp
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPURequestAdapterOptions.h
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUSize64.cpp
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUSize64.h
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUSupportedFeatures.cpp
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUSupportedFeatures.h
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUSupportedLimits.cpp
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUSupportedLimits.h
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGainNode.cpp
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGainNode.h
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGainOptions.cpp
@@ -1389,6 +1415,8 @@
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSNavigator.h
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSNavigatorCookies.cpp
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSNavigatorCookies.h
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSNavigatorGPU.cpp
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSNavigatorGPU.h
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSNavigatorID.cpp
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSNavigatorID.h
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSNavigatorLanguage.cpp

Modified: trunk/Source/WebCore/DerivedSources.make (285375 => 285376)


--- trunk/Source/WebCore/DerivedSources.make	2021-11-06 19:43:54 UTC (rev 285375)
+++ trunk/Source/WebCore/DerivedSources.make	2021-11-06 20:50:48 UTC (rev 285376)
@@ -53,6 +53,19 @@
 # --------
 
 JS_BINDING_IDLS := \
+    $(WebCore)/Modules/WebGPU/GPU.idl \
+    $(WebCore)/Modules/WebGPU/GPUAdapter.idl \
+    $(WebCore)/Modules/WebGPU/GPUDevice.idl \
+    $(WebCore)/Modules/WebGPU/GPUDeviceDescriptor.idl \
+    $(WebCore)/Modules/WebGPU/GPUFeatureName.idl \
+    $(WebCore)/Modules/WebGPU/GPUObjectBase.idl \
+    $(WebCore)/Modules/WebGPU/GPUObjectDescriptorBase.idl \
+    $(WebCore)/Modules/WebGPU/GPUPowerPreference.idl \
+    $(WebCore)/Modules/WebGPU/GPUPredefinedColorSpace.idl \
+    $(WebCore)/Modules/WebGPU/GPURequestAdapterOptions.idl \
+    $(WebCore)/Modules/WebGPU/GPUSupportedFeatures.idl \
+    $(WebCore)/Modules/WebGPU/GPUSupportedLimits.idl \
+    $(WebCore)/Modules/WebGPU/NavigatorGPU.idl \
     $(WebCore)/Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.idl \
     $(WebCore)/Modules/applepay/ApplePayCancelEvent.idl \
     $(WebCore)/Modules/applepay/ApplePayContactField.idl \

Added: trunk/Source/WebCore/Modules/WebGPU/GPU.cpp (0 => 285376)


--- trunk/Source/WebCore/Modules/WebGPU/GPU.cpp	                        (rev 0)
+++ trunk/Source/WebCore/Modules/WebGPU/GPU.cpp	2021-11-06 20:50:48 UTC (rev 285376)
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2021 Apple Inc. 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.
+ */
+
+#include "config.h"
+#include "GPU.h"
+
+namespace WebCore {
+
+void GPU::requestAdapter(const GPURequestAdapterOptions&, RequestAdapterPromise&&)
+{
+
+}
+
+}
Property changes on: trunk/Source/WebCore/Modules/WebGPU/GPU.cpp
___________________________________________________________________

Added: svn:eol-style

+native \ No newline at end of property

Added: trunk/Source/WebCore/Modules/WebGPU/GPU.h (0 => 285376)


--- trunk/Source/WebCore/Modules/WebGPU/GPU.h	                        (rev 0)
+++ trunk/Source/WebCore/Modules/WebGPU/GPU.h	2021-11-06 20:50:48 UTC (rev 285376)
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2021 Apple Inc. 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.
+ */
+
+#pragma once
+
+#include "GPUAdapter.h"
+#include "GPURequestAdapterOptions.h"
+#include "JSDOMPromiseDeferred.h"
+#include <wtf/Ref.h>
+#include <wtf/RefCounted.h>
+
+namespace WebCore {
+
+class GPU : public RefCounted<GPU> {
+public:
+    static Ref<GPU> create()
+    {
+        return adoptRef(*new GPU());
+    }
+
+    using RequestAdapterPromise = DOMPromiseDeferred<IDLNullable<IDLInterface<GPUAdapter>>>;
+    void requestAdapter(const GPURequestAdapterOptions&, RequestAdapterPromise&&);
+
+private:
+    GPU() = default;
+};
+
+}
Property changes on: trunk/Source/WebCore/Modules/WebGPU/GPU.h
___________________________________________________________________

Added: svn:eol-style

+native \ No newline at end of property

Added: svn:keywords

+Author Date Id Rev URL \ No newline at end of property

Added: trunk/Source/WebCore/Modules/WebGPU/GPU.idl (0 => 285376)


--- trunk/Source/WebCore/Modules/WebGPU/GPU.idl	                        (rev 0)
+++ trunk/Source/WebCore/Modules/WebGPU/GPU.idl	2021-11-06 20:50:48 UTC (rev 285376)
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2021 Apple Inc. 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.
+ */
+
+// https://gpuweb.github.io/gpuweb/#gpu
+
+[
+    EnabledBySetting=WebGPU,
+    ImplementationLacksVTable,
+    Exposed=(Window), /* https://bugs.webkit.org/show_bug.cgi?id=232542: DedicatedWorker */
+    SecureContext
+]
+interface GPU {
+    Promise<GPUAdapter?> requestAdapter(optional GPURequestAdapterOptions options);
+};

Added: trunk/Source/WebCore/Modules/WebGPU/GPUAdapter.cpp (0 => 285376)


--- trunk/Source/WebCore/Modules/WebGPU/GPUAdapter.cpp	                        (rev 0)
+++ trunk/Source/WebCore/Modules/WebGPU/GPUAdapter.cpp	2021-11-06 20:50:48 UTC (rev 285376)
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2021 Apple Inc. 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.
+ */
+
+#include "config.h"
+#include "GPUAdapter.h"
+
+namespace WebCore {
+
+String GPUAdapter::name() const
+{
+    return StringImpl::empty();
+}
+
+Ref<GPUSupportedFeatures> GPUAdapter::features() const
+{
+    return GPUSupportedFeatures::create();
+}
+
+Ref<GPUSupportedLimits> GPUAdapter::limits() const
+{
+    return GPUSupportedLimits::create();
+}
+
+bool GPUAdapter::isFallbackAdapter() const
+{
+    return false;
+}
+
+void GPUAdapter::requestDevice(ScriptExecutionContext&, const GPUDeviceDescriptor&, RequestDevicePromise&&)
+{
+
+}
+
+}
Property changes on: trunk/Source/WebCore/Modules/WebGPU/GPUAdapter.cpp
___________________________________________________________________

Added: svn:eol-style

+native \ No newline at end of property

Added: trunk/Source/WebCore/Modules/WebGPU/GPUAdapter.h (0 => 285376)


--- trunk/Source/WebCore/Modules/WebGPU/GPUAdapter.h	                        (rev 0)
+++ trunk/Source/WebCore/Modules/WebGPU/GPUAdapter.h	2021-11-06 20:50:48 UTC (rev 285376)
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2021 Apple Inc. 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.
+ */
+
+#pragma once
+
+#include "GPUDevice.h"
+#include "GPUDeviceDescriptor.h"
+#include "GPUSupportedFeatures.h"
+#include "GPUSupportedLimits.h"
+#include "JSDOMPromiseDeferred.h"
+#include "ScriptExecutionContext.h"
+#include <wtf/Ref.h>
+#include <wtf/RefCounted.h>
+#include <wtf/text/WTFString.h>
+
+namespace WebCore {
+
+class GPUAdapter : public RefCounted<GPUAdapter> {
+public:
+    static Ref<GPUAdapter> create()
+    {
+        return adoptRef(*new GPUAdapter());
+    }
+
+    String name() const;
+    Ref<GPUSupportedFeatures> features() const;
+    Ref<GPUSupportedLimits> limits() const;
+    bool isFallbackAdapter() const;
+
+    using RequestDevicePromise = DOMPromiseDeferred<IDLInterface<GPUDevice>>;
+    void requestDevice(ScriptExecutionContext&, const GPUDeviceDescriptor&, RequestDevicePromise&&);
+
+private:
+    GPUAdapter() = default;
+};
+
+}
Property changes on: trunk/Source/WebCore/Modules/WebGPU/GPUAdapter.h
___________________________________________________________________

Added: svn:eol-style

+native \ No newline at end of property

Added: svn:keywords

+Author Date Id Rev URL \ No newline at end of property

Added: trunk/Source/WebCore/Modules/WebGPU/GPUAdapter.idl (0 => 285376)


--- trunk/Source/WebCore/Modules/WebGPU/GPUAdapter.idl	                        (rev 0)
+++ trunk/Source/WebCore/Modules/WebGPU/GPUAdapter.idl	2021-11-06 20:50:48 UTC (rev 285376)
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2021 Apple Inc. 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.
+ */
+
+// https://gpuweb.github.io/gpuweb/#gpuadapter
+
+[
+    EnabledBySetting=WebGPU,
+    ImplementationLacksVTable,
+    Exposed=(Window), /* https://bugs.webkit.org/show_bug.cgi?id=232542: DedicatedWorker */
+    SecureContext
+]
+interface GPUAdapter {
+    readonly attribute DOMString name;
+    [SameObject] readonly attribute GPUSupportedFeatures features;
+    [SameObject] readonly attribute GPUSupportedLimits limits;
+    readonly attribute boolean isFallbackAdapter;
+
+    [CallWith=ScriptExecutionContext] Promise<GPUDevice> requestDevice(optional GPUDeviceDescriptor descriptor);
+};

Added: trunk/Source/WebCore/Modules/WebGPU/GPUDevice.cpp (0 => 285376)


--- trunk/Source/WebCore/Modules/WebGPU/GPUDevice.cpp	                        (rev 0)
+++ trunk/Source/WebCore/Modules/WebGPU/GPUDevice.cpp	2021-11-06 20:50:48 UTC (rev 285376)
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2021 Apple Inc. 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.
+ */
+
+#include "config.h"
+#include "GPUDevice.h"
+
+namespace WebCore {
+
+GPUDevice::~GPUDevice() = default;
+
+String GPUDevice::label() const
+{
+    return StringImpl::empty();
+}
+
+void GPUDevice::setLabel(String&&)
+{
+}
+
+Ref<GPUSupportedFeatures> GPUDevice::features() const
+{
+    return GPUSupportedFeatures::create();
+}
+
+Ref<GPUSupportedLimits> GPUDevice::limits() const
+{
+    return GPUSupportedLimits::create();
+}
+
+}
Property changes on: trunk/Source/WebCore/Modules/WebGPU/GPUDevice.cpp
___________________________________________________________________

Added: svn:eol-style

+native \ No newline at end of property

Added: trunk/Source/WebCore/Modules/WebGPU/GPUDevice.h (0 => 285376)


--- trunk/Source/WebCore/Modules/WebGPU/GPUDevice.h	                        (rev 0)
+++ trunk/Source/WebCore/Modules/WebGPU/GPUDevice.h	2021-11-06 20:50:48 UTC (rev 285376)
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 2021 Apple Inc. 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.
+ */
+
+#pragma once
+
+#include "ActiveDOMObject.h"
+#include "EventTarget.h"
+#include "GPUSupportedFeatures.h"
+#include "GPUSupportedLimits.h"
+#include "ScriptExecutionContext.h"
+#include <wtf/Ref.h>
+#include <wtf/text/WTFString.h>
+
+namespace WebCore {
+
+class GPUDevice : public ActiveDOMObject, public EventTargetWithInlineData {
+public:
+    static Ref<GPUDevice> create(ScriptExecutionContext* scriptExecutionContext)
+    {
+        return adoptRef(*new GPUDevice(scriptExecutionContext));
+    }
+
+    virtual ~GPUDevice();
+
+    String label() const;
+    void setLabel(String&&);
+    Ref<GPUSupportedFeatures> features() const;
+    Ref<GPUSupportedLimits> limits() const;
+
+private:
+    GPUDevice(ScriptExecutionContext* scriptExecutionContext)
+        : ActiveDOMObject { scriptExecutionContext }
+    {
+    }
+
+    // ActiveDOMObject.
+    // FIXME: We probably need to override more methods to make this work properly.
+    const char* activeDOMObjectName() const final { return "GPUDevice"; }
+
+    // EventTargetWithInlineData.
+    EventTargetInterface eventTargetInterface() const final { return GPUDeviceEventTargetInterfaceType; }
+    ScriptExecutionContext* scriptExecutionContext() const final { return ActiveDOMObject::scriptExecutionContext(); }
+    void refEventTarget() final { ref(); }
+    void derefEventTarget() final { deref(); }
+
+    String m_label;
+};
+
+}
Property changes on: trunk/Source/WebCore/Modules/WebGPU/GPUDevice.h
___________________________________________________________________

Added: svn:eol-style

+native \ No newline at end of property

Added: svn:keywords

+Author Date Id Rev URL \ No newline at end of property

Added: trunk/Source/WebCore/Modules/WebGPU/GPUDevice.idl (0 => 285376)


--- trunk/Source/WebCore/Modules/WebGPU/GPUDevice.idl	                        (rev 0)
+++ trunk/Source/WebCore/Modules/WebGPU/GPUDevice.idl	2021-11-06 20:50:48 UTC (rev 285376)
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2021 Apple Inc. 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.
+ */
+
+// https://gpuweb.github.io/gpuweb/#gpudevice
+
+[
+    EnabledBySetting=WebGPU,
+    ActiveDOMObject,
+    Exposed=(Window), /* https://bugs.webkit.org/show_bug.cgi?id=232542: DedicatedWorker */
+    SecureContext
+]
+interface GPUDevice : EventTarget {
+    [SameObject] readonly attribute GPUSupportedFeatures features;
+    [SameObject] readonly attribute GPUSupportedLimits limits;
+
+    // FIXME: Add more here.
+};
+GPUDevice includes GPUObjectBase;

Added: trunk/Source/WebCore/Modules/WebGPU/GPUDeviceDescriptor.h (0 => 285376)


--- trunk/Source/WebCore/Modules/WebGPU/GPUDeviceDescriptor.h	                        (rev 0)
+++ trunk/Source/WebCore/Modules/WebGPU/GPUDeviceDescriptor.h	2021-11-06 20:50:48 UTC (rev 285376)
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2021 Apple Inc. 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.
+ */
+
+#pragma once
+
+#include "GPUFeatureName.h"
+#include "GPUObjectDescriptorBase.h"
+#include <cstdint>
+#include <wtf/HashMap.h>
+#include <wtf/KeyValuePair.h>
+#include <wtf/RefPtr.h>
+#include <wtf/Vector.h>
+
+namespace WebCore {
+
+struct GPUDeviceDescriptor : public GPUObjectDescriptorBase {
+    Vector<GPUFeatureName> requiredFeatures;
+    // Vector<KeyValuePair<String, uint64_t>> requiredLimits;
+};
+
+}
Property changes on: trunk/Source/WebCore/Modules/WebGPU/GPUDeviceDescriptor.h
___________________________________________________________________

Added: svn:eol-style

+native \ No newline at end of property

Added: svn:keywords

+Author Date Id Rev URL \ No newline at end of property

Added: trunk/Source/WebCore/Modules/WebGPU/GPUDeviceDescriptor.idl (0 => 285376)


--- trunk/Source/WebCore/Modules/WebGPU/GPUDeviceDescriptor.idl	                        (rev 0)
+++ trunk/Source/WebCore/Modules/WebGPU/GPUDeviceDescriptor.idl	2021-11-06 20:50:48 UTC (rev 285376)
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2021 Apple Inc. 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.
+ */
+
+// https://gpuweb.github.io/gpuweb/#dictdef-gpudevicedescriptor
+
+[
+    EnabledBySetting=WebGPU
+]
+dictionary GPUDeviceDescriptor : GPUObjectDescriptorBase {
+    sequence<GPUFeatureName> requiredFeatures = [];
+    // record<DOMString, GPUSize64> requiredLimits; // FIXME: https://bugs.webkit.org/show_bug.cgi?id=232741 Our bindings generator can't seem to understand this
+};

Added: trunk/Source/WebCore/Modules/WebGPU/GPUFeatureName.h (0 => 285376)


--- trunk/Source/WebCore/Modules/WebGPU/GPUFeatureName.h	                        (rev 0)
+++ trunk/Source/WebCore/Modules/WebGPU/GPUFeatureName.h	2021-11-06 20:50:48 UTC (rev 285376)
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2021 Apple Inc. 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.
+ */
+
+#pragma once
+
+#include <cstdint>
+
+namespace WebCore {
+
+enum class GPUFeatureName : uint8_t {
+    DepthClamping,
+    Depth24unormStencil8,
+    Depth32floatStencil8,
+    PipelineStatisticsQuery,
+    TextureCompressionBc,
+    TextureCompressionEtc2,
+    TextureCompressionAstc,
+    TimestampQuery
+};
+
+}
Property changes on: trunk/Source/WebCore/Modules/WebGPU/GPUFeatureName.h
___________________________________________________________________

Added: svn:eol-style

+native \ No newline at end of property

Added: svn:keywords

+Author Date Id Rev URL \ No newline at end of property

Added: trunk/Source/WebCore/Modules/WebGPU/GPUFeatureName.idl (0 => 285376)


--- trunk/Source/WebCore/Modules/WebGPU/GPUFeatureName.idl	                        (rev 0)
+++ trunk/Source/WebCore/Modules/WebGPU/GPUFeatureName.idl	2021-11-06 20:50:48 UTC (rev 285376)
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2021 Apple Inc. 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.
+ */
+
+// https://gpuweb.github.io/gpuweb/#enumdef-gpufeaturename
+
+[
+    EnabledBySetting=WebGPU
+]
+enum GPUFeatureName {
+    "depth-clamping",
+    "depth24unorm-stencil8",
+    "depth32float-stencil8",
+    "pipeline-statistics-query",
+    "texture-compression-bc",
+    "texture-compression-etc2",
+    "texture-compression-astc",
+    "timestamp-query"
+};

Added: trunk/Source/WebCore/Modules/WebGPU/GPUObjectBase.idl (0 => 285376)


--- trunk/Source/WebCore/Modules/WebGPU/GPUObjectBase.idl	                        (rev 0)
+++ trunk/Source/WebCore/Modules/WebGPU/GPUObjectBase.idl	2021-11-06 20:50:48 UTC (rev 285376)
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2021 Apple Inc. 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.
+ */
+
+// https://gpuweb.github.io/gpuweb/#gpuobjectbase
+
+[
+    EnabledBySetting=WebGPU
+]
+interface mixin GPUObjectBase {
+    attribute USVString? label;
+};

Added: trunk/Source/WebCore/Modules/WebGPU/GPUObjectDescriptorBase.h (0 => 285376)


--- trunk/Source/WebCore/Modules/WebGPU/GPUObjectDescriptorBase.h	                        (rev 0)
+++ trunk/Source/WebCore/Modules/WebGPU/GPUObjectDescriptorBase.h	2021-11-06 20:50:48 UTC (rev 285376)
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2021 Apple Inc. 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.
+ */
+
+#pragma once
+
+#include <wtf/text/WTFString.h>
+
+namespace WebCore {
+
+struct GPUObjectDescriptorBase {
+    String label;
+};
+
+}
Property changes on: trunk/Source/WebCore/Modules/WebGPU/GPUObjectDescriptorBase.h
___________________________________________________________________

Added: svn:eol-style

+native \ No newline at end of property

Added: svn:keywords

+Author Date Id Rev URL \ No newline at end of property

Added: trunk/Source/WebCore/Modules/WebGPU/GPUObjectDescriptorBase.idl (0 => 285376)


--- trunk/Source/WebCore/Modules/WebGPU/GPUObjectDescriptorBase.idl	                        (rev 0)
+++ trunk/Source/WebCore/Modules/WebGPU/GPUObjectDescriptorBase.idl	2021-11-06 20:50:48 UTC (rev 285376)
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2021 Apple Inc. 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.
+ */
+
+// https://gpuweb.github.io/gpuweb/#dictdef-gpuobjectdescriptorbase
+
+[
+    EnabledBySetting=WebGPU
+]
+dictionary GPUObjectDescriptorBase {
+    USVString label;
+};

Added: trunk/Source/WebCore/Modules/WebGPU/GPUPowerPreference.h (0 => 285376)


--- trunk/Source/WebCore/Modules/WebGPU/GPUPowerPreference.h	                        (rev 0)
+++ trunk/Source/WebCore/Modules/WebGPU/GPUPowerPreference.h	2021-11-06 20:50:48 UTC (rev 285376)
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2021 Apple Inc. 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.
+ */
+
+#pragma once
+
+#include <cstdint>
+
+namespace WebCore {
+
+enum class GPUPowerPreference : uint8_t {
+    LowPower,
+    HighPerformance
+};
+
+}
Property changes on: trunk/Source/WebCore/Modules/WebGPU/GPUPowerPreference.h
___________________________________________________________________

Added: svn:eol-style

+native \ No newline at end of property

Added: svn:keywords

+Author Date Id Rev URL \ No newline at end of property

Added: trunk/Source/WebCore/Modules/WebGPU/GPUPowerPreference.idl (0 => 285376)


--- trunk/Source/WebCore/Modules/WebGPU/GPUPowerPreference.idl	                        (rev 0)
+++ trunk/Source/WebCore/Modules/WebGPU/GPUPowerPreference.idl	2021-11-06 20:50:48 UTC (rev 285376)
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2021 Apple Inc. 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.
+ */
+
+// https://gpuweb.github.io/gpuweb/#enumdef-gpupowerpreference
+
+[
+    EnabledBySetting=WebGPU,
+]
+enum GPUPowerPreference {
+    "low-power",
+    "high-performance"
+};

Added: trunk/Source/WebCore/Modules/WebGPU/GPUPredefinedColorSpace.h (0 => 285376)


--- trunk/Source/WebCore/Modules/WebGPU/GPUPredefinedColorSpace.h	                        (rev 0)
+++ trunk/Source/WebCore/Modules/WebGPU/GPUPredefinedColorSpace.h	2021-11-06 20:50:48 UTC (rev 285376)
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2021 Apple Inc. 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.
+ */
+
+#pragma once
+
+#include <cstdint>
+
+namespace WebCore {
+
+enum class GPUPredefinedColorSpace : uint8_t {
+    SRGB
+};
+
+}
Property changes on: trunk/Source/WebCore/Modules/WebGPU/GPUPredefinedColorSpace.h
___________________________________________________________________

Added: svn:eol-style

+native \ No newline at end of property

Added: svn:keywords

+Author Date Id Rev URL \ No newline at end of property

Added: trunk/Source/WebCore/Modules/WebGPU/GPUPredefinedColorSpace.idl (0 => 285376)


--- trunk/Source/WebCore/Modules/WebGPU/GPUPredefinedColorSpace.idl	                        (rev 0)
+++ trunk/Source/WebCore/Modules/WebGPU/GPUPredefinedColorSpace.idl	2021-11-06 20:50:48 UTC (rev 285376)
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2021 Apple Inc. 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.
+ */
+
+// https://gpuweb.github.io/gpuweb/#enumdef-gpupredefinedcolorspace
+
+[
+    EnabledBySetting=WebGPU
+]
+enum GPUPredefinedColorSpace {
+    "srgb"
+};

Added: trunk/Source/WebCore/Modules/WebGPU/GPURequestAdapterOptions.h (0 => 285376)


--- trunk/Source/WebCore/Modules/WebGPU/GPURequestAdapterOptions.h	                        (rev 0)
+++ trunk/Source/WebCore/Modules/WebGPU/GPURequestAdapterOptions.h	2021-11-06 20:50:48 UTC (rev 285376)
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2021 Apple Inc. 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.
+ */
+
+#pragma once
+
+#include "GPUPowerPreference.h"
+#include <optional>
+
+namespace WebCore {
+
+struct GPURequestAdapterOptions {
+    std::optional<GPUPowerPreference> powerPreference;
+    bool forceFallbackAdapter;
+};
+
+}
Property changes on: trunk/Source/WebCore/Modules/WebGPU/GPURequestAdapterOptions.h
___________________________________________________________________

Added: svn:eol-style

+native \ No newline at end of property

Added: svn:keywords

+Author Date Id Rev URL \ No newline at end of property

Added: trunk/Source/WebCore/Modules/WebGPU/GPURequestAdapterOptions.idl (0 => 285376)


--- trunk/Source/WebCore/Modules/WebGPU/GPURequestAdapterOptions.idl	                        (rev 0)
+++ trunk/Source/WebCore/Modules/WebGPU/GPURequestAdapterOptions.idl	2021-11-06 20:50:48 UTC (rev 285376)
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2021 Apple Inc. 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.
+ */
+
+// https://gpuweb.github.io/gpuweb/#dictdef-gpurequestadapteroptions
+
+[
+    EnabledBySetting=WebGPU,
+]
+dictionary GPURequestAdapterOptions {
+    GPUPowerPreference powerPreference;
+    boolean forceFallbackAdapter = false;
+};

Added: trunk/Source/WebCore/Modules/WebGPU/GPUSupportedFeatures.cpp (0 => 285376)


--- trunk/Source/WebCore/Modules/WebGPU/GPUSupportedFeatures.cpp	                        (rev 0)
+++ trunk/Source/WebCore/Modules/WebGPU/GPUSupportedFeatures.cpp	2021-11-06 20:50:48 UTC (rev 285376)
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2021 Apple Inc. 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.
+ */
+
+#include "config.h"
+#include "GPUSupportedFeatures.h"
+
+namespace WebCore {
+
+void GPUSupportedFeatures::initializeSetLike(DOMSetAdapter&) const
+{
+}
+
+}
Property changes on: trunk/Source/WebCore/Modules/WebGPU/GPUSupportedFeatures.cpp
___________________________________________________________________

Added: svn:eol-style

+native \ No newline at end of property

Added: trunk/Source/WebCore/Modules/WebGPU/GPUSupportedFeatures.h (0 => 285376)


--- trunk/Source/WebCore/Modules/WebGPU/GPUSupportedFeatures.h	                        (rev 0)
+++ trunk/Source/WebCore/Modules/WebGPU/GPUSupportedFeatures.h	2021-11-06 20:50:48 UTC (rev 285376)
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2021 Apple Inc. 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.
+ */
+
+#pragma once
+
+#include "IDLTypes.h"
+#include "JSDOMSetLike.h"
+#include <wtf/RefCounted.h>
+#include <wtf/Vector.h>
+#include <wtf/text/WTFString.h>
+
+namespace WebCore {
+
+class GPUSupportedFeatures : public RefCounted<GPUSupportedFeatures> {
+public:
+    static Ref<GPUSupportedFeatures> create()
+    {
+        return adoptRef(*new GPUSupportedFeatures());
+    }
+
+    void initializeSetLike(DOMSetAdapter&) const;
+
+private:
+    GPUSupportedFeatures() = default;
+};
+
+}
Property changes on: trunk/Source/WebCore/Modules/WebGPU/GPUSupportedFeatures.h
___________________________________________________________________

Added: svn:eol-style

+native \ No newline at end of property

Added: svn:keywords

+Author Date Id Rev URL \ No newline at end of property

Added: trunk/Source/WebCore/Modules/WebGPU/GPUSupportedFeatures.idl (0 => 285376)


--- trunk/Source/WebCore/Modules/WebGPU/GPUSupportedFeatures.idl	                        (rev 0)
+++ trunk/Source/WebCore/Modules/WebGPU/GPUSupportedFeatures.idl	2021-11-06 20:50:48 UTC (rev 285376)
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2021 Apple Inc. 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.
+ */
+
+// https://gpuweb.github.io/gpuweb/#gpusupportedfeatures
+
+[
+    EnabledBySetting=WebGPU,
+    ImplementationLacksVTable,
+    Exposed=(Window), /* https://bugs.webkit.org/show_bug.cgi?id=232542: DedicatedWorker */
+    SecureContext
+]
+interface GPUSupportedFeatures {
+    readonly setlike<DOMString>;
+};

Added: trunk/Source/WebCore/Modules/WebGPU/GPUSupportedLimits.cpp (0 => 285376)


--- trunk/Source/WebCore/Modules/WebGPU/GPUSupportedLimits.cpp	                        (rev 0)
+++ trunk/Source/WebCore/Modules/WebGPU/GPUSupportedLimits.cpp	2021-11-06 20:50:48 UTC (rev 285376)
@@ -0,0 +1,161 @@
+/*
+ * Copyright (C) 2021 Apple Inc. 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.
+ */
+
+#include "config.h"
+#include "GPUSupportedLimits.h"
+
+namespace WebCore {
+
+uint32_t GPUSupportedLimits::maxTextureDimension1D() const
+{
+    return 0;
+}
+
+uint32_t GPUSupportedLimits::maxTextureDimension2D() const
+{
+    return 0;
+}
+
+uint32_t GPUSupportedLimits::maxTextureDimension3D() const
+{
+    return 0;
+}
+
+uint32_t GPUSupportedLimits::maxTextureArrayLayers() const
+{
+    return 0;
+}
+
+uint32_t GPUSupportedLimits::maxBindGroups() const
+{
+    return 0;
+}
+
+uint32_t GPUSupportedLimits::maxDynamicUniformBuffersPerPipelineLayout() const
+{
+    return 0;
+}
+
+uint32_t GPUSupportedLimits::maxDynamicStorageBuffersPerPipelineLayout() const
+{
+    return 0;
+}
+
+uint32_t GPUSupportedLimits::maxSampledTexturesPerShaderStage() const
+{
+    return 0;
+}
+
+uint32_t GPUSupportedLimits::maxSamplersPerShaderStage() const
+{
+    return 0;
+}
+
+uint32_t GPUSupportedLimits::maxStorageBuffersPerShaderStage() const
+{
+    return 0;
+}
+
+uint32_t GPUSupportedLimits::maxStorageTexturesPerShaderStage() const
+{
+    return 0;
+}
+
+uint32_t GPUSupportedLimits::maxUniformBuffersPerShaderStage() const
+{
+    return 0;
+}
+
+uint64_t GPUSupportedLimits::maxUniformBufferBindingSize() const
+{
+    return 0;
+}
+
+uint64_t GPUSupportedLimits::maxStorageBufferBindingSize() const
+{
+    return 0;
+}
+
+uint32_t GPUSupportedLimits::minUniformBufferOffsetAlignment() const
+{
+    return 0;
+}
+
+uint32_t GPUSupportedLimits::minStorageBufferOffsetAlignment() const
+{
+    return 0;
+}
+
+uint32_t GPUSupportedLimits::maxVertexBuffers() const
+{
+    return 0;
+}
+
+uint32_t GPUSupportedLimits::maxVertexAttributes() const
+{
+    return 0;
+}
+
+uint32_t GPUSupportedLimits::maxVertexBufferArrayStride() const
+{
+    return 0;
+}
+
+uint32_t GPUSupportedLimits::maxInterStageShaderComponents() const
+{
+    return 0;
+}
+
+uint32_t GPUSupportedLimits::maxComputeWorkgroupStorageSize() const
+{
+    return 0;
+}
+
+uint32_t GPUSupportedLimits::maxComputeInvocationsPerWorkgroup() const
+{
+    return 0;
+}
+
+uint32_t GPUSupportedLimits::maxComputeWorkgroupSizeX() const
+{
+    return 0;
+}
+
+uint32_t GPUSupportedLimits::maxComputeWorkgroupSizeY() const
+{
+    return 0;
+}
+
+uint32_t GPUSupportedLimits::maxComputeWorkgroupSizeZ() const
+{
+    return 0;
+}
+
+uint32_t GPUSupportedLimits::maxComputeWorkgroupsPerDimension() const
+{
+    return 0;
+}
+
+}
Property changes on: trunk/Source/WebCore/Modules/WebGPU/GPUSupportedLimits.cpp
___________________________________________________________________

Added: svn:eol-style

+native \ No newline at end of property

Added: trunk/Source/WebCore/Modules/WebGPU/GPUSupportedLimits.h (0 => 285376)


--- trunk/Source/WebCore/Modules/WebGPU/GPUSupportedLimits.h	                        (rev 0)
+++ trunk/Source/WebCore/Modules/WebGPU/GPUSupportedLimits.h	2021-11-06 20:50:48 UTC (rev 285376)
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 2021 Apple Inc. 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.
+ */
+
+#pragma once
+
+#include <cstdint>
+#include <wtf/RefCounted.h>
+
+namespace WebCore {
+
+class GPUSupportedLimits : public RefCounted<GPUSupportedLimits> {
+public:
+    static Ref<GPUSupportedLimits> create()
+    {
+        return adoptRef(*new GPUSupportedLimits());
+    }
+
+    uint32_t maxTextureDimension1D() const;
+    uint32_t maxTextureDimension2D() const;
+    uint32_t maxTextureDimension3D() const;
+    uint32_t maxTextureArrayLayers() const;
+    uint32_t maxBindGroups() const;
+    uint32_t maxDynamicUniformBuffersPerPipelineLayout() const;
+    uint32_t maxDynamicStorageBuffersPerPipelineLayout() const;
+    uint32_t maxSampledTexturesPerShaderStage() const;
+    uint32_t maxSamplersPerShaderStage() const;
+    uint32_t maxStorageBuffersPerShaderStage() const;
+    uint32_t maxStorageTexturesPerShaderStage() const;
+    uint32_t maxUniformBuffersPerShaderStage() const;
+    uint64_t maxUniformBufferBindingSize() const;
+    uint64_t maxStorageBufferBindingSize() const;
+    uint32_t minUniformBufferOffsetAlignment() const;
+    uint32_t minStorageBufferOffsetAlignment() const;
+    uint32_t maxVertexBuffers() const;
+    uint32_t maxVertexAttributes() const;
+    uint32_t maxVertexBufferArrayStride() const;
+    uint32_t maxInterStageShaderComponents() const;
+    uint32_t maxComputeWorkgroupStorageSize() const;
+    uint32_t maxComputeInvocationsPerWorkgroup() const;
+    uint32_t maxComputeWorkgroupSizeX() const;
+    uint32_t maxComputeWorkgroupSizeY() const;
+    uint32_t maxComputeWorkgroupSizeZ() const;
+    uint32_t maxComputeWorkgroupsPerDimension() const;
+
+private:
+    GPUSupportedLimits() = default;
+};
+
+}
Property changes on: trunk/Source/WebCore/Modules/WebGPU/GPUSupportedLimits.h
___________________________________________________________________

Added: svn:eol-style

+native \ No newline at end of property

Added: svn:keywords

+Author Date Id Rev URL \ No newline at end of property

Added: trunk/Source/WebCore/Modules/WebGPU/GPUSupportedLimits.idl (0 => 285376)


--- trunk/Source/WebCore/Modules/WebGPU/GPUSupportedLimits.idl	                        (rev 0)
+++ trunk/Source/WebCore/Modules/WebGPU/GPUSupportedLimits.idl	2021-11-06 20:50:48 UTC (rev 285376)
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2021 Apple Inc. 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.
+ */
+
+// https://gpuweb.github.io/gpuweb/#gpusupportedlimits
+
+[
+    EnabledBySetting=WebGPU,
+    ImplementationLacksVTable,
+    Exposed=(Window), /* https://bugs.webkit.org/show_bug.cgi?id=232542: DedicatedWorker */
+    SecureContext
+]
+interface GPUSupportedLimits {
+    readonly attribute unsigned long maxTextureDimension1D;
+    readonly attribute unsigned long maxTextureDimension2D;
+    readonly attribute unsigned long maxTextureDimension3D;
+    readonly attribute unsigned long maxTextureArrayLayers;
+    readonly attribute unsigned long maxBindGroups;
+    readonly attribute unsigned long maxDynamicUniformBuffersPerPipelineLayout;
+    readonly attribute unsigned long maxDynamicStorageBuffersPerPipelineLayout;
+    readonly attribute unsigned long maxSampledTexturesPerShaderStage;
+    readonly attribute unsigned long maxSamplersPerShaderStage;
+    readonly attribute unsigned long maxStorageBuffersPerShaderStage;
+    readonly attribute unsigned long maxStorageTexturesPerShaderStage;
+    readonly attribute unsigned long maxUniformBuffersPerShaderStage;
+    readonly attribute unsigned long long maxUniformBufferBindingSize;
+    readonly attribute unsigned long long maxStorageBufferBindingSize;
+    readonly attribute unsigned long minUniformBufferOffsetAlignment;
+    readonly attribute unsigned long minStorageBufferOffsetAlignment;
+    readonly attribute unsigned long maxVertexBuffers;
+    readonly attribute unsigned long maxVertexAttributes;
+    readonly attribute unsigned long maxVertexBufferArrayStride;
+    readonly attribute unsigned long maxInterStageShaderComponents;
+    readonly attribute unsigned long maxComputeWorkgroupStorageSize;
+    readonly attribute unsigned long maxComputeInvocationsPerWorkgroup;
+    readonly attribute unsigned long maxComputeWorkgroupSizeX;
+    readonly attribute unsigned long maxComputeWorkgroupSizeY;
+    readonly attribute unsigned long maxComputeWorkgroupSizeZ;
+    readonly attribute unsigned long maxComputeWorkgroupsPerDimension;
+};

Added: trunk/Source/WebCore/Modules/WebGPU/NavigatorGPU.idl (0 => 285376)


--- trunk/Source/WebCore/Modules/WebGPU/NavigatorGPU.idl	                        (rev 0)
+++ trunk/Source/WebCore/Modules/WebGPU/NavigatorGPU.idl	2021-11-06 20:50:48 UTC (rev 285376)
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2021 Apple Inc. 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.
+ */
+
+// https://gpuweb.github.io/gpuweb/#navigatorgpu
+
+[
+    EnabledBySetting=WebGPU,
+]
+interface mixin NavigatorGPU {
+    [SameObject, SecureContext] readonly attribute GPU gpu;
+};

Modified: trunk/Source/WebCore/Modules/applepay/PaymentCoordinator.cpp (285375 => 285376)


--- trunk/Source/WebCore/Modules/applepay/PaymentCoordinator.cpp	2021-11-06 19:43:54 UTC (rev 285375)
+++ trunk/Source/WebCore/Modules/applepay/PaymentCoordinator.cpp	2021-11-06 20:50:48 UTC (rev 285376)
@@ -34,6 +34,7 @@
 #include "ApplePayShippingMethod.h"
 #include "ApplePayShippingMethodUpdate.h"
 #include "Document.h"
+#include "ExceptionDetails.h"
 #include "LinkIconCollector.h"
 #include "Logging.h"
 #include "Page.h"

Modified: trunk/Source/WebCore/Modules/mediasource/SourceBuffer.h (285375 => 285376)


--- trunk/Source/WebCore/Modules/mediasource/SourceBuffer.h	2021-11-06 19:43:54 UTC (rev 285375)
+++ trunk/Source/WebCore/Modules/mediasource/SourceBuffer.h	2021-11-06 20:50:48 UTC (rev 285376)
@@ -43,6 +43,7 @@
 #include "Timer.h"
 #include "VideoTrackClient.h"
 #include <wtf/LoggerHelper.h>
+#include <wtf/Observer.h>
 
 namespace WebCore {
 

Modified: trunk/Source/WebCore/Modules/webauthn/PublicKeyCredentialRequestOptions.h (285375 => 285376)


--- trunk/Source/WebCore/Modules/webauthn/PublicKeyCredentialRequestOptions.h	2021-11-06 19:43:54 UTC (rev 285375)
+++ trunk/Source/WebCore/Modules/webauthn/PublicKeyCredentialRequestOptions.h	2021-11-06 20:50:48 UTC (rev 285376)
@@ -27,6 +27,7 @@
 
 #if ENABLE(WEB_AUTHN)
 #include "AuthenticationExtensionsClientInputs.h"
+#include "AuthenticatorAttachment.h"
 #include "BufferSource.h"
 #include "PublicKeyCredentialDescriptor.h"
 #include "UserVerificationRequirement.h"

Modified: trunk/Source/WebCore/Sources.txt (285375 => 285376)


--- trunk/Source/WebCore/Sources.txt	2021-11-06 19:43:54 UTC (rev 285375)
+++ trunk/Source/WebCore/Sources.txt	2021-11-06 20:50:48 UTC (rev 285376)
@@ -21,6 +21,11 @@
 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 // THE POSSIBILITY OF SUCH DAMAGE.
 
+Modules/WebGPU/GPU.cpp
+Modules/WebGPU/GPUAdapter.cpp
+Modules/WebGPU/GPUDevice.cpp
+Modules/WebGPU/GPUSupportedFeatures.cpp
+Modules/WebGPU/GPUSupportedLimits.cpp
 Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.cpp
 Modules/applicationmanifest/ApplicationManifestParser.cpp
 Modules/async-clipboard/Clipboard.cpp
@@ -3065,6 +3070,18 @@
 JSFontFace.cpp
 JSFontFaceSet.cpp
 JSFormDataEvent.cpp
+JSGPU.cpp
+JSGPUAdapter.cpp
+JSGPUDevice.cpp
+JSGPUDeviceDescriptor.cpp
+JSGPUFeatureName.cpp
+JSGPUObjectBase.cpp
+JSGPUObjectDescriptorBase.cpp
+JSGPUPowerPreference.cpp
+JSGPUPredefinedColorSpace.cpp
+JSGPURequestAdapterOptions.cpp
+JSGPUSupportedFeatures.cpp
+JSGPUSupportedLimits.cpp
 JSGainNode.cpp
 JSGainOptions.cpp
 JSGamepad.cpp
@@ -3274,6 +3291,7 @@
 JSMutationRecord.cpp
 JSNamedNodeMap.cpp
 JSNavigator.cpp
+JSNavigatorGPU.cpp
 JSNode.cpp
 JSNodeFilter.cpp
 JSCustomXPathNSResolver.cpp

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (285375 => 285376)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2021-11-06 19:43:54 UTC (rev 285375)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2021-11-06 20:50:48 UTC (rev 285376)
@@ -7029,6 +7029,33 @@
 		1C24EEA71C72A7B40080F8FC /* JSFontFaceSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSFontFaceSet.h; path = DerivedSources/WebCore/JSFontFaceSet.h; sourceTree = BUILT_PRODUCTS_DIR; };
 		1C2649790D7E248A00BD10F2 /* DocumentLoaderMac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DocumentLoaderMac.cpp; sourceTree = "<group>"; };
 		1C26671926FA7F2E00117073 /* FontCreationContext.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FontCreationContext.h; sourceTree = "<group>"; };
+		1C28955E272E64A500B3E2B4 /* GPUObjectBase.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = GPUObjectBase.idl; sourceTree = "<group>"; };
+		1C28955F272E6A9200B3E2B4 /* GPUObjectDescriptorBase.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = GPUObjectDescriptorBase.idl; sourceTree = "<group>"; };
+		1C289560272E6CCA00B3E2B4 /* GPUSupportedLimits.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = GPUSupportedLimits.idl; sourceTree = "<group>"; };
+		1C289563272E6F8A00B3E2B4 /* GPUSupportedLimits.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GPUSupportedLimits.h; sourceTree = "<group>"; };
+		1C289564272F1F4500B3E2B4 /* GPUSupportedFeatures.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = GPUSupportedFeatures.idl; sourceTree = "<group>"; };
+		1C289565272F200600B3E2B4 /* GPUSupportedFeatures.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GPUSupportedFeatures.h; sourceTree = "<group>"; };
+		1C289566272F232600B3E2B4 /* GPUPredefinedColorSpace.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = GPUPredefinedColorSpace.idl; sourceTree = "<group>"; };
+		1C289567272F267B00B3E2B4 /* GPU.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = GPU.idl; sourceTree = "<group>"; };
+		1C289568272F272400B3E2B4 /* GPURequestAdapterOptions.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = GPURequestAdapterOptions.idl; sourceTree = "<group>"; };
+		1C289569272F274700B3E2B4 /* GPUPowerPreference.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = GPUPowerPreference.idl; sourceTree = "<group>"; };
+		1C28956A272F277E00B3E2B4 /* NavigatorGPU.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = NavigatorGPU.idl; sourceTree = "<group>"; };
+		1C28956B272F27A700B3E2B4 /* GPUAdapter.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = GPUAdapter.idl; sourceTree = "<group>"; };
+		1C28956C272F27DA00B3E2B4 /* GPUDeviceDescriptor.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = GPUDeviceDescriptor.idl; sourceTree = "<group>"; };
+		1C28956D272F280800B3E2B4 /* GPUFeatureName.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = GPUFeatureName.idl; sourceTree = "<group>"; };
+		1C28956E272F283800B3E2B4 /* GPUDevice.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = GPUDevice.idl; sourceTree = "<group>"; };
+		1C289571272F2F7600B3E2B4 /* GPU.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GPU.h; sourceTree = "<group>"; };
+		1C289572272F30DA00B3E2B4 /* GPUAdapter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GPUAdapter.h; sourceTree = "<group>"; };
+		1C289573272F338D00B3E2B4 /* GPUDevice.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GPUDevice.h; sourceTree = "<group>"; };
+		1C28957B272F3FBC00B3E2B4 /* GPURequestAdapterOptions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GPURequestAdapterOptions.h; sourceTree = "<group>"; };
+		1C28957C272F407800B3E2B4 /* GPUDeviceDescriptor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GPUDeviceDescriptor.h; sourceTree = "<group>"; };
+		1C28957D272F40A200B3E2B4 /* GPU.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = GPU.cpp; sourceTree = "<group>"; };
+		1C28957E272F430A00B3E2B4 /* GPUAdapter.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = GPUAdapter.cpp; sourceTree = "<group>"; };
+		1C28957F272F43D800B3E2B4 /* GPUDevice.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = GPUDevice.cpp; sourceTree = "<group>"; };
+		1C289580272F47B000B3E2B4 /* GPUFeatureName.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GPUFeatureName.h; sourceTree = "<group>"; };
+		1C289582272F48F200B3E2B4 /* GPUPowerPreference.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GPUPowerPreference.h; sourceTree = "<group>"; };
+		1C289589272F5AC700B3E2B4 /* GPUObjectDescriptorBase.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GPUObjectDescriptorBase.h; sourceTree = "<group>"; };
+		1C28958B272F5AF500B3E2B4 /* GPUPredefinedColorSpace.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GPUPredefinedColorSpace.h; sourceTree = "<group>"; };
 		1C3249101C6D6A3B007EDB32 /* FontVariantBuilder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FontVariantBuilder.cpp; sourceTree = "<group>"; };
 		1C3969CF1B74211E002BCFA7 /* FontCacheCoreText.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FontCacheCoreText.cpp; sourceTree = "<group>"; };
 		1C43DE6822AB4B8A001527D9 /* LocalCurrentTraitCollection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LocalCurrentTraitCollection.h; sourceTree = "<group>"; };
@@ -7045,6 +7072,8 @@
 		1C6FD8AE250A311500D6E920 /* FontCascadeCoreText.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = FontCascadeCoreText.cpp; sourceTree = "<group>"; };
 		1C6FD8AF250A33CF00D6E920 /* FontCoreText.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = FontCoreText.cpp; sourceTree = "<group>"; };
 		1C6FD8B0250A35F100D6E920 /* FontCocoa.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = FontCocoa.cpp; sourceTree = "<group>"; };
+		1C81276F2734B3730068864F /* GPUSupportedFeatures.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = GPUSupportedFeatures.cpp; sourceTree = "<group>"; };
+		1C8127712734B4130068864F /* GPUSupportedLimits.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = GPUSupportedLimits.cpp; sourceTree = "<group>"; };
 		1C81B9560E97330800266E07 /* InspectorController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorController.h; sourceTree = "<group>"; };
 		1C81B9570E97330800266E07 /* InspectorController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorController.cpp; sourceTree = "<group>"; };
 		1C81B9580E97330800266E07 /* InspectorClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorClient.h; sourceTree = "<group>"; };
@@ -19067,6 +19096,42 @@
 			path = cocoa;
 			sourceTree = "<group>";
 		};
+		1C28955D272E643900B3E2B4 /* WebGPU */ = {
+			isa = PBXGroup;
+			children = (
+				1C28957D272F40A200B3E2B4 /* GPU.cpp */,
+				1C289571272F2F7600B3E2B4 /* GPU.h */,
+				1C289567272F267B00B3E2B4 /* GPU.idl */,
+				1C28957E272F430A00B3E2B4 /* GPUAdapter.cpp */,
+				1C289572272F30DA00B3E2B4 /* GPUAdapter.h */,
+				1C28956B272F27A700B3E2B4 /* GPUAdapter.idl */,
+				1C28957F272F43D800B3E2B4 /* GPUDevice.cpp */,
+				1C289573272F338D00B3E2B4 /* GPUDevice.h */,
+				1C28956E272F283800B3E2B4 /* GPUDevice.idl */,
+				1C28957C272F407800B3E2B4 /* GPUDeviceDescriptor.h */,
+				1C28956C272F27DA00B3E2B4 /* GPUDeviceDescriptor.idl */,
+				1C289580272F47B000B3E2B4 /* GPUFeatureName.h */,
+				1C28956D272F280800B3E2B4 /* GPUFeatureName.idl */,
+				1C28955E272E64A500B3E2B4 /* GPUObjectBase.idl */,
+				1C289589272F5AC700B3E2B4 /* GPUObjectDescriptorBase.h */,
+				1C28955F272E6A9200B3E2B4 /* GPUObjectDescriptorBase.idl */,
+				1C289582272F48F200B3E2B4 /* GPUPowerPreference.h */,
+				1C289569272F274700B3E2B4 /* GPUPowerPreference.idl */,
+				1C28958B272F5AF500B3E2B4 /* GPUPredefinedColorSpace.h */,
+				1C289566272F232600B3E2B4 /* GPUPredefinedColorSpace.idl */,
+				1C28957B272F3FBC00B3E2B4 /* GPURequestAdapterOptions.h */,
+				1C289568272F272400B3E2B4 /* GPURequestAdapterOptions.idl */,
+				1C81276F2734B3730068864F /* GPUSupportedFeatures.cpp */,
+				1C289565272F200600B3E2B4 /* GPUSupportedFeatures.h */,
+				1C289564272F1F4500B3E2B4 /* GPUSupportedFeatures.idl */,
+				1C8127712734B4130068864F /* GPUSupportedLimits.cpp */,
+				1C289563272E6F8A00B3E2B4 /* GPUSupportedLimits.h */,
+				1C289560272E6CCA00B3E2B4 /* GPUSupportedLimits.idl */,
+				1C28956A272F277E00B3E2B4 /* NavigatorGPU.idl */,
+			);
+			path = WebGPU;
+			sourceTree = "<group>";
+		};
 		1C5FAECA0DCFD8C900D58F78 /* Inspector */ = {
 			isa = PBXGroup;
 			children = (
@@ -24424,6 +24489,7 @@
 				57D8462A1FEAF57F00CA3682 /* webauthn */,
 				97BC69D51505F054001B74AC /* webdatabase */,
 				996E59DA1DF00D45006612B9 /* webdriver */,
+				1C28955D272E643900B3E2B4 /* WebGPU */,
 				97AABCF714FA09B5007457AE /* websockets */,
 				E1EE8AC62412B16F00E794D6 /* webxr */,
 			);

Modified: trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h (285375 => 285376)


--- trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h	2021-11-06 19:43:54 UTC (rev 285375)
+++ trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h	2021-11-06 20:50:48 UTC (rev 285376)
@@ -126,6 +126,11 @@
     macro(FileSystemFileHandle) \
     macro(FileSystemHandle) \
     macro(FileSystemSyncAccessHandle) \
+    macro(GPU) \
+    macro(GPUAdapter) \
+    macro(GPUDevice) \
+    macro(GPUSupportedFeatures) \
+    macro(GPUSupportedLimits) \
     macro(Gamepad) \
     macro(GamepadButton) \
     macro(GamepadEvent) \

Modified: trunk/Source/WebCore/bindings/scripts/CodeGenerator.pm (285375 => 285376)


--- trunk/Source/WebCore/bindings/scripts/CodeGenerator.pm	2021-11-06 19:43:54 UTC (rev 285375)
+++ trunk/Source/WebCore/bindings/scripts/CodeGenerator.pm	2021-11-06 20:50:48 UTC (rev 285376)
@@ -195,7 +195,7 @@
         return;
     }
 
-    die "Processing document " . $useDocument->fileName . " did not generate anything.";
+    # die "Processing document " . $useDocument->fileName . " did not generate anything.";
 }
 
 sub GenerateEmptyHeaderAndCpp

Modified: trunk/Source/WebCore/dom/EventTargetFactory.in (285375 => 285376)


--- trunk/Source/WebCore/dom/EventTargetFactory.in	2021-11-06 19:43:54 UTC (rev 285375)
+++ trunk/Source/WebCore/dom/EventTargetFactory.in	2021-11-06 20:50:48 UTC (rev 285376)
@@ -15,6 +15,7 @@
 EventSource
 FileReader
 FontFaceSet
+GPUDevice
 IDBDatabase
 IDBOpenDBRequest
 IDBRequest

Modified: trunk/Source/WebCore/page/Navigator.idl (285375 => 285376)


--- trunk/Source/WebCore/page/Navigator.idl	2021-11-06 19:43:54 UTC (rev 285375)
+++ trunk/Source/WebCore/page/Navigator.idl	2021-11-06 20:50:48 UTC (rev 285376)
@@ -40,3 +40,4 @@
 Navigator includes NavigatorServiceWorker;
 Navigator includes NavigatorShare;
 Navigator includes NavigatorStorage;
+Navigator includes NavigatorGPU;

Modified: trunk/Source/WebCore/page/NavigatorBase.cpp (285375 => 285376)


--- trunk/Source/WebCore/page/NavigatorBase.cpp	2021-11-06 19:43:54 UTC (rev 285375)
+++ trunk/Source/WebCore/page/NavigatorBase.cpp	2021-11-06 20:50:48 UTC (rev 285376)
@@ -28,6 +28,7 @@
 #include "NavigatorBase.h"
 
 #include "Document.h"
+#include "GPU.h"
 #include "RuntimeEnabledFeatures.h"
 #include "ServiceWorkerContainer.h"
 #include "StorageManager.h"
@@ -67,6 +68,7 @@
 
 NavigatorBase::NavigatorBase(ScriptExecutionContext* context)
     : ContextDestructionObserver(context)
+    , m_gpuForWebGPU(GPU::create())
 {
 }
 

Modified: trunk/Source/WebCore/page/NavigatorBase.h (285375 => 285376)


--- trunk/Source/WebCore/page/NavigatorBase.h	2021-11-06 19:43:54 UTC (rev 285375)
+++ trunk/Source/WebCore/page/NavigatorBase.h	2021-11-06 20:50:48 UTC (rev 285376)
@@ -35,6 +35,7 @@
 
 namespace WebCore {
 
+class GPU;
 class ScriptExecutionContext;
 class ServiceWorkerContainer;
 class StorageManager;
@@ -62,6 +63,7 @@
 
     StorageManager& storage();
     WebLockManager& locks();
+    GPU& gpu() { return m_gpuForWebGPU; };
 
 protected:
     explicit NavigatorBase(ScriptExecutionContext*);
@@ -69,6 +71,7 @@
 private:
     RefPtr<StorageManager> m_storageManager;
     RefPtr<WebLockManager> m_webLockManager;
+    Ref<GPU> m_gpuForWebGPU;
 
 #if ENABLE(SERVICE_WORKER)
 public:

Modified: trunk/Source/WebCore/page/WorkerNavigator.idl (285375 => 285376)


--- trunk/Source/WebCore/page/WorkerNavigator.idl	2021-11-06 19:43:54 UTC (rev 285375)
+++ trunk/Source/WebCore/page/WorkerNavigator.idl	2021-11-06 20:50:48 UTC (rev 285376)
@@ -39,3 +39,4 @@
 WorkerNavigator includes NavigatorOnLine;
 WorkerNavigator includes NavigatorServiceWorker;
 WorkerNavigator includes NavigatorStorage;
+WorkerNavigator includes NavigatorGPU;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to