diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:33 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:33 +0000 |
commit | 086c044dc34dfc0f74fbe41f4ecb402b2cd34884 (patch) | |
tree | a4f824bd33cb075dd5aa3eb5a0a94af221bbe83a /dom/webidl | |
parent | Adding debian version 124.0.1-1. (diff) | |
download | firefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.tar.xz firefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.zip |
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/webidl')
40 files changed, 541 insertions, 428 deletions
diff --git a/dom/webidl/ARIAMixin.webidl b/dom/webidl/ARIAMixin.webidl new file mode 100644 index 0000000000..10d23af96e --- /dev/null +++ b/dom/webidl/ARIAMixin.webidl @@ -0,0 +1,148 @@ +/* -*- 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://w3c.github.io/aria/#ARIAMixin + * + * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C + * liability, trademark and document use rules apply. + */ + +interface mixin ARIAMixin { + [Pref="accessibility.ARIAElementReflection.enabled", CEReactions] + attribute Element? ariaActiveDescendantElement; + + [CEReactions, SetterThrows] + attribute DOMString? role; + + [CEReactions, SetterThrows] + attribute DOMString? ariaAtomic; + + [CEReactions, SetterThrows] + attribute DOMString? ariaAutoComplete; + + [CEReactions, SetterThrows] + attribute DOMString? ariaBrailleLabel; + + [CEReactions, SetterThrows] + attribute DOMString? ariaBrailleRoleDescription; + + [CEReactions, SetterThrows] + attribute DOMString? ariaBusy; + + [CEReactions, SetterThrows] + attribute DOMString? ariaChecked; + + [CEReactions, SetterThrows] + attribute DOMString? ariaColCount; + + [CEReactions, SetterThrows] + attribute DOMString? ariaColIndex; + + [CEReactions, SetterThrows] + attribute DOMString? ariaColIndexText; + + [CEReactions, SetterThrows] + attribute DOMString? ariaColSpan; + + [CEReactions, SetterThrows] + attribute DOMString? ariaCurrent; + + [CEReactions, SetterThrows] + attribute DOMString? ariaDescription; + + [CEReactions, SetterThrows] + attribute DOMString? ariaDisabled; + + [CEReactions, SetterThrows] + attribute DOMString? ariaExpanded; + + [CEReactions, SetterThrows] + attribute DOMString? ariaHasPopup; + + [CEReactions, SetterThrows] + attribute DOMString? ariaHidden; + + [CEReactions, SetterThrows] + attribute DOMString? ariaInvalid; + + [CEReactions, SetterThrows] + attribute DOMString? ariaKeyShortcuts; + + [CEReactions, SetterThrows] + attribute DOMString? ariaLabel; + + [CEReactions, SetterThrows] + attribute DOMString? ariaLevel; + + [CEReactions, SetterThrows] + attribute DOMString? ariaLive; + + [CEReactions, SetterThrows] + attribute DOMString? ariaModal; + + [CEReactions, SetterThrows] + attribute DOMString? ariaMultiLine; + + [CEReactions, SetterThrows] + attribute DOMString? ariaMultiSelectable; + + [CEReactions, SetterThrows] + attribute DOMString? ariaOrientation; + + [CEReactions, SetterThrows] + attribute DOMString? ariaPlaceholder; + + [CEReactions, SetterThrows] + attribute DOMString? ariaPosInSet; + + [CEReactions, SetterThrows] + attribute DOMString? ariaPressed; + + [CEReactions, SetterThrows] + attribute DOMString? ariaReadOnly; + + [CEReactions, SetterThrows] + attribute DOMString? ariaRelevant; + + [CEReactions, SetterThrows] + attribute DOMString? ariaRequired; + + [CEReactions, SetterThrows] + attribute DOMString? ariaRoleDescription; + + [CEReactions, SetterThrows] + attribute DOMString? ariaRowCount; + + [CEReactions, SetterThrows] + attribute DOMString? ariaRowIndex; + + [CEReactions, SetterThrows] + attribute DOMString? ariaRowIndexText; + + [CEReactions, SetterThrows] + attribute DOMString? ariaRowSpan; + + [CEReactions, SetterThrows] + attribute DOMString? ariaSelected; + + [CEReactions, SetterThrows] + attribute DOMString? ariaSetSize; + + [CEReactions, SetterThrows] + attribute DOMString? ariaSort; + + [CEReactions, SetterThrows] + attribute DOMString? ariaValueMax; + + [CEReactions, SetterThrows] + attribute DOMString? ariaValueMin; + + [CEReactions, SetterThrows] + attribute DOMString? ariaValueNow; + + [CEReactions, SetterThrows] + attribute DOMString? ariaValueText; +}; diff --git a/dom/webidl/AbortController.webidl b/dom/webidl/AbortController.webidl index 2b172b7718..1d35d192ca 100644 --- a/dom/webidl/AbortController.webidl +++ b/dom/webidl/AbortController.webidl @@ -7,7 +7,7 @@ * https://dom.spec.whatwg.org/#abortcontroller */ -[Exposed=(Window,Worker)] +[Exposed=*] interface AbortController { [Throws] constructor(); diff --git a/dom/webidl/AccessibilityRole.webidl b/dom/webidl/AccessibilityRole.webidl deleted file mode 100644 index 3e47e3180d..0000000000 --- a/dom/webidl/AccessibilityRole.webidl +++ /dev/null @@ -1,16 +0,0 @@ -/* -*- 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://rawgit.com/w3c/aria/master/#AccessibilityRole - * - * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C - * liability, trademark and document use rules apply. - */ - -interface mixin AccessibilityRole { - [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] - attribute DOMString? role; -}; diff --git a/dom/webidl/AddonManager.webidl b/dom/webidl/AddonManager.webidl index d392b90fb9..fc94228954 100644 --- a/dom/webidl/AddonManager.webidl +++ b/dom/webidl/AddonManager.webidl @@ -35,9 +35,9 @@ interface Addon { [ChromeOnly, JSImplementation="dummy", Exposed=Window] interface AddonInstall : EventTarget { - // One of the STATE_* symbols from AddonManager.jsm + // One of the STATE_* symbols from AddonManager.sys.mjs readonly attribute DOMString state; - // One of the ERROR_* symbols from AddonManager.jsm, or null + // One of the ERROR_* symbols from AddonManager.sys.mjs, or null readonly attribute DOMString? error; // How many bytes have been downloaded readonly attribute long long progress; diff --git a/dom/webidl/AriaAttributes.webidl b/dom/webidl/AriaAttributes.webidl deleted file mode 100644 index f6c34f01dc..0000000000 --- a/dom/webidl/AriaAttributes.webidl +++ /dev/null @@ -1,136 +0,0 @@ -/* -*- 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://rawgit.com/w3c/aria/master/#AriaAttributes - * - * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C - * liability, trademark and document use rules apply. - */ - -interface mixin AriaAttributes { - [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] - attribute DOMString? ariaAtomic; - - [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] - attribute DOMString? ariaAutoComplete; - - [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] - attribute DOMString? ariaBusy; - - [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] - attribute DOMString? ariaChecked; - - [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] - attribute DOMString? ariaColCount; - - [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] - attribute DOMString? ariaColIndex; - - [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] - attribute DOMString? ariaColIndexText; - - [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] - attribute DOMString? ariaColSpan; - - [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] - attribute DOMString? ariaCurrent; - - [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] - attribute DOMString? ariaDescription; - - [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] - attribute DOMString? ariaDisabled; - - [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] - attribute DOMString? ariaExpanded; - - [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] - attribute DOMString? ariaHasPopup; - - [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] - attribute DOMString? ariaHidden; - - [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] - attribute DOMString? ariaInvalid; - - [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] - attribute DOMString? ariaKeyShortcuts; - - [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] - attribute DOMString? ariaLabel; - - [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] - attribute DOMString? ariaLevel; - - [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] - attribute DOMString? ariaLive; - - [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] - attribute DOMString? ariaModal; - - [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] - attribute DOMString? ariaMultiLine; - - [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] - attribute DOMString? ariaMultiSelectable; - - [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] - attribute DOMString? ariaOrientation; - - [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] - attribute DOMString? ariaPlaceholder; - - [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] - attribute DOMString? ariaPosInSet; - - [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] - attribute DOMString? ariaPressed; - - [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] - attribute DOMString? ariaReadOnly; - - [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] - attribute DOMString? ariaRelevant; - - [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] - attribute DOMString? ariaRequired; - - [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] - attribute DOMString? ariaRoleDescription; - - [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] - attribute DOMString? ariaRowCount; - - [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] - attribute DOMString? ariaRowIndex; - - [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] - attribute DOMString? ariaRowIndexText; - - [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] - attribute DOMString? ariaRowSpan; - - [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] - attribute DOMString? ariaSelected; - - [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] - attribute DOMString? ariaSetSize; - - [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] - attribute DOMString? ariaSort; - - [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] - attribute DOMString? ariaValueMax; - - [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] - attribute DOMString? ariaValueMin; - - [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] - attribute DOMString? ariaValueNow; - - [Pref="accessibility.ARIAReflection.enabled", CEReactions, SetterThrows] - attribute DOMString? ariaValueText; -}; diff --git a/dom/webidl/AudioData.webidl b/dom/webidl/AudioData.webidl new file mode 100644 index 0000000000..e413e93971 --- /dev/null +++ b/dom/webidl/AudioData.webidl @@ -0,0 +1,63 @@ +/* -*- 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://w3c.github.io/webcodecs/#audiodata + */ + +// [Serializable, Transferable] are implemented without adding attributes here, +// but directly with {Read,Write}StructuredClone and Transfer/FromTransfered. +[Exposed=(Window,DedicatedWorker), Pref="dom.media.webcodecs.enabled"] +interface AudioData { + [Throws] + constructor(AudioDataInit init); + + readonly attribute AudioSampleFormat? format; + readonly attribute float sampleRate; + readonly attribute unsigned long numberOfFrames; + readonly attribute unsigned long numberOfChannels; + readonly attribute unsigned long long duration; // microseconds + readonly attribute long long timestamp; // microseconds + + [Throws] + unsigned long allocationSize(AudioDataCopyToOptions options); + [Throws] + undefined copyTo( + // bug 1696216: Should be `copyTo(AllowSharedBufferSource destination, ...)` + ([AllowShared] ArrayBufferView or [AllowShared] ArrayBuffer) destination, + AudioDataCopyToOptions options); + [Throws] + AudioData clone(); + undefined close(); +}; + +dictionary AudioDataInit { + required AudioSampleFormat format; + required float sampleRate; + required [EnforceRange] unsigned long numberOfFrames; + required [EnforceRange] unsigned long numberOfChannels; + required [EnforceRange] long long timestamp; // microseconds + // bug 1696216: Should be AllowSharedBufferSource + required ([AllowShared] ArrayBufferView or [AllowShared] ArrayBuffer) data; + sequence<ArrayBuffer> transfer = []; +}; + +enum AudioSampleFormat { + "u8", + "s16", + "s32", + "f32", + "u8-planar", + "s16-planar", + "s32-planar", + "f32-planar", +}; + +dictionary AudioDataCopyToOptions { + required [EnforceRange] unsigned long planeIndex; + [EnforceRange] unsigned long frameOffset = 0; + [EnforceRange] unsigned long frameCount; + AudioSampleFormat format; +}; diff --git a/dom/webidl/AudioDecoder.webidl b/dom/webidl/AudioDecoder.webidl new file mode 100644 index 0000000000..55cfe8e5e3 --- /dev/null +++ b/dom/webidl/AudioDecoder.webidl @@ -0,0 +1,53 @@ +/* -*- 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://w3c.github.io/webcodecs/#audiodecoder + */ + +[Exposed=(Window,DedicatedWorker), SecureContext, Pref="dom.media.webcodecs.enabled"] +interface AudioDecoder : EventTarget { + [Throws] + constructor(AudioDecoderInit init); + + readonly attribute CodecState state; + readonly attribute unsigned long decodeQueueSize; + attribute EventHandler ondequeue; + + [Throws] + undefined configure(AudioDecoderConfig config); + [Throws] + undefined decode(EncodedAudioChunk chunk); + [NewObject, Throws] + Promise<undefined> flush(); + [Throws] + undefined reset(); + [Throws] + undefined close(); + + [NewObject, Throws] + static Promise<AudioDecoderSupport> isConfigSupported(AudioDecoderConfig config); +}; + +dictionary AudioDecoderInit { + required AudioDataOutputCallback output; + required WebCodecsErrorCallback error; +}; + +callback AudioDataOutputCallback = undefined(AudioData output); + +dictionary AudioDecoderSupport { + boolean supported; + AudioDecoderConfig config; +}; + +dictionary AudioDecoderConfig { + required DOMString codec; + required [EnforceRange] unsigned long sampleRate; + required [EnforceRange] unsigned long numberOfChannels; + + // Bug 1696216: Should be AllowSharedBufferSource + ([AllowShared] ArrayBufferView or [AllowShared] ArrayBuffer) description; +}; diff --git a/dom/webidl/CSSStyleDeclaration.webidl b/dom/webidl/CSSStyleDeclaration.webidl index 76050b75a0..8e38957412 100644 --- a/dom/webidl/CSSStyleDeclaration.webidl +++ b/dom/webidl/CSSStyleDeclaration.webidl @@ -21,6 +21,9 @@ interface CSSStyleDeclaration { [Throws, ChromeOnly] sequence<UTF8String> getCSSImageURLs(UTF8String property); + [ChromeOnly] + readonly attribute float usedFontSize; + UTF8String getPropertyValue(UTF8String property); UTF8String getPropertyPriority(UTF8String property); [CEReactions, NeedsSubjectPrincipal=NonSystem, Throws] diff --git a/dom/webidl/CanvasRenderingContext2D.webidl b/dom/webidl/CanvasRenderingContext2D.webidl index c89c098928..d6c27d91b5 100644 --- a/dom/webidl/CanvasRenderingContext2D.webidl +++ b/dom/webidl/CanvasRenderingContext2D.webidl @@ -151,6 +151,7 @@ interface mixin CanvasState { undefined save(); // push state on state stack undefined restore(); // pop state stack and restore state undefined reset(); // reset the rendering context to its default state + boolean isContextLost(); // return whether context is lost }; interface mixin CanvasTransform { diff --git a/dom/webidl/Console.webidl b/dom/webidl/Console.webidl index 1f43ee19b6..68d86925d1 100644 --- a/dom/webidl/Console.webidl +++ b/dom/webidl/Console.webidl @@ -14,7 +14,7 @@ namespace console { // NOTE: if you touch this namespace, remember to update the ConsoleInstance - // interface as well! + // interface as well! - dom/chrome-webidl/ConsoleInstance.webidl // Logging [UseCounter] @@ -78,173 +78,3 @@ namespace console { [ChromeOnly, NewObject] ConsoleInstance createInstance(optional ConsoleInstanceOptions options = {}); }; - -// This is used to propagate console events to the observers. -[GenerateConversionToJS] -dictionary ConsoleEvent { - (unsigned long long or DOMString) ID; - (unsigned long long or DOMString) innerID; - DOMString consoleID = ""; - DOMString addonId = ""; - DOMString level = ""; - DOMString filename = ""; - // Unique identifier within the process for the script source this event is - // associated with, or zero. - unsigned long sourceId = 0; - unsigned long lineNumber = 0; - unsigned long columnNumber = 0; - DOMString functionName = ""; - double timeStamp = 0; - double microSecondTimeStamp = 0; - sequence<any> arguments; - sequence<DOMString?> styles; - boolean private = false; - // stacktrace is handled via a getter in some cases so we can construct it - // lazily. Note that we're not making this whole thing an interface because - // consumers expect to see own properties on it, which would mean making the - // props unforgeable, which means lots of JSFunction allocations. Maybe we - // should fix those consumers, of course.... - // sequence<ConsoleStackEntry> stacktrace; - DOMString groupName = ""; - any timer = null; - any counter = null; - DOMString prefix = ""; - boolean chromeContext = false; -}; - -// Event for profile operations -[GenerateConversionToJS] -dictionary ConsoleProfileEvent { - DOMString action = ""; - sequence<any> arguments; - boolean chromeContext = false; -}; - -// This dictionary is used to manage stack trace data. -[GenerateConversionToJS] -dictionary ConsoleStackEntry { - DOMString filename = ""; - // Unique identifier within the process for the script source this entry is - // associated with, or zero. - unsigned long sourceId = 0; - unsigned long lineNumber = 0; - unsigned long columnNumber = 0; - DOMString functionName = ""; - DOMString? asyncCause; -}; - -[GenerateConversionToJS] -dictionary ConsoleTimerStart { - DOMString name = ""; -}; - -[GenerateConversionToJS] -dictionary ConsoleTimerLogOrEnd { - DOMString name = ""; - double duration = 0; -}; - -[GenerateConversionToJS] -dictionary ConsoleTimerError { - DOMString error = ""; - DOMString name = ""; -}; - -[GenerateConversionToJS] -dictionary ConsoleCounter { - DOMString label = ""; - unsigned long count = 0; -}; - -[GenerateConversionToJS] -dictionary ConsoleCounterError { - DOMString label = ""; - DOMString error = ""; -}; - -[ChromeOnly, - Exposed=(Window,Worker,WorkerDebugger,Worklet)] -// This is basically a copy of the console namespace. -interface ConsoleInstance { - // Logging - undefined assert(optional boolean condition = false, any... data); - undefined clear(); - undefined count(optional DOMString label = "default"); - undefined countReset(optional DOMString label = "default"); - undefined debug(any... data); - undefined error(any... data); - undefined info(any... data); - undefined log(any... data); - undefined table(any... data); // FIXME: The spec is still unclear about this. - undefined trace(any... data); - undefined warn(any... data); - undefined dir(any... data); // FIXME: This doesn't follow the spec yet. - undefined dirxml(any... data); - - // Grouping - undefined group(any... data); - undefined groupCollapsed(any... data); - undefined groupEnd(); - - // Timing - undefined time(optional DOMString label = "default"); - undefined timeLog(optional DOMString label = "default", any... data); - undefined timeEnd(optional DOMString label = "default"); - - // Mozilla only or Webcompat methods - - undefined _exception(any... data); - undefined timeStamp(optional any data); - - undefined profile(any... data); - undefined profileEnd(any... data); - - // Returns true if the given level would log a message. Used for avoiding - // long/significant processing when logging messages. - boolean shouldLog(ConsoleLogLevel level); -}; - -callback ConsoleInstanceDumpCallback = undefined (DOMString message); - -enum ConsoleLogLevel { - "All", "Debug", "Log", "Info", "Clear", "Trace", "TimeLog", "TimeEnd", "Time", - "Group", "GroupEnd", "Profile", "ProfileEnd", "Dir", "Dirxml", "Warn", "Error", - "Off" -}; - -dictionary ConsoleInstanceOptions { - // An optional function to intercept all strings written to stdout. - ConsoleInstanceDumpCallback dump; - - // An optional prefix string to be printed before the actual logged message. - DOMString prefix = ""; - - // An ID representing the source of the message. Normally the inner ID of a - // DOM window. - DOMString innerID = ""; - - // String identified for the console, this will be passed through the console - // notifications. - DOMString consoleID = ""; - - // Identifier that allows to filter which messages are logged based on their - // log level. - ConsoleLogLevel maxLogLevel; - - // String pref name which contains the level to use for maxLogLevel. If the - // pref doesn't exist, gets removed or it is used in workers, the maxLogLevel - // will default to the value passed to this constructor (or "all" if it wasn't - // specified). - DOMString maxLogLevelPref = ""; -}; - -enum ConsoleLevel { "log", "warning", "error" }; - -// this interface is just for testing -partial interface ConsoleInstance { - [ChromeOnly] - undefined reportForServiceWorkerScope(DOMString scope, DOMString message, - DOMString filename, unsigned long lineNumber, - unsigned long columnNumber, - ConsoleLevel level); -}; diff --git a/dom/webidl/DOMRequest.webidl b/dom/webidl/DOMRequest.webidl deleted file mode 100644 index 606b33b02f..0000000000 --- a/dom/webidl/DOMRequest.webidl +++ /dev/null @@ -1,32 +0,0 @@ -/* -*- 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/. */ - -enum DOMRequestReadyState { "pending", "done" }; - -[Exposed=(Window,Worker)] -interface mixin DOMRequestShared { - readonly attribute DOMRequestReadyState readyState; - - readonly attribute any result; - readonly attribute DOMException? error; - - attribute EventHandler onsuccess; - attribute EventHandler onerror; -}; - -[Pref="dom.domrequest.enabled", Exposed=(Window,Worker)] -interface DOMRequest : EventTarget { - // The [TreatNonCallableAsNull] annotation is required since then() should do - // nothing instead of throwing errors when non-callable arguments are passed. - // See documentation for Promise.then to see why we return "any". - [NewObject, Throws] - any then([TreatNonCallableAsNull] optional AnyCallback? fulfillCallback = null, - [TreatNonCallableAsNull] optional AnyCallback? rejectCallback = null); - - [ChromeOnly] - undefined fireDetailedError(DOMException aError); -}; - -DOMRequest includes DOMRequestShared; diff --git a/dom/webidl/Element.webidl b/dom/webidl/Element.webidl index 75d07995fb..32cb1dd30b 100644 --- a/dom/webidl/Element.webidl +++ b/dom/webidl/Element.webidl @@ -311,8 +311,7 @@ Element includes NonDocumentTypeChildNode; Element includes ParentNode; Element includes Animatable; Element includes GeometryUtils; -Element includes AccessibilityRole; -Element includes AriaAttributes; +Element includes ARIAMixin; // https://fullscreen.spec.whatwg.org/#api partial interface Element { diff --git a/dom/webidl/ElementInternals.webidl b/dom/webidl/ElementInternals.webidl index 175d0e4e1c..4b86e73060 100644 --- a/dom/webidl/ElementInternals.webidl +++ b/dom/webidl/ElementInternals.webidl @@ -63,8 +63,7 @@ partial interface ElementInternals { readonly attribute HTMLElement? validationAnchor; }; -ElementInternals includes AccessibilityRole; -ElementInternals includes AriaAttributes; +ElementInternals includes ARIAMixin; dictionary ValidityStateFlags { boolean valueMissing = false; diff --git a/dom/webidl/EncodedAudioChunk.webidl b/dom/webidl/EncodedAudioChunk.webidl new file mode 100644 index 0000000000..bf4c44e47d --- /dev/null +++ b/dom/webidl/EncodedAudioChunk.webidl @@ -0,0 +1,38 @@ +/* -*- 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://w3c.github.io/webcodecs/#encodedaudiochunk + */ + +// [Serializable] is implemented without adding attribute here. +[Exposed=(Window,DedicatedWorker), Pref="dom.media.webcodecs.enabled"] +interface EncodedAudioChunk { + [Throws] + constructor(EncodedAudioChunkInit init); + readonly attribute EncodedAudioChunkType type; + readonly attribute long long timestamp; // microseconds + readonly attribute unsigned long long? duration; // microseconds + readonly attribute unsigned long byteLength; + + [Throws] + undefined copyTo( + // bug 1696216: Should be `copyTo(AllowSharedBufferSource destination, ...)` + ([AllowShared] ArrayBufferView or [AllowShared] ArrayBuffer) destination); +}; + +dictionary EncodedAudioChunkInit { + required EncodedAudioChunkType type; + required [EnforceRange] long long timestamp; // microseconds + [EnforceRange] unsigned long long duration; // microseconds + // bug 1696216: Should be AllowSharedBufferSource + required ([AllowShared] ArrayBufferView or [AllowShared] ArrayBuffer) data; + sequence<ArrayBuffer> transfer = []; +}; + +enum EncodedAudioChunkType { + "key", + "delta" +}; diff --git a/dom/webidl/EventHandler.webidl b/dom/webidl/EventHandler.webidl index 439ac79e5d..c88e4f0422 100644 --- a/dom/webidl/EventHandler.webidl +++ b/dom/webidl/EventHandler.webidl @@ -39,7 +39,9 @@ interface mixin GlobalEventHandlers { attribute EventHandler onchange; attribute EventHandler onclick; attribute EventHandler onclose; + attribute EventHandler oncontextlost; attribute EventHandler oncontextmenu; + attribute EventHandler oncontextrestored; attribute EventHandler oncopy; attribute EventHandler oncuechange; attribute EventHandler oncut; diff --git a/dom/webidl/Gamepad.webidl b/dom/webidl/Gamepad.webidl index a8ec894441..e730d070ee 100644 --- a/dom/webidl/Gamepad.webidl +++ b/dom/webidl/Gamepad.webidl @@ -10,8 +10,7 @@ */ [Pref="dom.gamepad.enabled", - Exposed=Window, - SecureContext] + Exposed=Window] interface GamepadButton { readonly attribute boolean pressed; readonly attribute boolean touched; @@ -35,8 +34,7 @@ enum GamepadMappingType { }; [Pref="dom.gamepad.enabled", - Exposed=Window, - SecureContext] + Exposed=Window] interface Gamepad { /** * An identifier, unique per type of device. diff --git a/dom/webidl/GamepadAxisMoveEvent.webidl b/dom/webidl/GamepadAxisMoveEvent.webidl index 6ccdeabf71..24f16568f2 100644 --- a/dom/webidl/GamepadAxisMoveEvent.webidl +++ b/dom/webidl/GamepadAxisMoveEvent.webidl @@ -5,7 +5,7 @@ */ [Pref="dom.gamepad.non_standard_events.enabled", - Exposed=Window, SecureContext] + Exposed=Window] interface GamepadAxisMoveEvent : GamepadEvent { constructor(DOMString type, diff --git a/dom/webidl/GamepadButtonEvent.webidl b/dom/webidl/GamepadButtonEvent.webidl index 02bc4fb010..47d71107f0 100644 --- a/dom/webidl/GamepadButtonEvent.webidl +++ b/dom/webidl/GamepadButtonEvent.webidl @@ -5,8 +5,7 @@ */ [Pref="dom.gamepad.non_standard_events.enabled", - Exposed=Window, - SecureContext] + Exposed=Window] interface GamepadButtonEvent : GamepadEvent { constructor(DOMString type, diff --git a/dom/webidl/GamepadEvent.webidl b/dom/webidl/GamepadEvent.webidl index be2ad9ec10..0189050093 100644 --- a/dom/webidl/GamepadEvent.webidl +++ b/dom/webidl/GamepadEvent.webidl @@ -8,8 +8,7 @@ */ [Pref="dom.gamepad.enabled", - Exposed=Window, - SecureContext] + Exposed=Window] interface GamepadEvent : Event { constructor(DOMString type, optional GamepadEventInit eventInitDict = {}); diff --git a/dom/webidl/GamepadHapticActuator.webidl b/dom/webidl/GamepadHapticActuator.webidl index 9975b7ab85..0f3c8e0553 100644 --- a/dom/webidl/GamepadHapticActuator.webidl +++ b/dom/webidl/GamepadHapticActuator.webidl @@ -13,8 +13,7 @@ enum GamepadHapticActuatorType { [Pref="dom.gamepad.extensions.enabled", HeaderFile="mozilla/dom/GamepadHapticActuator.h", - Exposed=Window, - SecureContext] + Exposed=Window] interface GamepadHapticActuator { readonly attribute GamepadHapticActuatorType type; diff --git a/dom/webidl/GamepadLightIndicator.webidl b/dom/webidl/GamepadLightIndicator.webidl index 2c447439c8..c421c230bb 100644 --- a/dom/webidl/GamepadLightIndicator.webidl +++ b/dom/webidl/GamepadLightIndicator.webidl @@ -18,7 +18,7 @@ dictionary GamepadLightColor { required octet blue; }; -[SecureContext, Pref="dom.gamepad.extensions.lightindicator", +[Pref="dom.gamepad.extensions.lightindicator", Exposed=Window] interface GamepadLightIndicator { diff --git a/dom/webidl/GamepadPose.webidl b/dom/webidl/GamepadPose.webidl index 4de822e7a7..055df15930 100644 --- a/dom/webidl/GamepadPose.webidl +++ b/dom/webidl/GamepadPose.webidl @@ -8,8 +8,7 @@ */ [Pref="dom.gamepad.extensions.enabled", - Exposed=Window, - SecureContext] + Exposed=Window] interface GamepadPose { readonly attribute boolean hasOrientation; diff --git a/dom/webidl/GamepadTouch.webidl b/dom/webidl/GamepadTouch.webidl index a9c84edcbd..07e231d29d 100644 --- a/dom/webidl/GamepadTouch.webidl +++ b/dom/webidl/GamepadTouch.webidl @@ -7,7 +7,7 @@ * https://github.com/knyg/gamepad/blob/multitouch/extensions.html */ -[SecureContext, Pref="dom.gamepad.extensions.multitouch", +[Pref="dom.gamepad.extensions.multitouch", Exposed=Window] interface GamepadTouch { readonly attribute unsigned long touchId; diff --git a/dom/webidl/GleanMetrics.webidl b/dom/webidl/GleanMetrics.webidl index fc2697851d..47dc3262f1 100644 --- a/dom/webidl/GleanMetrics.webidl +++ b/dom/webidl/GleanMetrics.webidl @@ -111,6 +111,7 @@ interface GleanCounter : GleanMetric { dictionary GleanDistributionData { required unsigned long long sum; + required unsigned long long count; required record<UTF8String, unsigned long long> values; }; @@ -642,3 +643,35 @@ interface GleanText : GleanMetric { [Throws, ChromeOnly] UTF8String? testGetValue(optional UTF8String aPingName = ""); }; + +[Func="nsGlobalWindowInner::IsGleanNeeded", Exposed=Window] +interface GleanObject : GleanMetric { + /** + * Set to the specified object. + * + * The structure of the metric is validated against the predefined structure. + * + * @param object The object to set the metric to. + */ + undefined set(object value); + + /** + * **Test-only API** + * + * Gets the currently stored value as an object. + * + * This function will attempt to await the last parent-process task (if any) + * writing to the the metric's storage engine before returning a value. + * This function will not wait for data from child processes. + * + * This doesn't clear the stored value. + * Parent process only. Panics in child processes. + * + * @param aPingName The (optional) name of the ping to retrieve the metric + * for. Defaults to the first value in `send_in_pings`. + * + * @return value of the stored metric, or undefined if there is no value. + */ + [Throws, ChromeOnly] + object? testGetValue(optional UTF8String aPingName = ""); +}; diff --git a/dom/webidl/HTMLImageElement.webidl b/dom/webidl/HTMLImageElement.webidl index 1495d25f74..c57727bd51 100644 --- a/dom/webidl/HTMLImageElement.webidl +++ b/dom/webidl/HTMLImageElement.webidl @@ -43,6 +43,8 @@ interface HTMLImageElement : HTMLElement { attribute DOMString decoding; [CEReactions, SetterThrows] attribute DOMString loading; + [Pref="network.fetchpriority.enabled", CEReactions] + attribute DOMString fetchPriority; readonly attribute unsigned long naturalWidth; readonly attribute unsigned long naturalHeight; readonly attribute boolean complete; diff --git a/dom/webidl/HTMLTemplateElement.webidl b/dom/webidl/HTMLTemplateElement.webidl index ce71a51fe5..526a3427a8 100644 --- a/dom/webidl/HTMLTemplateElement.webidl +++ b/dom/webidl/HTMLTemplateElement.webidl @@ -16,6 +16,8 @@ interface HTMLTemplateElement : HTMLElement { readonly attribute DocumentFragment content; [CEReactions, Pref="dom.webcomponents.shadowdom.declarative.enabled"] attribute DOMString shadowRootMode; - [CEReactions, Pref="dom.webcomponents.shadowdom.declarative.enabled"] + [CEReactions, SetterThrows, Pref="dom.webcomponents.shadowdom.declarative.enabled"] attribute boolean shadowRootDelegatesFocus; + [CEReactions, SetterThrows, Pref="dom.webcomponents.shadowdom.declarative.enabled"] + attribute boolean shadowRootClonable; }; diff --git a/dom/webidl/Navigator.webidl b/dom/webidl/Navigator.webidl index 935ffdabec..3546a31bee 100644 --- a/dom/webidl/Navigator.webidl +++ b/dom/webidl/Navigator.webidl @@ -211,7 +211,7 @@ partial interface Navigator { // https://dvcs.w3.org/hg/gamepad/raw-file/default/gamepad.html#navigator-interface-extension partial interface Navigator { - [Throws, Pref="dom.gamepad.enabled", SecureContext] + [Throws, Pref="dom.gamepad.enabled"] sequence<Gamepad?> getGamepads(); }; partial interface Navigator { diff --git a/dom/webidl/RTCDtlsTransport.webidl b/dom/webidl/RTCDtlsTransport.webidl index 0b2f095ab6..99b70af470 100644 --- a/dom/webidl/RTCDtlsTransport.webidl +++ b/dom/webidl/RTCDtlsTransport.webidl @@ -18,6 +18,7 @@ enum RTCDtlsTransportState { [Pref="media.peerconnection.enabled", Exposed=Window] interface RTCDtlsTransport : EventTarget { + [SameObject] readonly attribute RTCIceTransport iceTransport; readonly attribute RTCDtlsTransportState state; attribute EventHandler onstatechange; }; diff --git a/dom/webidl/RTCIceTransport.webidl b/dom/webidl/RTCIceTransport.webidl new file mode 100644 index 0000000000..35a1c74018 --- /dev/null +++ b/dom/webidl/RTCIceTransport.webidl @@ -0,0 +1,43 @@ +/* -*- 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://w3c.github.io/webrtc-pc/#dom-rtcicetransport + */ + +enum RTCIceTransportState { + "closed", + "failed", + "disconnected", + "new", + "checking", + "completed", + "connected" +}; + +enum RTCIceGathererState { + "new", + "gathering", + "complete" +}; + +[Exposed=Window] +interface RTCIceTransport : EventTarget { + // TODO(bug 1307994) + // readonly attribute RTCIceRole role; + // readonly attribute RTCIceComponent component; + readonly attribute RTCIceTransportState state; + readonly attribute RTCIceGathererState gatheringState; + // TODO(bug 1307994) + // sequence<RTCIceCandidate> getLocalCandidates(); + // sequence<RTCIceCandidate> getRemoteCandidates(); + // RTCIceCandidatePair? getSelectedCandidatePair(); + // RTCIceParameters? getLocalParameters(); + // RTCIceParameters? getRemoteParameters(); + attribute EventHandler onstatechange; + attribute EventHandler ongatheringstatechange; + // TODO(bug 1307994) + // attribute EventHandler onselectedcandidatepairchange; +}; diff --git a/dom/webidl/RTCPeerConnection.webidl b/dom/webidl/RTCPeerConnection.webidl index 8fb908788e..ac3093a848 100644 --- a/dom/webidl/RTCPeerConnection.webidl +++ b/dom/webidl/RTCPeerConnection.webidl @@ -27,13 +27,13 @@ enum RTCIceGatheringState { }; enum RTCIceConnectionState { - "new", - "checking", - "connected", - "completed", - "failed", - "disconnected", - "closed" + "closed", + "failed", + "disconnected", + "new", + "checking", + "completed", + "connected" }; enum RTCPeerConnectionState { @@ -90,8 +90,7 @@ dictionary RTCOfferOptions : RTCOfferAnswerOptions { Exposed=Window] interface RTCPeerConnection : EventTarget { [Throws] - constructor(optional RTCConfiguration configuration = {}, - optional object? constraints); + constructor(optional RTCConfiguration configuration = {}); [Throws, StaticClassOverride="mozilla::dom::RTCCertificate"] static Promise<RTCCertificate> generateCertificate (AlgorithmIdentifier keygenAlgorithm); @@ -99,13 +98,13 @@ interface RTCPeerConnection : EventTarget { undefined setIdentityProvider (DOMString provider, optional RTCIdentityProviderOptions options = {}); Promise<DOMString> getIdentityAssertion(); - Promise<RTCSessionDescriptionInit> createOffer (optional RTCOfferOptions options = {}); - Promise<RTCSessionDescriptionInit> createAnswer (optional RTCAnswerOptions options = {}); - Promise<undefined> setLocalDescription (optional RTCSessionDescriptionInit description = {}); - Promise<undefined> setRemoteDescription (optional RTCSessionDescriptionInit description = {}); + Promise<RTCSessionDescriptionInit> createOffer(optional RTCOfferOptions options = {}); + Promise<RTCSessionDescriptionInit> createAnswer(optional RTCAnswerOptions options = {}); + Promise<undefined> setLocalDescription(optional RTCLocalSessionDescriptionInit description = {}); readonly attribute RTCSessionDescription? localDescription; readonly attribute RTCSessionDescription? currentLocalDescription; readonly attribute RTCSessionDescription? pendingLocalDescription; + Promise<undefined> setRemoteDescription(RTCSessionDescriptionInit description); readonly attribute RTCSessionDescription? remoteDescription; readonly attribute RTCSessionDescription? currentRemoteDescription; readonly attribute RTCSessionDescription? pendingRemoteDescription; @@ -181,21 +180,23 @@ interface RTCPeerConnection : EventTarget { partial interface RTCPeerConnection { - // Dummy Promise<undefined> return values avoid "WebIDL.WebIDLError: error: - // We have overloads with both Promise and non-Promise return types" - - Promise<undefined> createOffer (RTCSessionDescriptionCallback successCallback, - RTCPeerConnectionErrorCallback failureCallback, - optional RTCOfferOptions options = {}); - Promise<undefined> createAnswer (RTCSessionDescriptionCallback successCallback, - RTCPeerConnectionErrorCallback failureCallback); - Promise<undefined> setLocalDescription (RTCSessionDescriptionInit description, + // Legacy Interface Extensions + // Supporting the methods in this section is optional. + // If these methods are supported + // they must be implemented as defined + // in section "Legacy Interface Extensions" + Promise<undefined> createOffer(RTCSessionDescriptionCallback successCallback, + RTCPeerConnectionErrorCallback failureCallback, + optional RTCOfferOptions options = {}); + Promise<undefined> setLocalDescription(RTCLocalSessionDescriptionInit description, + VoidFunction successCallback, + RTCPeerConnectionErrorCallback failureCallback); + Promise<undefined> createAnswer(RTCSessionDescriptionCallback successCallback, + RTCPeerConnectionErrorCallback failureCallback); + Promise<undefined> setRemoteDescription(RTCSessionDescriptionInit description, VoidFunction successCallback, RTCPeerConnectionErrorCallback failureCallback); - Promise<undefined> setRemoteDescription (RTCSessionDescriptionInit description, - VoidFunction successCallback, - RTCPeerConnectionErrorCallback failureCallback); - Promise<undefined> addIceCandidate (RTCIceCandidate candidate, - VoidFunction successCallback, - RTCPeerConnectionErrorCallback failureCallback); + Promise<undefined> addIceCandidate(RTCIceCandidateInit candidate, + VoidFunction successCallback, + RTCPeerConnectionErrorCallback failureCallback); }; diff --git a/dom/webidl/RTCSessionDescription.webidl b/dom/webidl/RTCSessionDescription.webidl index 6cf116ff6e..236d1e147c 100644 --- a/dom/webidl/RTCSessionDescription.webidl +++ b/dom/webidl/RTCSessionDescription.webidl @@ -4,7 +4,7 @@ * You can obtain one at http://mozilla.org/MPL/2.0/. * * The origin of this IDL file is - * http://dev.w3.org/2011/webrtc/editor/webrtc.html#idl-def-RTCSessionDescription + * https://www.w3.org/TR/webrtc/#rtcsessiondescription-class */ enum RTCSdpType { @@ -15,6 +15,11 @@ enum RTCSdpType { }; dictionary RTCSessionDescriptionInit { + required RTCSdpType type; + DOMString sdp = ""; +}; + +dictionary RTCLocalSessionDescriptionInit { RTCSdpType type; DOMString sdp = ""; }; @@ -24,7 +29,7 @@ dictionary RTCSessionDescriptionInit { Exposed=Window] interface RTCSessionDescription { [Throws] - constructor(optional RTCSessionDescriptionInit descriptionInitDict = {}); + constructor(RTCSessionDescriptionInit descriptionInitDict); // These should be readonly, but writing causes deprecation warnings for a bit attribute RTCSdpType type; diff --git a/dom/webidl/Request.webidl b/dom/webidl/Request.webidl index 1aa6be963f..54e4e5ec95 100644 --- a/dom/webidl/Request.webidl +++ b/dom/webidl/Request.webidl @@ -64,6 +64,9 @@ dictionary RequestInit { AbortSignal? signal; + [Pref="network.fetchpriority.enabled"] + RequestPriority priority; + [Pref="dom.fetchObserver.enabled"] ObserverCallback observe; }; diff --git a/dom/webidl/SVGAElement.webidl b/dom/webidl/SVGAElement.webidl index 94363513ea..f2621e9e79 100644 --- a/dom/webidl/SVGAElement.webidl +++ b/dom/webidl/SVGAElement.webidl @@ -29,7 +29,7 @@ interface SVGAElement : SVGGraphicsElement { [SetterThrows] attribute DOMString type; - [Throws] + [Throws, Pref="svg.SVGAElement.text.enabled"] attribute DOMString text; }; diff --git a/dom/webidl/SecurityPolicyViolationEvent.webidl b/dom/webidl/SecurityPolicyViolationEvent.webidl index 5578238347..4366347e14 100644 --- a/dom/webidl/SecurityPolicyViolationEvent.webidl +++ b/dom/webidl/SecurityPolicyViolationEvent.webidl @@ -1,6 +1,10 @@ /* 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/. */ + * You can obtain one at http://mozilla.org/MPL/2.0/. + * + * The origin of this IDL file is + * https://w3c.github.io/webappsec-csp/#violation-events + */ enum SecurityPolicyViolationEventDisposition { @@ -16,15 +20,15 @@ interface SecurityPolicyViolationEvent : Event readonly attribute DOMString documentURI; readonly attribute DOMString referrer; readonly attribute DOMString blockedURI; - readonly attribute DOMString violatedDirective; + readonly attribute DOMString violatedDirective; // historical alias of effectiveDirective readonly attribute DOMString effectiveDirective; readonly attribute DOMString originalPolicy; readonly attribute DOMString sourceFile; readonly attribute DOMString sample; readonly attribute SecurityPolicyViolationEventDisposition disposition; readonly attribute unsigned short statusCode; - readonly attribute long lineNumber; - readonly attribute long columnNumber; + readonly attribute unsigned long lineNumber; + readonly attribute unsigned long columnNumber; }; [GenerateInitFromJSON, GenerateToJSON] @@ -38,8 +42,8 @@ dictionary SecurityPolicyViolationEventInit : EventInit DOMString originalPolicy = ""; DOMString sourceFile = ""; DOMString sample = ""; - SecurityPolicyViolationEventDisposition disposition = "report"; + SecurityPolicyViolationEventDisposition disposition = "enforce"; unsigned short statusCode = 0; - long lineNumber = 0; - long columnNumber = 0; + unsigned long lineNumber = 0; + unsigned long columnNumber = 0; }; diff --git a/dom/webidl/TrustedTypes.webidl b/dom/webidl/TrustedTypes.webidl new file mode 100644 index 0000000000..3b7e35534f --- /dev/null +++ b/dom/webidl/TrustedTypes.webidl @@ -0,0 +1,64 @@ +/* -*- 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://w3c.github.io/trusted-types/dist/spec/>. + */ + +[Exposed=(Window,Worker), Pref="dom.security.trusted_types.enabled"] +interface TrustedHTML { + stringifier; + DOMString toJSON(); +}; + +[Exposed=(Window,Worker), Pref="dom.security.trusted_types.enabled"] +interface TrustedScript { + stringifier; + DOMString toJSON(); +}; + +[Exposed=(Window,Worker), Pref="dom.security.trusted_types.enabled"] +interface TrustedScriptURL { + stringifier; + USVString toJSON(); +}; + +[Exposed=(Window,Worker), Pref="dom.security.trusted_types.enabled"] +interface TrustedTypePolicy { + readonly attribute DOMString name; + [NewObject] TrustedHTML createHTML(DOMString input, any... arguments); + [NewObject] TrustedScript createScript(DOMString input, any... arguments); + [NewObject] TrustedScriptURL createScriptURL(DOMString input, any... arguments); +}; + +dictionary TrustedTypePolicyOptions { + CreateHTMLCallback createHTML; + CreateScriptCallback createScript; + CreateScriptURLCallback createScriptURL; +}; + +callback CreateHTMLCallback = DOMString? (DOMString input, any... arguments); +callback CreateScriptCallback = DOMString? (DOMString input, any... arguments); +callback CreateScriptURLCallback = USVString? (DOMString input, any... arguments); + +[Exposed=(Window,Worker), Pref="dom.security.trusted_types.enabled"] +interface TrustedTypePolicyFactory { + TrustedTypePolicy createPolicy(DOMString policyName , optional TrustedTypePolicyOptions policyOptions = {}); + boolean isHTML(any value); + boolean isScript(any value); + boolean isScriptURL(any value); + [Pure, StoreInSlot] readonly attribute TrustedHTML emptyHTML; + [Pure, StoreInSlot] readonly attribute TrustedScript emptyScript; + DOMString? getAttributeType( + DOMString tagName, + DOMString attribute, + optional DOMString elementNs = "", + optional DOMString attrNs = ""); + DOMString? getPropertyType( + DOMString tagName, + DOMString property, + optional DOMString elementNs = ""); + readonly attribute TrustedTypePolicy? defaultPolicy; +}; diff --git a/dom/webidl/VideoDecoder.webidl b/dom/webidl/VideoDecoder.webidl index 0c8f5c9b5e..e8abb753dc 100644 --- a/dom/webidl/VideoDecoder.webidl +++ b/dom/webidl/VideoDecoder.webidl @@ -45,7 +45,7 @@ dictionary VideoDecoderSupport { dictionary VideoDecoderConfig { required DOMString codec; - // Bug 1696216: Should be 1696216 [AllowShared] BufferSource description; + // Bug 1696216: Should be [AllowShared] BufferSource description; ([AllowShared] ArrayBufferView or [AllowShared] ArrayBuffer) description; [EnforceRange] unsigned long codedWidth; [EnforceRange] unsigned long codedHeight; diff --git a/dom/webidl/WebGPU.webidl b/dom/webidl/WebGPU.webidl index 58e259258d..c01d501542 100644 --- a/dom/webidl/WebGPU.webidl +++ b/dom/webidl/WebGPU.webidl @@ -499,6 +499,8 @@ dictionary GPUTextureBindingLayout { enum GPUStorageTextureAccess { "write-only", + "read-only", + "read-write", }; dictionary GPUStorageTextureBindingLayout { @@ -599,7 +601,7 @@ interface mixin GPUPipelineBase { dictionary GPUProgrammableStage { required GPUShaderModule module; - required USVString entryPoint; + USVString entryPoint; }; //TODO: Serializable diff --git a/dom/webidl/WebXR.webidl b/dom/webidl/WebXR.webidl index 302c82156a..7545ffe728 100644 --- a/dom/webidl/WebXR.webidl +++ b/dom/webidl/WebXR.webidl @@ -27,8 +27,8 @@ enum XRSessionMode { }; dictionary XRSessionInit { - sequence<any> requiredFeatures; - sequence<any> optionalFeatures; + sequence<DOMString> requiredFeatures; + sequence<DOMString> optionalFeatures; }; enum XRVisibilityState { diff --git a/dom/webidl/WindowOrWorkerGlobalScope.webidl b/dom/webidl/WindowOrWorkerGlobalScope.webidl index 5b5f5c61f6..5e3ff86e88 100644 --- a/dom/webidl/WindowOrWorkerGlobalScope.webidl +++ b/dom/webidl/WindowOrWorkerGlobalScope.webidl @@ -85,3 +85,10 @@ partial interface mixin WindowOrWorkerGlobalScope { [Replaceable, Pref="dom.enable_web_task_scheduling", SameObject] readonly attribute Scheduler scheduler; }; + + +// https://w3c.github.io/trusted-types/dist/spec/#extensions-to-the-windoworworkerglobalscope-interface +partial interface mixin WindowOrWorkerGlobalScope { + [Pref="dom.security.trusted_types.enabled"] + readonly attribute TrustedTypePolicyFactory trustedTypes; +}; diff --git a/dom/webidl/moz.build b/dom/webidl/moz.build index 68b42a9c54..3880b727e7 100644 --- a/dom/webidl/moz.build +++ b/dom/webidl/moz.build @@ -13,10 +13,7 @@ with Files("APZTestData.webidl"): with Files("AccessibleNode.webidl"): BUG_COMPONENT = ("Core", "Disability Access APIs") -with Files("AccessibilityRole.webidl"): - BUG_COMPONENT = ("Core", "Disability Access APIs") - -with Files("AriaAttributes.webidl"): +with Files("ARIAMixin.webidl"): BUG_COMPONENT = ("Core", "Disability Access APIs") with Files("Addon*"): @@ -402,7 +399,6 @@ WEBIDL_FILES = [ "AbortSignal.webidl", "AbstractRange.webidl", "AbstractWorker.webidl", - "AccessibilityRole.webidl", "AddonManager.webidl", "AnalyserNode.webidl", "Animatable.webidl", @@ -415,11 +411,13 @@ WEBIDL_FILES = [ "AppInfo.webidl", "AppNotificationServiceOptions.webidl", "APZTestData.webidl", - "AriaAttributes.webidl", + "ARIAMixin.webidl", "Attr.webidl", "AudioBuffer.webidl", "AudioBufferSourceNode.webidl", "AudioContext.webidl", + "AudioData.webidl", + "AudioDecoder.webidl", "AudioDestinationNode.webidl", "AudioListener.webidl", "AudioNode.webidl", @@ -523,7 +521,6 @@ WEBIDL_FILES = [ "DOMQuad.webidl", "DOMRect.webidl", "DOMRectList.webidl", - "DOMRequest.webidl", "DOMStringList.webidl", "DOMStringMap.webidl", "DOMTokenList.webidl", @@ -531,6 +528,7 @@ WEBIDL_FILES = [ "DynamicsCompressorNode.webidl", "Element.webidl", "ElementInternals.webidl", + "EncodedAudioChunk.webidl", "EncodedVideoChunk.webidl", "Event.webidl", "EventHandler.webidl", @@ -978,6 +976,7 @@ WEBIDL_FILES = [ "TransformStreamDefaultController.webidl", "TransitionEvent.webidl", "TreeWalker.webidl", + "TrustedTypes.webidl", "UDPMessageEvent.webidl", "UDPSocket.webidl", "UIEvent.webidl", @@ -1052,6 +1051,7 @@ if CONFIG["MOZ_WEBRTC"]: "RTCEncodedAudioFrame.webidl", "RTCEncodedVideoFrame.webidl", "RTCIceCandidate.webidl", + "RTCIceTransport.webidl", "RTCIdentityAssertion.webidl", "RTCIdentityProvider.webidl", "RTCPeerConnection.webidl", |