diff options
Diffstat (limited to 'vendor/web-sys/webidls')
19 files changed, 408 insertions, 257 deletions
diff --git a/vendor/web-sys/webidls/enabled/AudioContext.webidl b/vendor/web-sys/webidls/enabled/AudioContext.webidl index 48ca504ad..8d8cc3931 100644 --- a/vendor/web-sys/webidls/enabled/AudioContext.webidl +++ b/vendor/web-sys/webidls/enabled/AudioContext.webidl @@ -10,8 +10,15 @@ * liability, trademark and document use rules apply. */ +enum AudioContextLatencyCategory { + "balanced", + "interactive", + "playback" +}; + dictionary AudioContextOptions { - float sampleRate = 0; + (AudioContextLatencyCategory or double) latencyHint = "interactive"; + float sampleRate = 0; }; [Pref="dom.webaudio.enabled", diff --git a/vendor/web-sys/webidls/enabled/CSPDictionaries.webidl b/vendor/web-sys/webidls/enabled/CSPDictionaries.webidl deleted file mode 100644 index f8de1c9ad..000000000 --- a/vendor/web-sys/webidls/enabled/CSPDictionaries.webidl +++ /dev/null @@ -1,38 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. */ - -/** - * Dictionary used to display CSP info. - */ - -dictionary CSP { - boolean report-only = false; - - sequence<DOMString> default-src; - sequence<DOMString> script-src; - sequence<DOMString> object-src; - sequence<DOMString> style-src; - sequence<DOMString> img-src; - sequence<DOMString> media-src; - sequence<DOMString> frame-src; - sequence<DOMString> font-src; - sequence<DOMString> connect-src; - sequence<DOMString> report-uri; - sequence<DOMString> frame-ancestors; - // sequence<DOMString> reflected-xss; // not supported in Firefox - sequence<DOMString> base-uri; - sequence<DOMString> form-action; - sequence<DOMString> referrer; - sequence<DOMString> manifest-src; - sequence<DOMString> upgrade-insecure-requests; - sequence<DOMString> child-src; - sequence<DOMString> block-all-mixed-content; - sequence<DOMString> require-sri-for; - sequence<DOMString> sandbox; - sequence<DOMString> worker-src; -}; - -dictionary CSPPolicies { - sequence<CSP> csp-policies; -}; diff --git a/vendor/web-sys/webidls/enabled/CSPReport.webidl b/vendor/web-sys/webidls/enabled/CSPReport.webidl deleted file mode 100644 index 301ca2885..000000000 --- a/vendor/web-sys/webidls/enabled/CSPReport.webidl +++ /dev/null @@ -1,24 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. */ - -/** - * This dictionary holds the parameters used to send - * CSP reports in JSON format. - */ - -dictionary CSPReportProperties { - DOMString document-uri = ""; - DOMString referrer = ""; - DOMString blocked-uri = ""; - DOMString violated-directive = ""; - DOMString original-policy= ""; - DOMString source-file; - DOMString script-sample; - long line-number; - long column-number; -}; - -dictionary CSPReport { - CSPReportProperties csp-report; -}; diff --git a/vendor/web-sys/webidls/enabled/CSSStyleSheet.webidl b/vendor/web-sys/webidls/enabled/CSSStyleSheet.webidl index 7605c949a..4f8754f1a 100644 --- a/vendor/web-sys/webidls/enabled/CSSStyleSheet.webidl +++ b/vendor/web-sys/webidls/enabled/CSSStyleSheet.webidl @@ -14,6 +14,8 @@ enum CSSStyleSheetParsingMode { }; interface CSSStyleSheet : StyleSheet { + [Throws] + constructor(); [Pure] readonly attribute CSSRule? ownerRule; [Throws, NeedsSubjectPrincipal] @@ -24,4 +26,8 @@ interface CSSStyleSheet : StyleSheet { unsigned long insertRule(DOMString rule, optional unsigned long index = 0); [Throws, NeedsSubjectPrincipal] undefined deleteRule(unsigned long index); + [NewObject] + Promise<CSSStyleSheet> replace(USVString text); + [Throws] + undefined replaceSync(USVString text); }; diff --git a/vendor/web-sys/webidls/enabled/CanvasRenderingContext2D.webidl b/vendor/web-sys/webidls/enabled/CanvasRenderingContext2D.webidl index a21b0e5ae..557246d33 100644 --- a/vendor/web-sys/webidls/enabled/CanvasRenderingContext2D.webidl +++ b/vendor/web-sys/webidls/enabled/CanvasRenderingContext2D.webidl @@ -147,6 +147,8 @@ interface mixin CanvasTransform { [Throws, LenientFloat] undefined setTransform(double a, double b, double c, double d, double e, double f); [Throws] + undefined setTransform(optional DOMMatrix2DInit transform = {}); + [Throws] undefined resetTransform(); [NewObject, Throws] DOMMatrix getTransform(); diff --git a/vendor/web-sys/webidls/enabled/DOMMatrix.webidl b/vendor/web-sys/webidls/enabled/DOMMatrix.webidl index 06a0da44b..e40801373 100644 --- a/vendor/web-sys/webidls/enabled/DOMMatrix.webidl +++ b/vendor/web-sys/webidls/enabled/DOMMatrix.webidl @@ -148,3 +148,31 @@ interface DOMMatrix : DOMMatrixReadOnly { [Throws] DOMMatrix setMatrixValue(DOMString transformList); }; +dictionary DOMMatrix2DInit { + unrestricted double a; + unrestricted double b; + unrestricted double c; + unrestricted double d; + unrestricted double e; + unrestricted double f; + unrestricted double m11; + unrestricted double m12; + unrestricted double m21; + unrestricted double m22; + unrestricted double m41; + unrestricted double m42; +}; + +dictionary DOMMatrixInit : DOMMatrix2DInit { + unrestricted double m13 = 0; + unrestricted double m14 = 0; + unrestricted double m23 = 0; + unrestricted double m24 = 0; + unrestricted double m31 = 0; + unrestricted double m32 = 0; + unrestricted double m33 = 1; + unrestricted double m34 = 0; + unrestricted double m43 = 0; + unrestricted double m44 = 1; + boolean is2D; +}; diff --git a/vendor/web-sys/webidls/enabled/HTMLElement.webidl b/vendor/web-sys/webidls/enabled/HTMLElement.webidl index 3ec1d63d6..196638e71 100644 --- a/vendor/web-sys/webidls/enabled/HTMLElement.webidl +++ b/vendor/web-sys/webidls/enabled/HTMLElement.webidl @@ -35,6 +35,8 @@ interface HTMLElement : Element { // user interaction [CEReactions, SetterThrows, Pure] attribute boolean hidden; + [CEReactions] + attribute boolean inert; [NeedsCallerType] undefined click(); [CEReactions, SetterThrows, Pure] diff --git a/vendor/web-sys/webidls/enabled/Notification.webidl b/vendor/web-sys/webidls/enabled/Notification.webidl index 7d63d9732..3114b8cd9 100644 --- a/vendor/web-sys/webidls/enabled/Notification.webidl +++ b/vendor/web-sys/webidls/enabled/Notification.webidl @@ -1,60 +1,34 @@ -/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. - * - * The origin of this IDL file is - * https://notifications.spec.whatwg.org/ - * - * Copyright: - * To the extent possible under law, the editors have waived all copyright and - * related or neighboring rights to this work. - */ - -[Constructor(DOMString title, optional NotificationOptions options), - Exposed=(Window,Worker), - Func="mozilla::dom::Notification::PrefEnabled"] +[Exposed=(Window,Worker)] interface Notification : EventTarget { - [GetterThrows] + constructor(DOMString title, optional NotificationOptions options = {}); + static readonly attribute NotificationPermission permission; [Throws, Func="mozilla::dom::Notification::RequestPermissionEnabledForScope"] static Promise<NotificationPermission> requestPermission(optional NotificationPermissionCallback permissionCallback); - [Throws, Func="mozilla::dom::Notification::IsGetEnabled"] - static Promise<sequence<Notification>> get(optional GetNotificationOptions filter); + static readonly attribute unsigned long maxActions; attribute EventHandler onclick; - attribute EventHandler onshow; - attribute EventHandler onerror; - attribute EventHandler onclose; - [Pure] readonly attribute DOMString title; - - [Pure] readonly attribute NotificationDirection dir; - - [Pure] readonly attribute DOMString? lang; - - [Pure] readonly attribute DOMString? body; - - [Constant] readonly attribute DOMString? tag; - - [Pure] - readonly attribute DOMString? icon; - - [Constant, Func="mozilla::dom::DOMPrefs::NotificationRIEnabled"] + readonly attribute USVString image; + readonly attribute USVString? icon; + readonly attribute USVString badge; + [SameObject] readonly attribute FrozenArray<unsigned long> vibrate; + readonly attribute unsigned long long timestamp; + readonly attribute boolean renotify; + readonly attribute boolean? silent; readonly attribute boolean requireInteraction; - - [Constant] - readonly attribute any data; + [SameObject] readonly attribute any data; + [SameObject] readonly attribute FrozenArray<NotificationAction> actions; undefined close(); }; @@ -64,21 +38,15 @@ dictionary NotificationOptions { DOMString lang = ""; DOMString body = ""; DOMString tag = ""; - DOMString icon = ""; + USVString image; + USVString icon; + USVString badge; + unsigned long long timestamp; + boolean renotify = false; + boolean? silent = null; boolean requireInteraction = false; any data = null; -}; - -dictionary GetNotificationOptions { - DOMString tag = ""; -}; - -dictionary NotificationBehavior { - boolean noscreen = false; - boolean noclear = false; - boolean showOnlyOnce = false; - DOMString soundFile = ""; - sequence<unsigned long> vibrationPattern; + sequence<NotificationAction> actions = []; }; enum NotificationPermission { @@ -87,10 +55,16 @@ enum NotificationPermission { "granted" }; -callback NotificationPermissionCallback = undefined (NotificationPermission permission); - enum NotificationDirection { "auto", "ltr", "rtl" }; + +dictionary NotificationAction { + required DOMString action; + required DOMString title; + USVString icon; +}; + +callback NotificationPermissionCallback = undefined (NotificationPermission permission); diff --git a/vendor/web-sys/webidls/enabled/RTCDataChannel.webidl b/vendor/web-sys/webidls/enabled/RTCDataChannel.webidl index 016a9da32..69efe2fd0 100644 --- a/vendor/web-sys/webidls/enabled/RTCDataChannel.webidl +++ b/vendor/web-sys/webidls/enabled/RTCDataChannel.webidl @@ -17,6 +17,7 @@ enum RTCDataChannelType { interface RTCDataChannel : EventTarget { readonly attribute DOMString label; + readonly attribute unsigned short? id; readonly attribute boolean reliable; readonly attribute unsigned short? maxPacketLifeTime; readonly attribute unsigned short? maxRetransmits; diff --git a/vendor/web-sys/webidls/enabled/RTCRtpTransceiver.webidl b/vendor/web-sys/webidls/enabled/RTCRtpTransceiver.webidl index abf41bd75..fb8d594d7 100644 --- a/vendor/web-sys/webidls/enabled/RTCRtpTransceiver.webidl +++ b/vendor/web-sys/webidls/enabled/RTCRtpTransceiver.webidl @@ -17,8 +17,7 @@ enum RTCRtpTransceiverDirection { dictionary RTCRtpTransceiverInit { RTCRtpTransceiverDirection direction = "sendrecv"; sequence<MediaStream> streams = []; - // TODO: bug 1396918 - // sequence<RTCRtpEncodingParameters> sendEncodings; + sequence<RTCRtpEncodingParameters> sendEncodings = []; }; [Pref="media.peerconnection.enabled", diff --git a/vendor/web-sys/webidls/enabled/Streams.webidl b/vendor/web-sys/webidls/enabled/Streams.webidl index bf57ef4ff..b3a9201fb 100644 --- a/vendor/web-sys/webidls/enabled/Streams.webidl +++ b/vendor/web-sys/webidls/enabled/Streams.webidl @@ -91,6 +91,7 @@ dictionary ReadableStreamReadResult { interface ReadableStreamBYOBReader { [Throws] constructor(ReadableStream stream); + [RustNotWasmMemory] Promise<ReadableStreamReadResult> read(ArrayBufferView view); undefined releaseLock(); }; diff --git a/vendor/web-sys/webidls/enabled/Window.webidl b/vendor/web-sys/webidls/enabled/Window.webidl index fb8735f8b..e17490e5d 100644 --- a/vendor/web-sys/webidls/enabled/Window.webidl +++ b/vendor/web-sys/webidls/enabled/Window.webidl @@ -195,9 +195,9 @@ partial interface Window { [Replaceable] readonly attribute double devicePixelRatio; }; -// https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/NavigationTiming/Overview.html -partial interface Window { - [Replaceable, Pure, StoreInSlot] readonly attribute Performance? performance; +// https://w3c.github.io/hr-time/#the-performance-attribute +partial interface mixin WindowOrWorkerGlobalScope { + [Replaceable] readonly attribute Performance? performance; }; // https://dvcs.w3.org/hg/webcrypto-api/raw-file/tip/spec/Overview.html diff --git a/vendor/web-sys/webidls/unstable/AudioContext.webidl b/vendor/web-sys/webidls/unstable/AudioContext.webidl new file mode 100644 index 000000000..df2f85bcb --- /dev/null +++ b/vendor/web-sys/webidls/unstable/AudioContext.webidl @@ -0,0 +1,18 @@ +enum AudioSinkType { + "none" +}; + +dictionary AudioSinkOptions { + required AudioSinkType type; +}; + +partial dictionary AudioContextOptions { + (DOMString or AudioSinkOptions) sinkId; +}; + +partial interface AudioContext { + [SecureContext] readonly attribute (DOMString or AudioSinkInfo) sinkId; + + [SecureContext] Promise<undefined> setSinkId ((DOMString or AudioSinkOptions) sinkId); + attribute EventHandler onsinkchange; +}; diff --git a/vendor/web-sys/webidls/unstable/AudioSinkInfo.webidl b/vendor/web-sys/webidls/unstable/AudioSinkInfo.webidl new file mode 100644 index 000000000..e09218446 --- /dev/null +++ b/vendor/web-sys/webidls/unstable/AudioSinkInfo.webidl @@ -0,0 +1,4 @@ +[Exposed=Window] +interface AudioSinkInfo { + readonly attribute AudioSinkType type; +}; diff --git a/vendor/web-sys/webidls/unstable/ViewTransition.webidl b/vendor/web-sys/webidls/unstable/ViewTransition.webidl new file mode 100644 index 000000000..3f84c5724 --- /dev/null +++ b/vendor/web-sys/webidls/unstable/ViewTransition.webidl @@ -0,0 +1,15 @@ +partial interface Document { + [Throws] + ViewTransition startViewTransition(optional UpdateCallback? updateCallback = null); +}; + +callback UpdateCallback = Promise<any> (); + +[Exposed=Window] +interface ViewTransition { + readonly attribute Promise<undefined> updateCallbackDone; + readonly attribute Promise<undefined> ready; + readonly attribute Promise<undefined> finished; + [Throws] + undefined skipTransition(); +}; diff --git a/vendor/web-sys/webidls/unstable/WebGPU.webidl b/vendor/web-sys/webidls/unstable/WebGPU.webidl index e481dd5d9..05dd50203 100644 --- a/vendor/web-sys/webidls/unstable/WebGPU.webidl +++ b/vendor/web-sys/webidls/unstable/WebGPU.webidl @@ -13,6 +13,7 @@ interface GPUSupportedLimits { readonly attribute unsigned long maxTextureDimension3D; readonly attribute unsigned long maxTextureArrayLayers; readonly attribute unsigned long maxBindGroups; + readonly attribute unsigned long maxBindGroupsPlusVertexBuffers; readonly attribute unsigned long maxBindingsPerBindGroup; readonly attribute unsigned long maxDynamicUniformBuffersPerPipelineLayout; readonly attribute unsigned long maxDynamicStorageBuffersPerPipelineLayout; @@ -32,7 +33,7 @@ interface GPUSupportedLimits { readonly attribute unsigned long maxInterStageShaderComponents; readonly attribute unsigned long maxInterStageShaderVariables; readonly attribute unsigned long maxColorAttachments; - readonly attribute unsigned long maxColorAttachmentBytesPerPixel; + readonly attribute unsigned long maxColorAttachmentBytesPerSample; readonly attribute unsigned long maxComputeWorkgroupStorageSize; readonly attribute unsigned long maxComputeInvocationsPerWorkgroup; readonly attribute unsigned long maxComputeWorkgroupSizeX; @@ -47,6 +48,11 @@ interface GPUSupportedFeatures { }; [Exposed=(Window, DedicatedWorker), SecureContext] +interface WGSLLanguageFeatures { + readonly setlike<DOMString>; +}; + +[Exposed=(Window, DedicatedWorker), SecureContext] interface GPUAdapterInfo { readonly attribute DOMString vendor; readonly attribute DOMString architecture; @@ -64,6 +70,7 @@ WorkerNavigator includes NavigatorGPU; interface GPU { Promise<GPUAdapter?> requestAdapter(optional GPURequestAdapterOptions options = {}); GPUTextureFormat getPreferredCanvasFormat(); + [SameObject] readonly attribute WGSLLanguageFeatures wgslLanguageFeatures; }; dictionary GPURequestAdapterOptions { @@ -73,7 +80,7 @@ dictionary GPURequestAdapterOptions { enum GPUPowerPreference { "low-power", - "high-performance" + "high-performance", }; [Exposed=(Window, DedicatedWorker), SecureContext] @@ -86,7 +93,8 @@ interface GPUAdapter { Promise<GPUAdapterInfo> requestAdapterInfo(optional sequence<DOMString> unmaskHints = []); }; -dictionary GPUDeviceDescriptor : GPUObjectDescriptorBase { +dictionary GPUDeviceDescriptor + : GPUObjectDescriptorBase { sequence<GPUFeatureName> requiredFeatures = []; record<DOMString, GPUSize64> requiredLimits = {}; GPUQueueDescriptor defaultQueue = {}; @@ -101,8 +109,9 @@ enum GPUFeatureName { "timestamp-query", "indirect-first-instance", "shader-f16", + "rg11b10ufloat-renderable", "bgra8unorm-storage", - "rg11b10ufloat-renderable" + "float32-filterable", }; [Exposed=(Window, DedicatedWorker), SecureContext] @@ -138,8 +147,8 @@ GPUDevice includes GPUObjectBase; [Exposed=(Window, DedicatedWorker), SecureContext] interface GPUBuffer { - readonly attribute GPUSize64 size; - readonly attribute GPUBufferUsageFlags usage; + readonly attribute GPUSize64Out size; + readonly attribute GPUFlagsConstant usage; readonly attribute GPUBufferMapState mapState; @@ -154,17 +163,18 @@ GPUBuffer includes GPUObjectBase; enum GPUBufferMapState { "unmapped", "pending", - "mapped" + "mapped", }; -dictionary GPUBufferDescriptor : GPUObjectDescriptorBase { +dictionary GPUBufferDescriptor + : GPUObjectDescriptorBase { required GPUSize64 size; required GPUBufferUsageFlags usage; boolean mappedAtCreation = false; }; typedef [EnforceRange] unsigned long GPUBufferUsageFlags; -[Exposed=(Window, DedicatedWorker)] +[Exposed=(Window, DedicatedWorker), SecureContext] namespace GPUBufferUsage { const GPUFlagsConstant MAP_READ = 0x0001; const GPUFlagsConstant MAP_WRITE = 0x0002; @@ -179,7 +189,7 @@ namespace GPUBufferUsage { }; typedef [EnforceRange] unsigned long GPUMapModeFlags; -[Exposed=(Window, DedicatedWorker)] +[Exposed=(Window, DedicatedWorker), SecureContext] namespace GPUMapMode { const GPUFlagsConstant READ = 0x0001; const GPUFlagsConstant WRITE = 0x0002; @@ -191,18 +201,19 @@ interface GPUTexture { undefined destroy(); - readonly attribute GPUIntegerCoordinate width; - readonly attribute GPUIntegerCoordinate height; - readonly attribute GPUIntegerCoordinate depthOrArrayLayers; - readonly attribute GPUIntegerCoordinate mipLevelCount; - readonly attribute GPUSize32 sampleCount; + readonly attribute GPUIntegerCoordinateOut width; + readonly attribute GPUIntegerCoordinateOut height; + readonly attribute GPUIntegerCoordinateOut depthOrArrayLayers; + readonly attribute GPUIntegerCoordinateOut mipLevelCount; + readonly attribute GPUSize32Out sampleCount; readonly attribute GPUTextureDimension dimension; readonly attribute GPUTextureFormat format; - readonly attribute GPUTextureUsageFlags usage; + readonly attribute GPUFlagsConstant usage; }; GPUTexture includes GPUObjectBase; -dictionary GPUTextureDescriptor : GPUObjectDescriptorBase { +dictionary GPUTextureDescriptor + : GPUObjectDescriptorBase { required GPUExtent3D size; GPUIntegerCoordinate mipLevelCount = 1; GPUSize32 sampleCount = 1; @@ -215,11 +226,11 @@ dictionary GPUTextureDescriptor : GPUObjectDescriptorBase { enum GPUTextureDimension { "1d", "2d", - "3d" + "3d", }; typedef [EnforceRange] unsigned long GPUTextureUsageFlags; -[Exposed=(Window, DedicatedWorker)] +[Exposed=(Window, DedicatedWorker), SecureContext] namespace GPUTextureUsage { const GPUFlagsConstant COPY_SRC = 0x01; const GPUFlagsConstant COPY_DST = 0x02; @@ -233,7 +244,8 @@ interface GPUTextureView { }; GPUTextureView includes GPUObjectBase; -dictionary GPUTextureViewDescriptor : GPUObjectDescriptorBase { +dictionary GPUTextureViewDescriptor + : GPUObjectDescriptorBase { GPUTextureFormat format; GPUTextureViewDimension dimension; GPUTextureAspect aspect = "all"; @@ -249,13 +261,13 @@ enum GPUTextureViewDimension { "2d-array", "cube", "cube-array", - "3d" + "3d", }; enum GPUTextureAspect { "all", "stencil-only", - "depth-only" + "depth-only", }; enum GPUTextureFormat { @@ -375,17 +387,17 @@ enum GPUTextureFormat { "astc-12x10-unorm", "astc-12x10-unorm-srgb", "astc-12x12-unorm", - "astc-12x12-unorm-srgb" + "astc-12x12-unorm-srgb", }; [Exposed=(Window, DedicatedWorker), SecureContext] interface GPUExternalTexture { - readonly attribute boolean expired; }; GPUExternalTexture includes GPUObjectBase; -dictionary GPUExternalTextureDescriptor : GPUObjectDescriptorBase { - required HTMLVideoElement source; +dictionary GPUExternalTextureDescriptor + : GPUObjectDescriptorBase { + required (HTMLVideoElement or VideoFrame) source; PredefinedColorSpace colorSpace = "srgb"; }; @@ -394,7 +406,8 @@ interface GPUSampler { }; GPUSampler includes GPUObjectBase; -dictionary GPUSamplerDescriptor : GPUObjectDescriptorBase { +dictionary GPUSamplerDescriptor + : GPUObjectDescriptorBase { GPUAddressMode addressModeU = "clamp-to-edge"; GPUAddressMode addressModeV = "clamp-to-edge"; GPUAddressMode addressModeW = "clamp-to-edge"; @@ -410,17 +423,17 @@ dictionary GPUSamplerDescriptor : GPUObjectDescriptorBase { enum GPUAddressMode { "clamp-to-edge", "repeat", - "mirror-repeat" + "mirror-repeat", }; enum GPUFilterMode { "nearest", - "linear" + "linear", }; enum GPUMipmapFilterMode { "nearest", - "linear" + "linear", }; enum GPUCompareFunction { @@ -431,7 +444,7 @@ enum GPUCompareFunction { "greater", "not-equal", "greater-equal", - "always" + "always", }; [Exposed=(Window, DedicatedWorker), SecureContext] @@ -439,7 +452,8 @@ interface GPUBindGroupLayout { }; GPUBindGroupLayout includes GPUObjectBase; -dictionary GPUBindGroupLayoutDescriptor : GPUObjectDescriptorBase { +dictionary GPUBindGroupLayoutDescriptor + : GPUObjectDescriptorBase { required sequence<GPUBindGroupLayoutEntry> entries; }; @@ -455,7 +469,7 @@ dictionary GPUBindGroupLayoutEntry { }; typedef [EnforceRange] unsigned long GPUShaderStageFlags; -[Exposed=(Window, DedicatedWorker)] +[Exposed=(Window, DedicatedWorker), SecureContext] namespace GPUShaderStage { const GPUFlagsConstant VERTEX = 0x1; const GPUFlagsConstant FRAGMENT = 0x2; @@ -465,7 +479,7 @@ namespace GPUShaderStage { enum GPUBufferBindingType { "uniform", "storage", - "read-only-storage" + "read-only-storage", }; dictionary GPUBufferBindingLayout { @@ -477,7 +491,7 @@ dictionary GPUBufferBindingLayout { enum GPUSamplerBindingType { "filtering", "non-filtering", - "comparison" + "comparison", }; dictionary GPUSamplerBindingLayout { @@ -489,7 +503,7 @@ enum GPUTextureSampleType { "unfilterable-float", "depth", "sint", - "uint" + "uint", }; dictionary GPUTextureBindingLayout { @@ -499,7 +513,7 @@ dictionary GPUTextureBindingLayout { }; enum GPUStorageTextureAccess { - "write-only" + "write-only", }; dictionary GPUStorageTextureBindingLayout { @@ -516,7 +530,8 @@ interface GPUBindGroup { }; GPUBindGroup includes GPUObjectBase; -dictionary GPUBindGroupDescriptor : GPUObjectDescriptorBase { +dictionary GPUBindGroupDescriptor + : GPUObjectDescriptorBase { required GPUBindGroupLayout layout; required sequence<GPUBindGroupEntry> entries; }; @@ -539,17 +554,19 @@ interface GPUPipelineLayout { }; GPUPipelineLayout includes GPUObjectBase; -dictionary GPUPipelineLayoutDescriptor : GPUObjectDescriptorBase { +dictionary GPUPipelineLayoutDescriptor + : GPUObjectDescriptorBase { required sequence<GPUBindGroupLayout> bindGroupLayouts; }; [Exposed=(Window, DedicatedWorker), SecureContext] interface GPUShaderModule { - Promise<GPUCompilationInfo> compilationInfo(); + Promise<GPUCompilationInfo> getCompilationInfo(); }; GPUShaderModule includes GPUObjectBase; -dictionary GPUShaderModuleDescriptor : GPUObjectDescriptorBase { +dictionary GPUShaderModuleDescriptor + : GPUObjectDescriptorBase { required USVString code; object sourceMap; record<USVString, GPUShaderModuleCompilationHint> hints; @@ -562,7 +579,7 @@ dictionary GPUShaderModuleCompilationHint { enum GPUCompilationMessageType { "error", "warning", - "info" + "info", }; [Exposed=(Window, DedicatedWorker), Serializable, SecureContext] @@ -580,11 +597,27 @@ interface GPUCompilationInfo { readonly attribute FrozenArray<GPUCompilationMessage> messages; }; +[Exposed=(Window, DedicatedWorker), SecureContext, Serializable] +interface GPUPipelineError : DOMException { + constructor(DOMString message, GPUPipelineErrorInit options); + readonly attribute GPUPipelineErrorReason reason; +}; + +dictionary GPUPipelineErrorInit { + required GPUPipelineErrorReason reason; +}; + +enum GPUPipelineErrorReason { + "validation", + "internal", +}; + enum GPUAutoLayoutMode { - "auto" + "auto", }; -dictionary GPUPipelineDescriptorBase : GPUObjectDescriptorBase { +dictionary GPUPipelineDescriptorBase + : GPUObjectDescriptorBase { required (GPUPipelineLayout or GPUAutoLayoutMode) layout; }; @@ -606,7 +639,8 @@ interface GPUComputePipeline { GPUComputePipeline includes GPUObjectBase; GPUComputePipeline includes GPUPipelineBase; -dictionary GPUComputePipelineDescriptor : GPUPipelineDescriptorBase { +dictionary GPUComputePipelineDescriptor + : GPUPipelineDescriptorBase { required GPUProgrammableStage compute; }; @@ -616,7 +650,8 @@ interface GPURenderPipeline { GPURenderPipeline includes GPUObjectBase; GPURenderPipeline includes GPUPipelineBase; -dictionary GPURenderPipelineDescriptor : GPUPipelineDescriptorBase { +dictionary GPURenderPipelineDescriptor + : GPUPipelineDescriptorBase { required GPUVertexState vertex; GPUPrimitiveState primitive = {}; GPUDepthStencilState depthStencil; @@ -639,18 +674,18 @@ enum GPUPrimitiveTopology { "line-list", "line-strip", "triangle-list", - "triangle-strip" + "triangle-strip", }; enum GPUFrontFace { "ccw", - "cw" + "cw", }; enum GPUCullMode { "none", "front", - "back" + "back", }; dictionary GPUMultisampleState { @@ -659,7 +694,8 @@ dictionary GPUMultisampleState { boolean alphaToCoverageEnabled = false; }; -dictionary GPUFragmentState : GPUProgrammableStage { +dictionary GPUFragmentState + : GPUProgrammableStage { required sequence<GPUColorTargetState?> targets; }; @@ -676,7 +712,7 @@ dictionary GPUBlendState { }; typedef [EnforceRange] unsigned long GPUColorWriteFlags; -[Exposed=(Window, DedicatedWorker)] +[Exposed=(Window, DedicatedWorker), SecureContext] namespace GPUColorWrite { const GPUFlagsConstant RED = 0x1; const GPUFlagsConstant GREEN = 0x2; @@ -704,7 +740,7 @@ enum GPUBlendFactor { "one-minus-dst-alpha", "src-alpha-saturated", "constant", - "one-minus-constant" + "one-minus-constant", }; enum GPUBlendOperation { @@ -712,14 +748,14 @@ enum GPUBlendOperation { "subtract", "reverse-subtract", "min", - "max" + "max", }; dictionary GPUDepthStencilState { required GPUTextureFormat format; - boolean depthWriteEnabled = false; - GPUCompareFunction depthCompare = "always"; + required boolean depthWriteEnabled; + required GPUCompareFunction depthCompare; GPUStencilFaceState stencilFront = {}; GPUStencilFaceState stencilBack = {}; @@ -747,12 +783,12 @@ enum GPUStencilOperation { "increment-clamp", "decrement-clamp", "increment-wrap", - "decrement-wrap" + "decrement-wrap", }; enum GPUIndexFormat { "uint16", - "uint32" + "uint32", }; enum GPUVertexFormat { @@ -785,15 +821,16 @@ enum GPUVertexFormat { "sint32", "sint32x2", "sint32x3", - "sint32x4" + "sint32x4", }; enum GPUVertexStepMode { "vertex", - "instance" + "instance", }; -dictionary GPUVertexState : GPUProgrammableStage { +dictionary GPUVertexState + : GPUProgrammableStage { sequence<GPUVertexBufferLayout?> buffers = []; }; @@ -810,12 +847,43 @@ dictionary GPUVertexAttribute { required GPUIndex32 shaderLocation; }; +dictionary GPUImageDataLayout { + GPUSize64 offset = 0; + GPUSize32 bytesPerRow; + GPUSize32 rowsPerImage; +}; + +dictionary GPUImageCopyBuffer + : GPUImageDataLayout { + required GPUBuffer buffer; +}; + +dictionary GPUImageCopyTexture { + required GPUTexture texture; + GPUIntegerCoordinate mipLevel = 0; + GPUOrigin3D origin = {}; + GPUTextureAspect aspect = "all"; +}; + +dictionary GPUImageCopyTextureTagged + : GPUImageCopyTexture { + PredefinedColorSpace colorSpace = "srgb"; + boolean premultipliedAlpha = false; +}; + +dictionary GPUImageCopyExternalImage { + required (ImageBitmap or HTMLVideoElement or HTMLCanvasElement or OffscreenCanvas) source; + GPUOrigin2D origin = {}; + boolean flipY = false; +}; + [Exposed=(Window, DedicatedWorker), SecureContext] interface GPUCommandBuffer { }; GPUCommandBuffer includes GPUObjectBase; -dictionary GPUCommandBufferDescriptor : GPUObjectDescriptorBase { +dictionary GPUCommandBufferDescriptor + : GPUObjectDescriptorBase { }; interface mixin GPUCommandsMixin { @@ -868,42 +936,15 @@ GPUCommandEncoder includes GPUObjectBase; GPUCommandEncoder includes GPUCommandsMixin; GPUCommandEncoder includes GPUDebugCommandsMixin; -dictionary GPUCommandEncoderDescriptor : GPUObjectDescriptorBase { -}; - -dictionary GPUImageDataLayout { - GPUSize64 offset = 0; - GPUSize32 bytesPerRow; - GPUSize32 rowsPerImage; -}; - -dictionary GPUImageCopyBuffer : GPUImageDataLayout { - required GPUBuffer buffer; -}; - -dictionary GPUImageCopyTexture { - required GPUTexture texture; - GPUIntegerCoordinate mipLevel = 0; - GPUOrigin3D origin = {}; - GPUTextureAspect aspect = "all"; -}; - -dictionary GPUImageCopyTextureTagged : GPUImageCopyTexture { - PredefinedColorSpace colorSpace = "srgb"; - boolean premultipliedAlpha = false; -}; - -dictionary GPUImageCopyExternalImage { - required (ImageBitmap or HTMLCanvasElement or OffscreenCanvas) source; - GPUOrigin2D origin = {}; - boolean flipY = false; +dictionary GPUCommandEncoderDescriptor + : GPUObjectDescriptorBase { }; interface mixin GPUBindingCommandsMixin { - undefined setBindGroup(GPUIndex32 index, GPUBindGroup bindGroup, + undefined setBindGroup(GPUIndex32 index, GPUBindGroup? bindGroup, optional sequence<GPUBufferDynamicOffset> dynamicOffsets = []); - undefined setBindGroup(GPUIndex32 index, GPUBindGroup bindGroup, + undefined setBindGroup(GPUIndex32 index, GPUBindGroup? bindGroup, Uint32Array dynamicOffsetsData, GPUSize64 dynamicOffsetsDataStart, GPUSize32 dynamicOffsetsDataLength); @@ -928,21 +969,15 @@ GPUComputePassEncoder includes GPUCommandsMixin; GPUComputePassEncoder includes GPUDebugCommandsMixin; GPUComputePassEncoder includes GPUBindingCommandsMixin; -enum GPUComputePassTimestampLocation { - "beginning", - "end" -}; - -dictionary GPUComputePassTimestampWrite { +dictionary GPUComputePassTimestampWrites { required GPUQuerySet querySet; - required GPUSize32 queryIndex; - required GPUComputePassTimestampLocation location; + GPUSize32 beginningOfPassWriteIndex; + GPUSize32 endOfPassWriteIndex; }; -typedef sequence<GPUComputePassTimestampWrite> GPUComputePassTimestampWrites; - -dictionary GPUComputePassDescriptor : GPUObjectDescriptorBase { - GPUComputePassTimestampWrites timestampWrites = []; +dictionary GPUComputePassDescriptor + : GPUObjectDescriptorBase { + GPUComputePassTimestampWrites timestampWrites; }; [Exposed=(Window, DedicatedWorker), SecureContext] @@ -969,24 +1004,18 @@ GPURenderPassEncoder includes GPUDebugCommandsMixin; GPURenderPassEncoder includes GPUBindingCommandsMixin; GPURenderPassEncoder includes GPURenderCommandsMixin; -enum GPURenderPassTimestampLocation { - "beginning", - "end" -}; - -dictionary GPURenderPassTimestampWrite { +dictionary GPURenderPassTimestampWrites { required GPUQuerySet querySet; - required GPUSize32 queryIndex; - required GPURenderPassTimestampLocation location; + GPUSize32 beginningOfPassWriteIndex; + GPUSize32 endOfPassWriteIndex; }; -typedef sequence<GPURenderPassTimestampWrite> GPURenderPassTimestampWrites; - -dictionary GPURenderPassDescriptor : GPUObjectDescriptorBase { +dictionary GPURenderPassDescriptor + : GPUObjectDescriptorBase { required sequence<GPURenderPassColorAttachment?> colorAttachments; GPURenderPassDepthStencilAttachment depthStencilAttachment; GPUQuerySet occlusionQuerySet; - GPURenderPassTimestampWrites timestampWrites = []; + GPURenderPassTimestampWrites timestampWrites; GPUSize64 maxDrawCount = 50000000; }; @@ -1002,7 +1031,7 @@ dictionary GPURenderPassColorAttachment { dictionary GPURenderPassDepthStencilAttachment { required GPUTextureView view; - float depthClearValue = 0; + float depthClearValue; GPULoadOp depthLoadOp; GPUStoreOp depthStoreOp; boolean depthReadOnly = false; @@ -1015,15 +1044,16 @@ dictionary GPURenderPassDepthStencilAttachment { enum GPULoadOp { "load", - "clear" + "clear", }; enum GPUStoreOp { "store", - "discard" + "discard", }; -dictionary GPURenderPassLayout: GPUObjectDescriptorBase { +dictionary GPURenderPassLayout + : GPUObjectDescriptorBase { required sequence<GPUTextureFormat?> colorFormats; GPUTextureFormat depthStencilFormat; GPUSize32 sampleCount = 1; @@ -1033,7 +1063,7 @@ interface mixin GPURenderCommandsMixin { undefined setPipeline(GPURenderPipeline pipeline); undefined setIndexBuffer(GPUBuffer buffer, GPUIndexFormat indexFormat, optional GPUSize64 offset = 0, optional GPUSize64 size); - undefined setVertexBuffer(GPUIndex32 slot, GPUBuffer buffer, optional GPUSize64 offset = 0, optional GPUSize64 size); + undefined setVertexBuffer(GPUIndex32 slot, GPUBuffer? buffer, optional GPUSize64 offset = 0, optional GPUSize64 size); undefined draw(GPUSize32 vertexCount, optional GPUSize32 instanceCount = 1, optional GPUSize32 firstVertex = 0, optional GPUSize32 firstInstance = 0); @@ -1051,7 +1081,8 @@ interface GPURenderBundle { }; GPURenderBundle includes GPUObjectBase; -dictionary GPURenderBundleDescriptor : GPUObjectDescriptorBase { +dictionary GPURenderBundleDescriptor + : GPUObjectDescriptorBase { }; [Exposed=(Window, DedicatedWorker), SecureContext] @@ -1064,12 +1095,14 @@ GPURenderBundleEncoder includes GPUDebugCommandsMixin; GPURenderBundleEncoder includes GPUBindingCommandsMixin; GPURenderBundleEncoder includes GPURenderCommandsMixin; -dictionary GPURenderBundleEncoderDescriptor : GPURenderPassLayout { +dictionary GPURenderBundleEncoderDescriptor + : GPURenderPassLayout { boolean depthReadOnly = false; boolean stencilReadOnly = false; }; -dictionary GPUQueueDescriptor : GPUObjectDescriptorBase { +dictionary GPUQueueDescriptor + : GPUObjectDescriptorBase { }; [Exposed=(Window, DedicatedWorker), SecureContext] @@ -1103,18 +1136,19 @@ interface GPUQuerySet { undefined destroy(); readonly attribute GPUQueryType type; - readonly attribute GPUSize32 count; + readonly attribute GPUSize32Out count; }; GPUQuerySet includes GPUObjectBase; -dictionary GPUQuerySetDescriptor : GPUObjectDescriptorBase { +dictionary GPUQuerySetDescriptor + : GPUObjectDescriptorBase { required GPUQueryType type; required GPUSize32 count; }; enum GPUQueryType { "occlusion", - "timestamp" + "timestamp", }; [Exposed=(Window, DedicatedWorker), SecureContext] @@ -1129,7 +1163,7 @@ interface GPUCanvasContext { enum GPUCanvasAlphaMode { "opaque", - "premultiplied" + "premultiplied", }; dictionary GPUCanvasConfiguration { @@ -1142,12 +1176,13 @@ dictionary GPUCanvasConfiguration { }; enum GPUDeviceLostReason { - "destroyed" + "unknown", + "destroyed", }; [Exposed=(Window, DedicatedWorker), SecureContext] interface GPUDeviceLostInfo { - readonly attribute (GPUDeviceLostReason or undefined) reason; + readonly attribute GPUDeviceLostReason reason; readonly attribute DOMString message; }; @@ -1161,24 +1196,27 @@ interface GPUError { }; [Exposed=(Window, DedicatedWorker), SecureContext] -interface GPUValidationError : GPUError { +interface GPUValidationError + : GPUError { constructor(DOMString message); }; [Exposed=(Window, DedicatedWorker), SecureContext] -interface GPUOutOfMemoryError : GPUError { +interface GPUOutOfMemoryError + : GPUError { constructor(DOMString message); }; [Exposed=(Window, DedicatedWorker), SecureContext] -interface GPUInternalError : GPUError { +interface GPUInternalError + : GPUError { constructor(DOMString message); }; enum GPUErrorFilter { "validation", "out-of-memory", - "internal" + "internal", }; partial interface GPUDevice { @@ -1215,6 +1253,10 @@ typedef [EnforceRange] unsigned long GPUIndex32; typedef [EnforceRange] unsigned long GPUSize32; typedef [EnforceRange] long GPUSignedOffset32; +typedef unsigned long long GPUSize64Out; +typedef unsigned long GPUIntegerCoordinateOut; +typedef unsigned long GPUSize32Out; + typedef unsigned long GPUFlagsConstant; dictionary GPUColorDict { @@ -1244,4 +1286,3 @@ dictionary GPUExtent3DDict { GPUIntegerCoordinate depthOrArrayLayers = 1; }; typedef (sequence<GPUIntegerCoordinate> or GPUExtent3DDict) GPUExtent3D; - diff --git a/vendor/web-sys/webidls/unstable/is-input-pending.webidl b/vendor/web-sys/webidls/unstable/is-input-pending.webidl new file mode 100644 index 000000000..c29aaa455 --- /dev/null +++ b/vendor/web-sys/webidls/unstable/is-input-pending.webidl @@ -0,0 +1,11 @@ +dictionary IsInputPendingOptions { + boolean includeContinuous = false; +}; + +[Exposed=Window] interface Scheduling { + boolean isInputPending(optional IsInputPendingOptions isInputPendingOptions = {}); +}; + +partial interface Navigator { + readonly attribute Scheduling scheduling; +}; diff --git a/vendor/web-sys/webidls/unstable/scheduling-apis.webidl b/vendor/web-sys/webidls/unstable/scheduling-apis.webidl new file mode 100644 index 000000000..b63aff546 --- /dev/null +++ b/vendor/web-sys/webidls/unstable/scheduling-apis.webidl @@ -0,0 +1,59 @@ +enum TaskPriority { + "user-blocking", + "user-visible", + "background" +}; + +dictionary SchedulerPostTaskOptions { + AbortSignal signal; + TaskPriority priority; + [EnforceRange] unsigned long long delay = 0; +}; + +callback SchedulerPostTaskCallback = any (); + +[Exposed=(Window, Worker)] +interface Scheduler { + Promise<any> postTask(SchedulerPostTaskCallback callback, + optional SchedulerPostTaskOptions options = {}); +}; + +[Exposed=(Window, Worker)] +interface TaskPriorityChangeEvent : Event { + constructor(DOMString type, TaskPriorityChangeEventInit priorityChangeEventInitDict); + + readonly attribute TaskPriority previousPriority; +}; + +dictionary TaskPriorityChangeEventInit : EventInit { + required TaskPriority previousPriority; +}; + +dictionary TaskControllerInit { + TaskPriority priority = "user-visible"; +}; + +[Exposed=(Window,Worker)] +interface TaskController : AbortController { + constructor(optional TaskControllerInit init = {}); + + [Throws] + undefined setPriority(TaskPriority priority); +}; + +dictionary TaskSignalAnyInit { + (TaskPriority or TaskSignal) priority = "user-visible"; +}; + +[Exposed=(Window, Worker)] +interface TaskSignal : AbortSignal { + [NewObject] static TaskSignal _any(sequence<AbortSignal> signals, optional TaskSignalAnyInit init = {}); + + readonly attribute TaskPriority priority; + + attribute EventHandler onprioritychange; +}; + +partial interface mixin WindowOrWorkerGlobalScope { + [Replaceable] readonly attribute Scheduler scheduler; +}; diff --git a/vendor/web-sys/webidls/unstable/weblock-apis.webidl b/vendor/web-sys/webidls/unstable/weblock-apis.webidl new file mode 100644 index 000000000..14bc3a22c --- /dev/null +++ b/vendor/web-sys/webidls/unstable/weblock-apis.webidl @@ -0,0 +1,45 @@ +[SecureContext] +interface mixin NavigatorLocks { + readonly attribute LockManager locks; +}; +Navigator includes NavigatorLocks; +WorkerNavigator includes NavigatorLocks; + +[SecureContext, Exposed=(Window,Worker)] +interface LockManager { + Promise<any> request(DOMString name, + LockGrantedCallback callback); + Promise<any> request(DOMString name, + LockOptions options, + LockGrantedCallback callback); + + Promise<LockManagerSnapshot> query(); +}; + +callback LockGrantedCallback = Promise<any> (Lock? lock); + +enum LockMode { "shared", "exclusive" }; + +dictionary LockOptions { + LockMode mode = "exclusive"; + boolean ifAvailable = false; + boolean steal = false; + AbortSignal signal; +}; + +dictionary LockManagerSnapshot { + sequence<LockInfo> held; + sequence<LockInfo> pending; +}; + +dictionary LockInfo { + DOMString name; + LockMode mode; + DOMString clientId; +}; + +[SecureContext, Exposed=(Window,Worker)] +interface Lock { + readonly attribute DOMString name; + readonly attribute LockMode mode; +}; |