summaryrefslogtreecommitdiffstats
path: root/dom/webidl
diff options
context:
space:
mode:
Diffstat (limited to 'dom/webidl')
-rw-r--r--dom/webidl/AudioEncoder.webidl80
-rw-r--r--dom/webidl/CSSPageRule.webidl4
-rw-r--r--dom/webidl/CSSScopeRule.webidl14
-rw-r--r--dom/webidl/CSSStartingStyleRule.webidl12
-rw-r--r--dom/webidl/Document.webidl27
-rw-r--r--dom/webidl/DocumentFragment.webidl14
-rw-r--r--dom/webidl/Element.webidl23
-rw-r--r--dom/webidl/FragmentDirective.webidl11
-rw-r--r--dom/webidl/GleanMetrics.webidl10
-rw-r--r--dom/webidl/HTMLHyperlinkElementUtils.webidl22
-rw-r--r--dom/webidl/HTMLMarqueeElement.webidl4
-rw-r--r--dom/webidl/HashChangeEvent.webidl6
-rw-r--r--dom/webidl/IDBDatabase.webidl10
-rw-r--r--dom/webidl/IDBFactory.webidl7
-rw-r--r--dom/webidl/IDBTransaction.webidl4
-rw-r--r--dom/webidl/IdentityCredential.webidl6
-rw-r--r--dom/webidl/MediaDebugInfo.webidl3
-rw-r--r--dom/webidl/MutationEvent.webidl2
-rw-r--r--dom/webidl/NonElementParentNode.webidl12
-rw-r--r--dom/webidl/ParentNode.webidl5
-rw-r--r--dom/webidl/RTCIceCandidate.webidl49
-rw-r--r--dom/webidl/RTCStatsReport.webidl7
-rw-r--r--dom/webidl/Range.webidl9
-rw-r--r--dom/webidl/Request.webidl23
-rw-r--r--dom/webidl/Response.webidl4
-rw-r--r--dom/webidl/Selection.webidl5
-rw-r--r--dom/webidl/Storage.webidl3
-rw-r--r--dom/webidl/TextEvent.webidl21
-rw-r--r--dom/webidl/TrustedTypes.webidl7
-rw-r--r--dom/webidl/URL.webidl37
-rw-r--r--dom/webidl/URLSearchParams.webidl18
-rw-r--r--dom/webidl/XMLHttpRequest.webidl7
-rw-r--r--dom/webidl/moz.build14
33 files changed, 353 insertions, 127 deletions
diff --git a/dom/webidl/AudioEncoder.webidl b/dom/webidl/AudioEncoder.webidl
new file mode 100644
index 0000000000..e3800c83f1
--- /dev/null
+++ b/dom/webidl/AudioEncoder.webidl
@@ -0,0 +1,80 @@
+/* -*- 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/#audioencoder
+
+ * Some members of this API are codec-specific, in which case the source of the
+ * IDL are in the codec-specific registry entries, that are listed in
+ * https://w3c.github.io/webcodecs/codec_registry.html. Those members are
+ * commented with a link of the document in which the member is listed.
+ */
+
+dictionary AudioEncoderSupport {
+ boolean supported;
+ AudioEncoderConfig config;
+};
+
+dictionary AudioEncoderConfig {
+ required DOMString codec;
+ [EnforceRange] unsigned long sampleRate;
+ [EnforceRange] unsigned long numberOfChannels;
+ [EnforceRange] unsigned long long bitrate;
+ BitrateMode bitrateMode = "variable";
+ OpusEncoderConfig opus;
+};
+
+// Opus specific configuration options:
+// https://w3c.github.io/webcodecs/opus_codec_registration.html
+enum OpusBitstreamFormat {
+ "opus",
+ "ogg",
+};
+
+dictionary OpusEncoderConfig {
+ OpusBitstreamFormat format = "opus";
+ [EnforceRange] unsigned long long frameDuration = 20000;
+ [EnforceRange] unsigned long complexity;
+ [EnforceRange] unsigned long packetlossperc = 0;
+ boolean useinbandfec = false;
+ boolean usedtx = false;
+};
+
+[Exposed=(Window,DedicatedWorker), SecureContext, Pref="dom.media.webcodecs.enabled"]
+interface AudioEncoder : EventTarget {
+ [Throws]
+ constructor(AudioEncoderInit init);
+
+ readonly attribute CodecState state;
+ readonly attribute unsigned long encodeQueueSize;
+ attribute EventHandler ondequeue;
+
+ [Throws]
+ undefined configure(AudioEncoderConfig config);
+ [Throws, BinaryName="AudioEncoder::EncodeAudioData"]
+ undefined encode(AudioData data);
+ [Throws]
+ Promise<undefined> flush();
+ [Throws]
+ undefined reset();
+ [Throws]
+ undefined close();
+
+ [NewObject, Throws]
+ static Promise<AudioEncoderSupport> isConfigSupported(AudioEncoderConfig config);
+};
+
+dictionary AudioEncoderInit {
+ required EncodedAudioChunkOutputCallback output;
+ required WebCodecsErrorCallback error;
+};
+
+callback EncodedAudioChunkOutputCallback =
+ undefined (EncodedAudioChunk output,
+ optional EncodedAudioChunkMetadata metadata = {});
+
+dictionary EncodedAudioChunkMetadata {
+ AudioDecoderConfig decoderConfig;
+};
diff --git a/dom/webidl/CSSPageRule.webidl b/dom/webidl/CSSPageRule.webidl
index afc999a7ee..2be3f8a66f 100644
--- a/dom/webidl/CSSPageRule.webidl
+++ b/dom/webidl/CSSPageRule.webidl
@@ -8,10 +8,8 @@
*/
// https://drafts.csswg.org/cssom/#the-csspagerule-interface
-// Per spec, this should inherit from CSSGroupingRule, but we don't
-// implement this yet.
[Exposed=Window]
-interface CSSPageRule : CSSRule {
+interface CSSPageRule : CSSGroupingRule {
attribute UTF8String selectorText;
[SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style;
};
diff --git a/dom/webidl/CSSScopeRule.webidl b/dom/webidl/CSSScopeRule.webidl
new file mode 100644
index 0000000000..009209beaf
--- /dev/null
+++ b/dom/webidl/CSSScopeRule.webidl
@@ -0,0 +1,14 @@
+/* -*- 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://drafts.csswg.org/css-cascade-6/#the-cssscoperule-interface
+ */
+
+[Exposed=Window, Pref="layout.css.at-scope.enabled"]
+interface CSSScopeRule : CSSGroupingRule {
+ readonly attribute UTF8String? start;
+ readonly attribute UTF8String? end;
+};
diff --git a/dom/webidl/CSSStartingStyleRule.webidl b/dom/webidl/CSSStartingStyleRule.webidl
new file mode 100644
index 0000000000..10a1f54377
--- /dev/null
+++ b/dom/webidl/CSSStartingStyleRule.webidl
@@ -0,0 +1,12 @@
+/* -*- 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://drafts.csswg.org/css-transitions-2/#the-cssstartingstylerule-interface
+ */
+
+[Exposed=Window, Pref="layout.css.starting-style-at-rules.enabled"]
+interface CSSStartingStyleRule : CSSGroupingRule {
+};
diff --git a/dom/webidl/Document.webidl b/dom/webidl/Document.webidl
index c82710bf8f..0b878da9ab 100644
--- a/dom/webidl/Document.webidl
+++ b/dom/webidl/Document.webidl
@@ -13,6 +13,7 @@
* https://drafts.csswg.org/cssom/#extensions-to-the-document-interface
* https://drafts.csswg.org/cssom-view/#extensions-to-the-document-interface
* https://wicg.github.io/feature-policy/#policy
+ * https://wicg.github.io/scroll-to-text-fragment/#feature-detectability
*/
interface ContentSecurityPolicy;
@@ -98,8 +99,6 @@ interface Document : Node {
HTMLCollection getElementsByTagNameNS(DOMString? namespace, DOMString localName);
[Pure]
HTMLCollection getElementsByClassName(DOMString classNames);
- [Pure]
- Element? getElementById(DOMString elementId);
// These DOM methods cannot be accessed by UA Widget scripts
// because the DOM element reflectors will be in the content scope,
@@ -156,7 +155,7 @@ partial interface Document {
[PutForwards=href, LegacyUnforgeable] readonly attribute Location? location;
[SetterThrows] attribute DOMString domain;
- readonly attribute DOMString referrer;
+ readonly attribute UTF8String referrer;
[Throws] attribute DOMString cookie;
readonly attribute DOMString lastModified;
readonly attribute DOMString readyState;
@@ -387,17 +386,6 @@ partial interface Document {
readonly attribute Element? scrollingElement;
};
-// http://dev.w3.org/2006/webapi/selectors-api2/#interface-definitions
-partial interface Document {
- [Throws, Pure]
- Element? querySelector(UTF8String selectors);
- [Throws, Pure]
- NodeList querySelectorAll(UTF8String selectors);
-
- //(Not implemented)Element? find(DOMString selectors, optional (Element or sequence<Node>)? refNodes);
- //(Not implemented)NodeList findAll(DOMString selectors, optional (Element or sequence<Node>)? refNodes);
-};
-
// https://drafts.csswg.org/web-animations/#extensions-to-the-document-interface
partial interface Document {
[Func="Document::AreWebAnimationsTimelinesEnabled"]
@@ -758,3 +746,14 @@ partial interface Document {
[ChromeOnly]
boolean isActive();
};
+
+Document includes NonElementParentNode;
+
+/**
+ * Extension to add the fragmentDirective property.
+ * https://wicg.github.io/scroll-to-text-fragment/#feature-detectability
+ */
+partial interface Document {
+ [Pref="dom.text_fragments.enabled", SameObject]
+ readonly attribute FragmentDirective fragmentDirective;
+};
diff --git a/dom/webidl/DocumentFragment.webidl b/dom/webidl/DocumentFragment.webidl
index 0b760abd04..5425c3d374 100644
--- a/dom/webidl/DocumentFragment.webidl
+++ b/dom/webidl/DocumentFragment.webidl
@@ -4,8 +4,7 @@
* You can obtain one at http://mozilla.org/MPL/2.0/.
*
* The origin of this IDL file is
- * http://www.w3.org/TR/2012/WD-dom-20120405/#interface-documentfragment
- * http://www.w3.org/TR/2012/WD-selectors-api-20120628/#interface-definitions
+ * https://dom.spec.whatwg.org/#documentfragment
*
* Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
* liability, trademark and document use rules apply.
@@ -15,16 +14,7 @@
interface DocumentFragment : Node {
[Throws]
constructor();
-
- Element? getElementById(DOMString elementId);
-};
-
-// http://www.w3.org/TR/2012/WD-selectors-api-20120628/#interface-definitions
-partial interface DocumentFragment {
- [Throws]
- Element? querySelector(UTF8String selectors);
- [Throws]
- NodeList querySelectorAll(UTF8String selectors);
};
DocumentFragment includes ParentNode;
+DocumentFragment includes NonElementParentNode;
diff --git a/dom/webidl/Element.webidl b/dom/webidl/Element.webidl
index 32cb1dd30b..bbca476b38 100644
--- a/dom/webidl/Element.webidl
+++ b/dom/webidl/Element.webidl
@@ -4,10 +4,9 @@
* You can obtain one at http://mozilla.org/MPL/2.0/.
*
* The origin of this IDL file is
- * http://dom.spec.whatwg.org/#element and
- * http://domparsing.spec.whatwg.org/ and
- * http://dev.w3.org/csswg/cssom-view/ and
- * http://www.w3.org/TR/selectors-api/
+ * https://dom.spec.whatwg.org/#interface-element
+ * https://domparsing.spec.whatwg.org/
+ * https://drafts.csswg.org/cssom-view/
*
* Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
* liability, trademark and document use rules apply.
@@ -112,7 +111,7 @@ interface Element : Node {
* Returns whether this element would be selected by the given selector
* string.
*
- * See <http://dev.w3.org/2006/webapi/selectors-api2/#matchesselector>
+ * https://dom.spec.whatwg.org/#dom-element-matches
*/
[Throws, Pure, BinaryName="matches"]
boolean mozMatchesSelector(UTF8String selector);
@@ -192,7 +191,7 @@ interface mixin ElementCSSInlineStyle {
readonly attribute CSSStyleDeclaration style;
};
-// http://dev.w3.org/csswg/cssom-view/
+// https://drafts.csswg.org/cssom-view/
enum ScrollLogicalPosition { "start", "center", "end", "nearest" };
dictionary ScrollIntoViewOptions : ScrollOptions {
ScrollLogicalPosition block = "start";
@@ -208,7 +207,7 @@ dictionary CheckVisibilityOptions {
[ChromeOnly] boolean flush = true;
};
-// http://dev.w3.org/csswg/cssom-view/#extensions-to-the-element-interface
+// https://drafts.csswg.org/cssom-view/#extensions-to-the-element-interface
partial interface Element {
DOMRectList getClientRects();
DOMRect getBoundingClientRect();
@@ -256,6 +255,8 @@ partial interface Element {
readonly attribute long scrollTopMax;
[ChromeOnly] readonly attribute long scrollLeftMin;
readonly attribute long scrollLeftMax;
+
+ [Pref="layout.css.zoom.enabled"] readonly attribute double currentCSSZoom;
};
// http://domparsing.spec.whatwg.org/#extensions-to-the-element-interface
@@ -268,14 +269,6 @@ partial interface Element {
undefined insertAdjacentHTML(DOMString position, DOMString text);
};
-// http://www.w3.org/TR/selectors-api/#interface-definitions
-partial interface Element {
- [Throws, Pure]
- Element? querySelector(UTF8String selectors);
- [Throws, Pure]
- NodeList querySelectorAll(UTF8String selectors);
-};
-
// https://dom.spec.whatwg.org/#dictdef-shadowrootinit
dictionary ShadowRootInit {
required ShadowRootMode mode;
diff --git a/dom/webidl/FragmentDirective.webidl b/dom/webidl/FragmentDirective.webidl
new file mode 100644
index 0000000000..7793eaa512
--- /dev/null
+++ b/dom/webidl/FragmentDirective.webidl
@@ -0,0 +1,11 @@
+/* -*- 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://wicg.github.io/scroll-to-text-fragment/
+ */
+[Exposed=Window, Pref="dom.text_fragments.enabled"]
+interface FragmentDirective {
+};
diff --git a/dom/webidl/GleanMetrics.webidl b/dom/webidl/GleanMetrics.webidl
index 47dc3262f1..162b9448a5 100644
--- a/dom/webidl/GleanMetrics.webidl
+++ b/dom/webidl/GleanMetrics.webidl
@@ -222,6 +222,16 @@ interface GleanCustomDistribution : GleanMetric {
undefined accumulateSamples(sequence<long long> aSamples);
/**
+ * Accumulates the provided single signed sample in the metric.
+ *
+ * @param aSample - The sample to be recorded by the metric.
+ *
+ * Notes: Discards any negative value of `sample` and reports an
+ * `ErrorType::InvalidValue`.
+ */
+ undefined accumulateSingleSample(long long aSample);
+
+ /**
* **Test-only API**
*
* Gets the currently stored value as a DistributionData.
diff --git a/dom/webidl/HTMLHyperlinkElementUtils.webidl b/dom/webidl/HTMLHyperlinkElementUtils.webidl
index 652437c81b..4f147bc74b 100644
--- a/dom/webidl/HTMLHyperlinkElementUtils.webidl
+++ b/dom/webidl/HTMLHyperlinkElementUtils.webidl
@@ -12,25 +12,25 @@
interface mixin HTMLHyperlinkElementUtils {
[CEReactions, SetterThrows]
- stringifier attribute USVString href;
+ stringifier attribute UTF8String href;
- readonly attribute USVString origin;
+ readonly attribute UTF8String origin;
[CEReactions]
- attribute USVString protocol;
+ attribute UTF8String protocol;
[CEReactions]
- attribute USVString username;
+ attribute UTF8String username;
[CEReactions]
- attribute USVString password;
+ attribute UTF8String password;
[CEReactions]
- attribute USVString host;
+ attribute UTF8String host;
[CEReactions]
- attribute USVString hostname;
+ attribute UTF8String hostname;
[CEReactions]
- attribute USVString port;
+ attribute UTF8String port;
[CEReactions]
- attribute USVString pathname;
+ attribute UTF8String pathname;
[CEReactions]
- attribute USVString search;
+ attribute UTF8String search;
[CEReactions]
- attribute USVString hash;
+ attribute UTF8String hash;
};
diff --git a/dom/webidl/HTMLMarqueeElement.webidl b/dom/webidl/HTMLMarqueeElement.webidl
index 58bc8416f9..3736cec67f 100644
--- a/dom/webidl/HTMLMarqueeElement.webidl
+++ b/dom/webidl/HTMLMarqueeElement.webidl
@@ -28,10 +28,6 @@ interface HTMLMarqueeElement : HTMLElement {
[CEReactions, SetterThrows] attribute unsigned long vspace;
[CEReactions, SetterThrows] attribute DOMString width;
- attribute EventHandler onbounce;
- attribute EventHandler onfinish;
- attribute EventHandler onstart;
-
undefined start();
undefined stop();
};
diff --git a/dom/webidl/HashChangeEvent.webidl b/dom/webidl/HashChangeEvent.webidl
index 0a99a41018..fb0ae7d119 100644
--- a/dom/webidl/HashChangeEvent.webidl
+++ b/dom/webidl/HashChangeEvent.webidl
@@ -15,12 +15,6 @@ interface HashChangeEvent : Event
readonly attribute DOMString oldURL;
readonly attribute DOMString newURL;
-
- undefined initHashChangeEvent(DOMString typeArg,
- optional boolean canBubbleArg = false,
- optional boolean cancelableArg = false,
- optional DOMString oldURLArg = "",
- optional DOMString newURLArg = "");
};
dictionary HashChangeEventInit : EventInit
diff --git a/dom/webidl/IDBDatabase.webidl b/dom/webidl/IDBDatabase.webidl
index 310c662c15..71002b57b2 100644
--- a/dom/webidl/IDBDatabase.webidl
+++ b/dom/webidl/IDBDatabase.webidl
@@ -5,11 +5,18 @@
*
* The origin of this IDL file is
* https://w3c.github.io/IndexedDB/#database-interface
+ * https://w3c.github.io/IndexedDB/#enumdef-idbtransactiondurability
*
* Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
* liability, trademark and document use rules apply.
*/
+enum IDBTransactionDurability { "default", "strict", "relaxed" };
+
+dictionary IDBTransactionOptions {
+ IDBTransactionDurability durability = "default";
+};
+
[Exposed=(Window,Worker)]
interface IDBDatabase : EventTarget {
[Constant] readonly attribute DOMString name;
@@ -19,7 +26,8 @@ interface IDBDatabase : EventTarget {
[NewObject, Throws]
IDBTransaction transaction((DOMString or sequence<DOMString>) storeNames,
- optional IDBTransactionMode mode = "readonly");
+ optional IDBTransactionMode mode = "readonly",
+ optional IDBTransactionOptions options = {});
[NewObject, Throws]
IDBObjectStore createObjectStore(
DOMString name,
diff --git a/dom/webidl/IDBFactory.webidl b/dom/webidl/IDBFactory.webidl
index 37143bcbb5..76553037fc 100644
--- a/dom/webidl/IDBFactory.webidl
+++ b/dom/webidl/IDBFactory.webidl
@@ -39,6 +39,8 @@ interface IDBFactory {
deleteDatabase(DOMString name,
optional IDBOpenDBOptions options = {});
+ Promise<sequence<IDBDatabaseInfo>> databases();
+
[Throws]
short
cmp(any first,
@@ -62,3 +64,8 @@ interface IDBFactory {
DOMString name,
optional IDBOpenDBOptions options = {});
};
+
+dictionary IDBDatabaseInfo {
+ DOMString name;
+ unsigned long long version;
+};
diff --git a/dom/webidl/IDBTransaction.webidl b/dom/webidl/IDBTransaction.webidl
index 1bb52ff448..83d0edbcbf 100644
--- a/dom/webidl/IDBTransaction.webidl
+++ b/dom/webidl/IDBTransaction.webidl
@@ -23,6 +23,10 @@ enum IDBTransactionMode {
interface IDBTransaction : EventTarget {
[Throws]
readonly attribute IDBTransactionMode mode;
+
+ [Throws]
+ readonly attribute IDBTransactionDurability durability;
+
[SameObject] readonly attribute IDBDatabase db;
readonly attribute DOMException? error;
diff --git a/dom/webidl/IdentityCredential.webidl b/dom/webidl/IdentityCredential.webidl
index 801b2dc0f8..fce994115c 100644
--- a/dom/webidl/IdentityCredential.webidl
+++ b/dom/webidl/IdentityCredential.webidl
@@ -23,8 +23,8 @@ dictionary IdentityCredentialRequestOptions {
[GenerateConversionToJS]
dictionary IdentityProviderConfig {
required UTF8String configURL;
- required USVString clientId;
- USVString nonce;
+ required UTF8String clientId;
+ UTF8String nonce;
};
// https://fedidcg.github.io/FedCM/#dictdef-identityproviderwellknown
@@ -35,7 +35,7 @@ dictionary IdentityProviderWellKnown {
// https://fedidcg.github.io/FedCM/#dictdef-identityprovidericon
dictionary IdentityProviderIcon {
- required USVString url;
+ required UTF8String url;
unsigned long size;
};
diff --git a/dom/webidl/MediaDebugInfo.webidl b/dom/webidl/MediaDebugInfo.webidl
index 46192d8e59..7740a9dbd3 100644
--- a/dom/webidl/MediaDebugInfo.webidl
+++ b/dom/webidl/MediaDebugInfo.webidl
@@ -150,6 +150,7 @@ dictionary MediaDecoderStateMachineDebugInfo {
boolean videoCompleted = false;
MediaDecoderStateMachineDecodingStateDebugInfo stateObj = {};
MediaSinkDebugInfo mediaSink = {};
+ double totalBufferingTimeMs = 0;
};
dictionary MediaStateDebugInfo {
@@ -195,6 +196,8 @@ dictionary MediaFormatReaderDebugInfo {
MediaStateDebugInfo audioState = {};
MediaStateDebugInfo videoState = {};
MediaFrameStats frameStats = {};
+ double totalReadMetadataTimeMs = 0.0;
+ double totalWaitingForVideoDataTimeMs = 0.0;
};
dictionary BufferRange {
diff --git a/dom/webidl/MutationEvent.webidl b/dom/webidl/MutationEvent.webidl
index 1fca8d1c07..2f8bfc6b42 100644
--- a/dom/webidl/MutationEvent.webidl
+++ b/dom/webidl/MutationEvent.webidl
@@ -15,8 +15,6 @@ interface MutationEvent : Event
const unsigned short MODIFICATION = 1;
const unsigned short ADDITION = 2;
const unsigned short REMOVAL = 3;
- [ChromeOnly]
- const unsigned short SMIL = 4;
readonly attribute Node? relatedNode;
readonly attribute DOMString prevValue;
diff --git a/dom/webidl/NonElementParentNode.webidl b/dom/webidl/NonElementParentNode.webidl
new file mode 100644
index 0000000000..574fb07cc7
--- /dev/null
+++ b/dom/webidl/NonElementParentNode.webidl
@@ -0,0 +1,12 @@
+/* -*- 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://dom.spec.whatwg.org/#nonelementparentnode
+ */
+interface mixin NonElementParentNode {
+ [Pure]
+ Element? getElementById(DOMString elementId);
+};
diff --git a/dom/webidl/ParentNode.webidl b/dom/webidl/ParentNode.webidl
index 4350fb8a05..07906ece57 100644
--- a/dom/webidl/ParentNode.webidl
+++ b/dom/webidl/ParentNode.webidl
@@ -30,4 +30,9 @@ interface mixin ParentNode {
undefined append((Node or DOMString)... nodes);
[CEReactions, Throws, Unscopable]
undefined replaceChildren((Node or DOMString)... nodes);
+
+ [Throws, Pure]
+ Element? querySelector(UTF8String selectors);
+ [Throws, Pure]
+ NodeList querySelectorAll(UTF8String selectors);
};
diff --git a/dom/webidl/RTCIceCandidate.webidl b/dom/webidl/RTCIceCandidate.webidl
index 865b029ab9..6e9a2caa93 100644
--- a/dom/webidl/RTCIceCandidate.webidl
+++ b/dom/webidl/RTCIceCandidate.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-RTCIceCandidate
+ * https://w3c.github.io/webrtc-pc/#rtcicecandidate-interface
*/
dictionary RTCIceCandidateInit {
@@ -14,16 +14,51 @@ dictionary RTCIceCandidateInit {
DOMString? usernameFragment = null;
};
+enum RTCIceComponent {
+ "rtp",
+ "rtcp"
+};
+
+enum RTCIceProtocol {
+ "udp",
+ "tcp"
+};
+
+enum RTCIceCandidateType {
+ "host",
+ "srflx",
+ "prflx",
+ "relay"
+};
+
+enum RTCIceTcpCandidateType {
+ "active",
+ "passive",
+ "so"
+};
+
[Pref="media.peerconnection.enabled",
JSImplementation="@mozilla.org/dom/rtcicecandidate;1",
Exposed=Window]
interface RTCIceCandidate {
[Throws]
constructor(optional RTCIceCandidateInit candidateInitDict = {});
-
- attribute DOMString candidate;
- attribute DOMString? sdpMid;
- attribute unsigned short? sdpMLineIndex;
- attribute DOMString? usernameFragment;
- [Default] object toJSON();
+ readonly attribute DOMString candidate;
+ readonly attribute DOMString? sdpMid;
+ readonly attribute unsigned short? sdpMLineIndex;
+ readonly attribute DOMString? foundation;
+ readonly attribute RTCIceComponent? component;
+ readonly attribute unsigned long? priority;
+ readonly attribute DOMString? address;
+ readonly attribute RTCIceProtocol? protocol;
+ readonly attribute unsigned short? port;
+ readonly attribute RTCIceCandidateType? type;
+ readonly attribute RTCIceTcpCandidateType? tcpType;
+ readonly attribute DOMString? relatedAddress;
+ readonly attribute unsigned short? relatedPort;
+ readonly attribute DOMString? usernameFragment;
+ // TODO: add remaining members relayProtocol and url (bug 1886013)
+ // readonly attribute RTCIceServerTransportProtocol? relayProtocol;
+ // readonly attribute DOMString? url;
+ RTCIceCandidateInit toJSON();
};
diff --git a/dom/webidl/RTCStatsReport.webidl b/dom/webidl/RTCStatsReport.webidl
index 8f61dceeb9..1305575e4a 100644
--- a/dom/webidl/RTCStatsReport.webidl
+++ b/dom/webidl/RTCStatsReport.webidl
@@ -200,13 +200,6 @@ dictionary RTCIceCandidatePairStats : RTCStats {
unsigned long componentId; // moz
};
-enum RTCIceCandidateType {
- "host",
- "srflx",
- "prflx",
- "relay"
-};
-
dictionary RTCIceCandidateStats : RTCStats {
DOMString address;
long port;
diff --git a/dom/webidl/Range.webidl b/dom/webidl/Range.webidl
index 9d06ec09c7..95dff7721a 100644
--- a/dom/webidl/Range.webidl
+++ b/dom/webidl/Range.webidl
@@ -94,3 +94,12 @@ partial interface Range {
[ChromeOnly, Throws]
ClientRectsAndTexts getClientRectsAndTexts();
};
+
+// ChromeOnly methods that allow setting Range boundaries to cross
+// shadow boundary.
+partial interface Range {
+ [ChromeOnly, Throws]
+ undefined setStartAllowCrossShadowBoundary(Node refNode, unsigned long offset);
+ [ChromeOnly, Throws]
+ undefined setEndAllowCrossShadowBoundary(Node refNode, unsigned long offset);
+};
diff --git a/dom/webidl/Request.webidl b/dom/webidl/Request.webidl
index 54e4e5ec95..2480d2b39a 100644
--- a/dom/webidl/Request.webidl
+++ b/dom/webidl/Request.webidl
@@ -7,20 +7,25 @@
* https://fetch.spec.whatwg.org/#request-class
*/
-typedef (Request or USVString) RequestInfo;
+typedef (Request or UTF8String) RequestInfo;
typedef unsigned long nsContentPolicyType;
[Exposed=(Window,Worker)]
interface Request {
+ /**
+ * Note that Requests created from system principal (ie "privileged"/chrome)
+ * code will default to omitting credentials. You can override this behaviour
+ * using the ``credentials`` member on the ``init`` dictionary.
+ */
[Throws]
constructor(RequestInfo input, optional RequestInit init = {});
readonly attribute ByteString method;
- readonly attribute USVString url;
+ readonly attribute UTF8String url;
[SameObject, BinaryName="headers_"] readonly attribute Headers headers;
readonly attribute RequestDestination destination;
- readonly attribute USVString referrer;
+ readonly attribute UTF8String referrer;
[BinaryName="referrerPolicy_"]
readonly attribute ReferrerPolicy referrerPolicy;
readonly attribute RequestMode mode;
@@ -29,6 +34,9 @@ interface Request {
readonly attribute RequestRedirect redirect;
readonly attribute DOMString integrity;
+ [Pref="dom.fetchKeepalive.enabled"]
+ readonly attribute boolean keepalive;
+
// If a main-thread fetch() promise rejects, the error passed will be a
// nsresult code.
[ChromeOnly]
@@ -51,14 +59,21 @@ dictionary RequestInit {
ByteString method;
HeadersInit headers;
BodyInit? body;
- USVString referrer;
+ UTF8String referrer;
ReferrerPolicy referrerPolicy;
RequestMode mode;
+ /**
+ * If not set, defaults to "same-origin", except for system principal (chrome)
+ * requests where the default is "omit".
+ */
RequestCredentials credentials;
RequestCache cache;
RequestRedirect redirect;
DOMString integrity;
+ [Pref="dom.fetchKeepalive.enabled"]
+ boolean keepalive;
+
[ChromeOnly]
boolean mozErrors;
diff --git a/dom/webidl/Response.webidl b/dom/webidl/Response.webidl
index d04453c37c..5257c34176 100644
--- a/dom/webidl/Response.webidl
+++ b/dom/webidl/Response.webidl
@@ -18,13 +18,13 @@ interface Response {
[NewObject] static Response error();
[Throws,
- NewObject] static Response redirect(USVString url, optional unsigned short status = 302);
+ NewObject] static Response redirect(UTF8String url, optional unsigned short status = 302);
[BinaryName=CreateFromJson, Throws,
NewObject] static Response json(any data, optional ResponseInit init = {});
readonly attribute ResponseType type;
- readonly attribute USVString url;
+ readonly attribute UTF8String url;
readonly attribute boolean redirected;
readonly attribute unsigned short status;
readonly attribute boolean ok;
diff --git a/dom/webidl/Selection.webidl b/dom/webidl/Selection.webidl
index 496ebc0813..263c50181e 100644
--- a/dom/webidl/Selection.webidl
+++ b/dom/webidl/Selection.webidl
@@ -26,6 +26,7 @@ interface Selection {
*/
readonly attribute unsigned long rangeCount;
readonly attribute DOMString type;
+ readonly attribute DOMString direction;
/**
* Returns the range at the specified index. Throws if the index is
* out of range.
@@ -49,6 +50,10 @@ interface Selection {
undefined removeAllRanges();
[Throws, BinaryName="RemoveAllRanges"]
undefined empty();
+
+ [Pref="dom.shadowdom.selection_across_boundary_enabled"]
+ sequence<StaticRange> getComposedRanges(ShadowRoot... shadowRoots);
+
[Throws, BinaryName="collapseJS"]
undefined collapse(Node? node, optional unsigned long offset = 0);
[Throws, BinaryName="collapseJS"]
diff --git a/dom/webidl/Storage.webidl b/dom/webidl/Storage.webidl
index 5ee5e2c737..a9e0393929 100644
--- a/dom/webidl/Storage.webidl
+++ b/dom/webidl/Storage.webidl
@@ -30,9 +30,6 @@ interface Storage {
[Throws, NeedsSubjectPrincipal]
undefined clear();
-
- [ChromeOnly]
- readonly attribute boolean isSessionOnly;
};
/**
diff --git a/dom/webidl/TextEvent.webidl b/dom/webidl/TextEvent.webidl
new file mode 100644
index 0000000000..5b79e0e1b8
--- /dev/null
+++ b/dom/webidl/TextEvent.webidl
@@ -0,0 +1,21 @@
+/* -*- 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/uievents/#textevent
+ */
+
+[Pref="dom.events.textevent.enabled", Exposed=Window]
+interface TextEvent : UIEvent
+{
+ [NeedsSubjectPrincipal]
+ readonly attribute DOMString data;
+
+ undefined initTextEvent(DOMString type,
+ optional boolean bubbles = false,
+ optional boolean cancelable = false,
+ optional Window? view = null,
+ optional DOMString data = "undefined");
+};
diff --git a/dom/webidl/TrustedTypes.webidl b/dom/webidl/TrustedTypes.webidl
index 3b7e35534f..c43faacb79 100644
--- a/dom/webidl/TrustedTypes.webidl
+++ b/dom/webidl/TrustedTypes.webidl
@@ -5,6 +5,7 @@
*
* The origin of this IDL file is
* <https://w3c.github.io/trusted-types/dist/spec/>.
+ * It is augmented with Gecko-specific annotations.
*/
[Exposed=(Window,Worker), Pref="dom.security.trusted_types.enabled"]
@@ -28,9 +29,9 @@ interface TrustedScriptURL {
[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);
+ [NewObject, Throws] TrustedHTML createHTML(DOMString input, any... arguments);
+ [NewObject, Throws] TrustedScript createScript(DOMString input, any... arguments);
+ [NewObject, Throws] TrustedScriptURL createScriptURL(DOMString input, any... arguments);
};
dictionary TrustedTypePolicyOptions {
diff --git a/dom/webidl/URL.webidl b/dom/webidl/URL.webidl
index 9cdd7f7aac..1f1d709b08 100644
--- a/dom/webidl/URL.webidl
+++ b/dom/webidl/URL.webidl
@@ -17,43 +17,44 @@ interface URI;
LegacyWindowAlias=webkitURL]
interface URL {
[Throws]
- constructor(USVString url, optional USVString base);
+ constructor(UTF8String url, optional UTF8String base);
- static boolean canParse(USVString url, optional USVString base);
+ static URL? parse(UTF8String url, optional UTF8String base);
+ static boolean canParse(UTF8String url, optional UTF8String base);
[SetterThrows]
- stringifier attribute USVString href;
- readonly attribute USVString origin;
- attribute USVString protocol;
- attribute USVString username;
- attribute USVString password;
- attribute USVString host;
- attribute USVString hostname;
- attribute USVString port;
- attribute USVString pathname;
- attribute USVString search;
+ stringifier attribute UTF8String href;
+ readonly attribute UTF8String origin;
+ attribute UTF8String protocol;
+ attribute UTF8String username;
+ attribute UTF8String password;
+ attribute UTF8String host;
+ attribute UTF8String hostname;
+ attribute UTF8String port;
+ attribute UTF8String pathname;
+ attribute UTF8String search;
[SameObject]
readonly attribute URLSearchParams searchParams;
- attribute USVString hash;
+ attribute UTF8String hash;
[ChromeOnly]
readonly attribute URI URI;
[ChromeOnly]
static URL fromURI(URI uri);
- USVString toJSON();
+ UTF8String toJSON();
};
[Exposed=(Window,DedicatedWorker,SharedWorker)]
partial interface URL {
[Throws]
- static DOMString createObjectURL(Blob blob);
+ static UTF8String createObjectURL(Blob blob);
[Throws]
- static undefined revokeObjectURL(DOMString url);
+ static undefined revokeObjectURL(UTF8String url);
[ChromeOnly, Throws]
- static boolean isValidObjectURL(DOMString url);
+ static boolean isValidObjectURL(UTF8String url);
// https://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html
[Throws]
- static DOMString createObjectURL(MediaSource source);
+ static UTF8String createObjectURL(MediaSource source);
};
diff --git a/dom/webidl/URLSearchParams.webidl b/dom/webidl/URLSearchParams.webidl
index de4922b33c..74b2e2729c 100644
--- a/dom/webidl/URLSearchParams.webidl
+++ b/dom/webidl/URLSearchParams.webidl
@@ -16,21 +16,21 @@
[Exposed=(Window,Worker,WorkerDebugger)]
interface URLSearchParams {
[Throws]
- constructor(optional (sequence<sequence<USVString>> or
- record<USVString, USVString> or USVString) init = "");
+ constructor(optional (sequence<sequence<UTF8String>> or
+ record<UTF8String, UTF8String> or UTF8String) init = "");
readonly attribute unsigned long size;
- undefined append(USVString name, USVString value);
- undefined delete(USVString name, optional USVString value);
- USVString? get(USVString name);
- sequence<USVString> getAll(USVString name);
- boolean has(USVString name, optional USVString value);
- undefined set(USVString name, USVString value);
+ undefined append(UTF8String name, UTF8String value);
+ undefined delete(UTF8String name, optional UTF8String value);
+ UTF8String? get(UTF8String name);
+ sequence<UTF8String> getAll(UTF8String name);
+ boolean has(UTF8String name, optional UTF8String value);
+ undefined set(UTF8String name, UTF8String value);
[Throws]
undefined sort();
- iterable<USVString, USVString>;
+ iterable<UTF8String, UTF8String>;
stringifier;
};
diff --git a/dom/webidl/XMLHttpRequest.webidl b/dom/webidl/XMLHttpRequest.webidl
index 66cd6cc79d..b1cc840faa 100644
--- a/dom/webidl/XMLHttpRequest.webidl
+++ b/dom/webidl/XMLHttpRequest.webidl
@@ -32,9 +32,12 @@ dictionary MozXMLHttpRequestParameters
{
/**
* If true, the request will be sent without cookie and authentication
- * headers.
+ * headers. Defaults to true for system/privileged/chrome requests,
+ * and to false otherwise.
+ * Note that even if set to true, for system/privileged/chrome requests,
+ * manually-set 'Cookie' headers are not removed.
*/
- boolean mozAnon = false;
+ boolean mozAnon;
/**
* If true, the same origin policy will not be enforced on the request.
diff --git a/dom/webidl/moz.build b/dom/webidl/moz.build
index 3880b727e7..9f8832d042 100644
--- a/dom/webidl/moz.build
+++ b/dom/webidl/moz.build
@@ -238,6 +238,9 @@ with Files("NavigationPreloadManager.webidl"):
with Files("Net*"):
BUG_COMPONENT = ("Core", "Networking")
+with Files("Notification*"):
+ BUG_COMPONENT = ("Core", "DOM: Notifications")
+
with Files("OfflineAudio*"):
BUG_COMPONENT = ("Core", "Web Audio")
@@ -275,7 +278,7 @@ with Files("ProgressEvent.webidl"):
BUG_COMPONENT = ("Core", "DOM: Events")
with Files("Push*"):
- BUG_COMPONENT = ("Core", "DOM: Notifications")
+ BUG_COMPONENT = ("Core", "DOM: Push Subscriptions")
with Files("RTC*"):
BUG_COMPONENT = ("Core", "WebRTC")
@@ -322,6 +325,9 @@ with Files("SubtleCrypto.webidl"):
with Files("TCP*"):
BUG_COMPONENT = ("Core", "DOM: Networking")
+with Files("TextEvent.webidl"):
+ BUG_COMPONENT = ("Core", "DOM: UI Events & Focus Handling")
+
with Files("TextTrack*"):
BUG_COMPONENT = ("Core", "Audio/Video")
@@ -419,6 +425,7 @@ WEBIDL_FILES = [
"AudioData.webidl",
"AudioDecoder.webidl",
"AudioDestinationNode.webidl",
+ "AudioEncoder.webidl",
"AudioListener.webidl",
"AudioNode.webidl",
"AudioParam.webidl",
@@ -492,6 +499,8 @@ WEBIDL_FILES = [
"CSSPseudoElement.webidl",
"CSSRule.webidl",
"CSSRuleList.webidl",
+ "CSSScopeRule.webidl",
+ "CSSStartingStyleRule.webidl",
"CSSStyleDeclaration.webidl",
"CSSStyleRule.webidl",
"CSSStyleSheet.webidl",
@@ -566,6 +575,7 @@ WEBIDL_FILES = [
"FontFaceSet.webidl",
"FontFaceSource.webidl",
"FormData.webidl",
+ "FragmentDirective.webidl",
"Function.webidl",
"GainNode.webidl",
"Gamepad.webidl",
@@ -754,6 +764,7 @@ WEBIDL_FILES = [
"NodeFilter.webidl",
"NodeIterator.webidl",
"NodeList.webidl",
+ "NonElementParentNode.webidl",
"Notification.webidl",
"NotificationEvent.webidl",
"NotifyPaintEvent.webidl",
@@ -961,6 +972,7 @@ WEBIDL_FILES = [
"TextDecoderStream.webidl",
"TextEncoder.webidl",
"TextEncoderStream.webidl",
+ "TextEvent.webidl",
"TextTrack.webidl",
"TextTrackCue.webidl",
"TextTrackCueList.webidl",