summaryrefslogtreecommitdiffstats
path: root/dom/webidl
diff options
context:
space:
mode:
Diffstat (limited to 'dom/webidl')
-rw-r--r--dom/webidl/AddonEvent.webidl12
-rw-r--r--dom/webidl/AddonManager.webidl91
-rw-r--r--dom/webidl/AudioContext.webidl1
-rw-r--r--dom/webidl/CommandEvent.webidl6
-rw-r--r--dom/webidl/CompositionEvent.webidl10
-rw-r--r--dom/webidl/CustomEvent.webidl6
-rw-r--r--dom/webidl/DeviceMotionEvent.webidl12
-rw-r--r--dom/webidl/DeviceOrientationEvent.webidl12
-rw-r--r--dom/webidl/DragEvent.webidl30
-rw-r--r--dom/webidl/Element.webidl6
-rw-r--r--dom/webidl/Event.webidl4
-rw-r--r--dom/webidl/HashChangeEvent.webidl8
-rw-r--r--dom/webidl/Headers.webidl2
-rw-r--r--dom/webidl/InstallTrigger.webidl2
-rw-r--r--dom/webidl/IntersectionObserver.webidl6
-rw-r--r--dom/webidl/KeyEvent.webidl18
-rw-r--r--dom/webidl/MessageEvent.webidl12
-rw-r--r--dom/webidl/MouseEvent.webidl64
-rw-r--r--dom/webidl/MouseScrollEvent.webidl30
-rw-r--r--dom/webidl/MutationEvent.webidl14
-rw-r--r--dom/webidl/Navigator.webidl8
-rw-r--r--dom/webidl/ScrollAreaEvent.webidl16
-rw-r--r--dom/webidl/SimpleGestureEvent.webidl36
-rw-r--r--dom/webidl/StorageEvent.webidl14
-rw-r--r--dom/webidl/TestInterfaceJS.webidl2
-rw-r--r--dom/webidl/TimeEvent.webidl4
-rw-r--r--dom/webidl/TouchEvent.webidl22
-rw-r--r--dom/webidl/UIEvent.webidl8
-rw-r--r--dom/webidl/URLSearchParams.webidl3
-rw-r--r--dom/webidl/VRDisplay.webidl286
-rw-r--r--dom/webidl/XULCommandEvent.webidl18
-rw-r--r--dom/webidl/moz.build9
32 files changed, 187 insertions, 585 deletions
diff --git a/dom/webidl/AddonEvent.webidl b/dom/webidl/AddonEvent.webidl
deleted file mode 100644
index 235f81ec2..000000000
--- a/dom/webidl/AddonEvent.webidl
+++ /dev/null
@@ -1,12 +0,0 @@
-[ Func="mozilla::AddonManagerWebAPI::IsAPIEnabled",
- Constructor(DOMString type, AddonEventInit eventInitDict)]
-interface AddonEvent : Event {
- readonly attribute DOMString id;
- readonly attribute boolean needsRestart;
-};
-
-dictionary AddonEventInit : EventInit {
- required DOMString id;
- required boolean needsRestart;
-};
-
diff --git a/dom/webidl/AddonManager.webidl b/dom/webidl/AddonManager.webidl
deleted file mode 100644
index 02c7953e6..000000000
--- a/dom/webidl/AddonManager.webidl
+++ /dev/null
@@ -1,91 +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/.
- */
-
-/* We need a JSImplementation but cannot get one without a contract ID.
- Since Addon and AddonInstall are only ever created from JS they don't need
- real contract IDs. */
-[ChromeOnly, JSImplementation="dummy"]
-interface Addon {
- // The add-on's ID.
- readonly attribute DOMString id;
- // The add-on's version.
- readonly attribute DOMString version;
- // The add-on's type (extension, theme, etc.).
- readonly attribute DOMString type;
- // The add-on's name in the current locale.
- readonly attribute DOMString name;
- // The add-on's description in the current locale.
- readonly attribute DOMString description;
- // If the user has enabled this add-on, note that it still may not be running
- // depending on whether enabling requires a restart or if the add-on is
- // incompatible in some way.
- readonly attribute boolean isEnabled;
- // If the add-on is currently active in the browser.
- readonly attribute boolean isActive;
- // If the add-on may be uninstalled
- readonly attribute boolean canUninstall;
-
- Promise<boolean> uninstall();
- Promise<void> setEnabled(boolean value);
-};
-
-[ChromeOnly, JSImplementation="dummy"]
-interface AddonInstall : EventTarget {
- // One of the STATE_* symbols from AddonManager.jsm
- readonly attribute DOMString state;
- // One of the ERROR_* symbols from AddonManager.jsm, or null
- readonly attribute DOMString? error;
- // How many bytes have been downloaded
- readonly attribute long long progress;
- // How many total bytes will need to be downloaded or -1 if unknown
- readonly attribute long long maxProgress;
-
- Promise<void> install();
- Promise<void> cancel();
-};
-
-dictionary addonInstallOptions {
- required DOMString url;
- // If a non-empty string is passed for "hash", it is used to verify the
- // checksum of the downloaded XPI before installing. If is omitted or if
- // it is null or empty string, no checksum verification is performed.
- DOMString? hash = null;
-};
-
-[HeaderFile="mozilla/AddonManagerWebAPI.h",
- Func="mozilla::AddonManagerWebAPI::IsAPIEnabled",
- NavigatorProperty="mozAddonManager",
- JSImplementation="@mozilla.org/addon-web-api/manager;1"]
-interface AddonManager : EventTarget {
- /**
- * Gets information about an add-on
- *
- * @param id
- * The ID of the add-on to test for.
- * @return A promise. It will resolve to an Addon if the add-on is installed.
- */
- Promise<Addon> getAddonByID(DOMString id);
-
- /**
- * Creates an AddonInstall object for a given URL.
- *
- * @param options
- * Only one supported option: 'url', the URL of the addon to install.
- * @return A promise that resolves to an instance of AddonInstall.
- */
- Promise<AddonInstall> createInstall(optional addonInstallOptions options);
-
- /* Hooks for managing event listeners */
- [ChromeOnly]
- void eventListenerWasAdded(DOMString type);
- [ChromeOnly]
- void eventListenerWasRemoved(DOMString type);
-};
-
-[ChromeOnly,Exposed=System,HeaderFile="mozilla/AddonManagerWebAPI.h"]
-interface AddonManagerPermissions {
- static boolean isHostPermitted(DOMString host);
-};
-
diff --git a/dom/webidl/AudioContext.webidl b/dom/webidl/AudioContext.webidl
index c2f65abaf..9aa3d5567 100644
--- a/dom/webidl/AudioContext.webidl
+++ b/dom/webidl/AudioContext.webidl
@@ -24,7 +24,6 @@ dictionary PeriodicWaveConstraints {
};
[Constructor,
- Constructor(AudioChannel audioChannelType),
Pref="dom.webaudio.enabled"]
interface AudioContext : EventTarget {
diff --git a/dom/webidl/CommandEvent.webidl b/dom/webidl/CommandEvent.webidl
index 8c16e856c..9856c77c3 100644
--- a/dom/webidl/CommandEvent.webidl
+++ b/dom/webidl/CommandEvent.webidl
@@ -8,7 +8,7 @@ interface CommandEvent : Event {
readonly attribute DOMString? command;
void initCommandEvent(DOMString type,
- boolean canBubble,
- boolean cancelable,
- DOMString? command);
+ optional boolean canBubble = false,
+ optional boolean cancelable = false,
+ optional DOMString? command = null);
};
diff --git a/dom/webidl/CompositionEvent.webidl b/dom/webidl/CompositionEvent.webidl
index c293683ce..e4a54d678 100644
--- a/dom/webidl/CompositionEvent.webidl
+++ b/dom/webidl/CompositionEvent.webidl
@@ -25,9 +25,9 @@ interface CompositionEvent : UIEvent
partial interface CompositionEvent
{
void initCompositionEvent(DOMString typeArg,
- boolean canBubbleArg,
- boolean cancelableArg,
- Window? viewArg,
- DOMString? dataArg,
- DOMString localeArg);
+ optional boolean canBubbleArg = false,
+ optional boolean cancelableArg = false,
+ optional Window? viewArg = null,
+ optional DOMString? dataArg = null,
+ optional DOMString localeArg = "");
};
diff --git a/dom/webidl/CustomEvent.webidl b/dom/webidl/CustomEvent.webidl
index 299a41ec0..1ea5572b7 100644
--- a/dom/webidl/CustomEvent.webidl
+++ b/dom/webidl/CustomEvent.webidl
@@ -19,9 +19,9 @@ interface CustomEvent : Event
// initCustomEvent is a Gecko specific deprecated method.
[Throws]
void initCustomEvent(DOMString type,
- boolean canBubble,
- boolean cancelable,
- any detail);
+ optional boolean canBubble = false,
+ optional boolean cancelable = false,
+ optional any detail = null);
};
dictionary CustomEventInit : EventInit
diff --git a/dom/webidl/DeviceMotionEvent.webidl b/dom/webidl/DeviceMotionEvent.webidl
index fa4ecf3ca..c26ab080c 100644
--- a/dom/webidl/DeviceMotionEvent.webidl
+++ b/dom/webidl/DeviceMotionEvent.webidl
@@ -48,10 +48,10 @@ dictionary DeviceMotionEventInit : EventInit {
// Mozilla extensions.
partial interface DeviceMotionEvent {
void initDeviceMotionEvent(DOMString type,
- boolean canBubble,
- boolean cancelable,
- DeviceAccelerationInit acceleration,
- DeviceAccelerationInit accelerationIncludingGravity,
- DeviceRotationRateInit rotationRate,
- double? interval);
+ optional boolean canBubble = false,
+ optional boolean cancelable = false,
+ optional DeviceAccelerationInit acceleration,
+ optional DeviceAccelerationInit accelerationIncludingGravity,
+ optional DeviceRotationRateInit rotationRate,
+ optional double? interval = null);
};
diff --git a/dom/webidl/DeviceOrientationEvent.webidl b/dom/webidl/DeviceOrientationEvent.webidl
index 46194453e..9802b3681 100644
--- a/dom/webidl/DeviceOrientationEvent.webidl
+++ b/dom/webidl/DeviceOrientationEvent.webidl
@@ -14,12 +14,12 @@ interface DeviceOrientationEvent : Event
// initDeviceOrientationEvent is a Gecko specific deprecated method.
void initDeviceOrientationEvent(DOMString type,
- boolean canBubble,
- boolean cancelable,
- double? alpha,
- double? beta,
- double? gamma,
- boolean absolute);
+ optional boolean canBubble = false,
+ optional boolean cancelable = false,
+ optional double? alpha = null,
+ optional double? beta = null,
+ optional double? gamma = null,
+ optional boolean absolute = false);
};
dictionary DeviceOrientationEventInit : EventInit
diff --git a/dom/webidl/DragEvent.webidl b/dom/webidl/DragEvent.webidl
index 2cc173d5c..806177790 100644
--- a/dom/webidl/DragEvent.webidl
+++ b/dom/webidl/DragEvent.webidl
@@ -10,21 +10,21 @@ interface DragEvent : MouseEvent
readonly attribute DataTransfer? dataTransfer;
void initDragEvent(DOMString type,
- boolean canBubble,
- boolean cancelable,
- Window? aView,
- long aDetail,
- long aScreenX,
- long aScreenY,
- long aClientX,
- long aClientY,
- boolean aCtrlKey,
- boolean aAltKey,
- boolean aShiftKey,
- boolean aMetaKey,
- unsigned short aButton,
- EventTarget? aRelatedTarget,
- DataTransfer? aDataTransfer);
+ optional boolean canBubble = false,
+ optional boolean cancelable = false,
+ optional Window? aView = null,
+ optional long aDetail = 0,
+ optional long aScreenX = 0,
+ optional long aScreenY = 0,
+ optional long aClientX = 0,
+ optional long aClientY = 0,
+ optional boolean aCtrlKey = false,
+ optional boolean aAltKey = false,
+ optional boolean aShiftKey = false,
+ optional boolean aMetaKey = false,
+ optional unsigned short aButton = 0,
+ optional EventTarget? aRelatedTarget = null,
+ optional DataTransfer? aDataTransfer = null);
};
dictionary DragEventInit : MouseEventInit
diff --git a/dom/webidl/Element.webidl b/dom/webidl/Element.webidl
index 97eb4ffe0..cf17523a5 100644
--- a/dom/webidl/Element.webidl
+++ b/dom/webidl/Element.webidl
@@ -164,9 +164,10 @@ interface Element : Node {
};
// http://dev.w3.org/csswg/cssom-view/
-enum ScrollLogicalPosition { "start", "end" };
+enum ScrollLogicalPosition { "start", "center", "end", "nearest" };
dictionary ScrollIntoViewOptions : ScrollOptions {
ScrollLogicalPosition block = "start";
+ ScrollLogicalPosition inline = "nearest";
};
// http://dev.w3.org/csswg/cssom-view/#extensions-to-the-element-interface
@@ -175,8 +176,7 @@ partial interface Element {
DOMRect getBoundingClientRect();
// scrolling
- void scrollIntoView(boolean top);
- void scrollIntoView(optional ScrollIntoViewOptions options);
+ void scrollIntoView(optional (boolean or ScrollIntoViewOptions) arg);
// None of the CSSOM attributes are [Pure], because they flush
attribute long scrollTop; // scroll on setting
attribute long scrollLeft; // scroll on setting
diff --git a/dom/webidl/Event.webidl b/dom/webidl/Event.webidl
index 70a0ef513..a5d7da7d4 100644
--- a/dom/webidl/Event.webidl
+++ b/dom/webidl/Event.webidl
@@ -51,7 +51,9 @@ interface Event {
[Pure]
readonly attribute DOMHighResTimeStamp timeStamp;
- void initEvent(DOMString type, boolean bubbles, boolean cancelable);
+ void initEvent(DOMString type,
+ optional boolean bubbles = false,
+ optional boolean cancelable = false);
attribute boolean cancelBubble;
};
diff --git a/dom/webidl/HashChangeEvent.webidl b/dom/webidl/HashChangeEvent.webidl
index 735e8eb28..6e8be455c 100644
--- a/dom/webidl/HashChangeEvent.webidl
+++ b/dom/webidl/HashChangeEvent.webidl
@@ -11,10 +11,10 @@ interface HashChangeEvent : Event
readonly attribute DOMString newURL;
void initHashChangeEvent(DOMString typeArg,
- boolean canBubbleArg,
- boolean cancelableArg,
- DOMString oldURLArg,
- DOMString newURLArg);
+ optional boolean canBubbleArg = false,
+ optional boolean cancelableArg = false,
+ optional DOMString oldURLArg = "",
+ optional DOMString newURLArg = "");
};
dictionary HashChangeEventInit : EventInit
diff --git a/dom/webidl/Headers.webidl b/dom/webidl/Headers.webidl
index 205ab9f9e..eef552a7f 100644
--- a/dom/webidl/Headers.webidl
+++ b/dom/webidl/Headers.webidl
@@ -8,7 +8,7 @@
* http://fetch.spec.whatwg.org/#headers-class
*/
-typedef (Headers or sequence<sequence<ByteString>> or MozMap<ByteString>) HeadersInit;
+typedef (Headers or sequence<sequence<ByteString>> or record<ByteString, ByteString>) HeadersInit;
enum HeadersGuardEnum {
"none",
diff --git a/dom/webidl/InstallTrigger.webidl b/dom/webidl/InstallTrigger.webidl
index 789fb2bc4..68f48ddc6 100644
--- a/dom/webidl/InstallTrigger.webidl
+++ b/dom/webidl/InstallTrigger.webidl
@@ -57,7 +57,7 @@ interface InstallTriggerImpl {
* A callback to call as each installation succeeds or fails
* @return true if the installations were successfully started
*/
- boolean install(MozMap<(DOMString or InstallTriggerData)> installs,
+ boolean install(record<DOMString, (DOMString or InstallTriggerData)> installs,
optional InstallTriggerCallback callback);
/**
diff --git a/dom/webidl/IntersectionObserver.webidl b/dom/webidl/IntersectionObserver.webidl
index dbe8f428d..83200d950 100644
--- a/dom/webidl/IntersectionObserver.webidl
+++ b/dom/webidl/IntersectionObserver.webidl
@@ -7,7 +7,7 @@
* https://wicg.github.io/IntersectionObserver/
*/
-[ProbablyShortLivingObject, Pref="dom.IntersectionObserver.enabled"]
+[ProbablyShortLivingObject, Pref="dom.intersectionObserver.enabled"]
interface IntersectionObserverEntry {
[Constant]
readonly attribute DOMHighResTimeStamp time;
@@ -18,6 +18,8 @@ interface IntersectionObserverEntry {
[Constant]
readonly attribute DOMRectReadOnly intersectionRect;
[Constant]
+ readonly attribute boolean isIntersecting;
+ [Constant]
readonly attribute double intersectionRatio;
[Constant]
readonly attribute Element target;
@@ -25,7 +27,7 @@ interface IntersectionObserverEntry {
[Constructor(IntersectionCallback intersectionCallback,
optional IntersectionObserverInit options),
- Pref="dom.IntersectionObserver.enabled"]
+ Pref="dom.intersectionObserver.enabled"]
interface IntersectionObserver {
[Constant]
readonly attribute Element? root;
diff --git a/dom/webidl/KeyEvent.webidl b/dom/webidl/KeyEvent.webidl
index 516632854..abb4b6a34 100644
--- a/dom/webidl/KeyEvent.webidl
+++ b/dom/webidl/KeyEvent.webidl
@@ -225,13 +225,13 @@ interface KeyEvent
const unsigned long DOM_VK_WIN_OEM_CLEAR = 0xFE;
void initKeyEvent(DOMString type,
- boolean canBubble,
- boolean cancelable,
- Window? view,
- boolean ctrlKey,
- boolean altKey,
- boolean shiftKey,
- boolean metaKey,
- unsigned long keyCode,
- unsigned long charCode);
+ optional boolean canBubble = false,
+ optional boolean cancelable = false,
+ optional Window? view = null,
+ optional boolean ctrlKey = false,
+ optional boolean altKey = false,
+ optional boolean shiftKey = false,
+ optional boolean metaKey = false,
+ optional unsigned long keyCode = 0,
+ optional unsigned long charCode = 0);
};
diff --git a/dom/webidl/MessageEvent.webidl b/dom/webidl/MessageEvent.webidl
index 548f14520..be5022d67 100644
--- a/dom/webidl/MessageEvent.webidl
+++ b/dom/webidl/MessageEvent.webidl
@@ -43,10 +43,14 @@ interface MessageEvent : Event {
[Pure, Cached, Frozen]
readonly attribute sequence<MessagePort> ports;
- void initMessageEvent(DOMString type, boolean bubbles, boolean cancelable,
- any data, DOMString origin, DOMString lastEventId,
- (WindowProxy or MessagePort)? source,
- sequence<MessagePort> ports);
+ void initMessageEvent(DOMString type,
+ optional boolean bubbles = false,
+ optional boolean cancelable = false,
+ optional any data = null,
+ optional DOMString origin = "",
+ optional DOMString lastEventId = "",
+ optional (WindowProxy or MessagePort)? source = null,
+ optional sequence<MessagePort> ports = []);
};
dictionary MessageEventInit : EventInit {
diff --git a/dom/webidl/MouseEvent.webidl b/dom/webidl/MouseEvent.webidl
index d21354801..192519d57 100644
--- a/dom/webidl/MouseEvent.webidl
+++ b/dom/webidl/MouseEvent.webidl
@@ -32,21 +32,21 @@ interface MouseEvent : UIEvent {
readonly attribute long movementY;
// Deprecated in DOM Level 3:
- void initMouseEvent(DOMString typeArg,
- boolean canBubbleArg,
- boolean cancelableArg,
- Window? viewArg,
- long detailArg,
- long screenXArg,
- long screenYArg,
- long clientXArg,
- long clientYArg,
- boolean ctrlKeyArg,
- boolean altKeyArg,
- boolean shiftKeyArg,
- boolean metaKeyArg,
- short buttonArg,
- EventTarget? relatedTargetArg);
+void initMouseEvent(DOMString typeArg,
+ optional boolean canBubbleArg = false,
+ optional boolean cancelableArg = false,
+ optional Window? viewArg = null,
+ optional long detailArg = 0,
+ optional long screenXArg = 0,
+ optional long screenYArg = 0,
+ optional long clientXArg = 0,
+ optional long clientYArg = 0,
+ optional boolean ctrlKeyArg = false,
+ optional boolean altKeyArg = false,
+ optional boolean shiftKeyArg = false,
+ optional boolean metaKeyArg = false,
+ optional short buttonArg = 0,
+ optional EventTarget? relatedTargetArg = null);
// Introduced in DOM Level 3:
boolean getModifierState(DOMString keyArg);
};
@@ -90,23 +90,23 @@ partial interface MouseEvent
readonly attribute unsigned short mozInputSource;
- void initNSMouseEvent(DOMString typeArg,
- boolean canBubbleArg,
- boolean cancelableArg,
- Window? viewArg,
- long detailArg,
- long screenXArg,
- long screenYArg,
- long clientXArg,
- long clientYArg,
- boolean ctrlKeyArg,
- boolean altKeyArg,
- boolean shiftKeyArg,
- boolean metaKeyArg,
- short buttonArg,
- EventTarget? relatedTargetArg,
- float pressure,
- unsigned short inputSourceArg);
+ void initNSMouseEvent(DOMString typeArg,
+ optional boolean canBubbleArg = false,
+ optional boolean cancelableArg = false,
+ optional Window? viewArg = null,
+ optional long detailArg = 0,
+ optional long screenXArg = 0,
+ optional long screenYArg = 0,
+ optional long clientXArg = 0,
+ optional long clientYArg = 0,
+ optional boolean ctrlKeyArg = false,
+ optional boolean altKeyArg = false,
+ optional boolean shiftKeyArg = false,
+ optional boolean metaKeyArg = false,
+ optional short buttonArg = 0,
+ optional EventTarget? relatedTargetArg = null,
+ optional float pressure = 0,
+ optional unsigned short inputSourceArg = 0);
[ChromeOnly]
readonly attribute boolean hitCluster; // True when touch occurs in a cluster of links
diff --git a/dom/webidl/MouseScrollEvent.webidl b/dom/webidl/MouseScrollEvent.webidl
index aa9e30fd2..c1e52bd8c 100644
--- a/dom/webidl/MouseScrollEvent.webidl
+++ b/dom/webidl/MouseScrollEvent.webidl
@@ -12,19 +12,19 @@ interface MouseScrollEvent : MouseEvent
readonly attribute long axis;
void initMouseScrollEvent(DOMString type,
- boolean canBubble,
- boolean cancelable,
- Window? view,
- long detail,
- long screenX,
- long screenY,
- long clientX,
- long clientY,
- boolean ctrlKey,
- boolean altKey,
- boolean shiftKey,
- boolean metaKey,
- unsigned short button,
- EventTarget? relatedTarget,
- long axis);
+ optional boolean canBubble = false,
+ optional boolean cancelable = false,
+ optional Window? view = null,
+ optional long detail = 0,
+ optional long screenX = 0,
+ optional long screenY = 0,
+ optional long clientX = 0,
+ optional long clientY = 0,
+ optional boolean ctrlKey = false,
+ optional boolean altKey = false,
+ optional boolean shiftKey = false,
+ optional boolean metaKey = false,
+ optional short button = 0,
+ optional EventTarget? relatedTarget = null,
+ optional long axis = 0);
};
diff --git a/dom/webidl/MutationEvent.webidl b/dom/webidl/MutationEvent.webidl
index 43c7b1cd0..53625b4f9 100644
--- a/dom/webidl/MutationEvent.webidl
+++ b/dom/webidl/MutationEvent.webidl
@@ -23,11 +23,11 @@ interface MutationEvent : Event
[Throws]
void initMutationEvent(DOMString type,
- boolean canBubble,
- boolean cancelable,
- Node? relatedNode,
- DOMString prevValue,
- DOMString newValue,
- DOMString attrName,
- unsigned short attrChange);
+ optional boolean canBubble = false,
+ optional boolean cancelable = false,
+ optional Node? relatedNode = null,
+ optional DOMString prevValue = "",
+ optional DOMString newValue = "",
+ optional DOMString attrName = "",
+ optional unsigned short attrChange = 0);
};
diff --git a/dom/webidl/Navigator.webidl b/dom/webidl/Navigator.webidl
index 5452f3247..c353e8be7 100644
--- a/dom/webidl/Navigator.webidl
+++ b/dom/webidl/Navigator.webidl
@@ -268,14 +268,6 @@ partial interface Navigator {
};
#endif // MOZ_GAMEPAD
-partial interface Navigator {
- [Throws, Pref="dom.vr.enabled"]
- Promise<sequence<VRDisplay>> getVRDisplays();
- // TODO: Use FrozenArray once available. (Bug 1236777)
- [Frozen, Cached, Pure, Pref="dom.vr.enabled"]
- readonly attribute sequence<VRDisplay> activeVRDisplays;
-};
-
#ifdef MOZ_TIME_MANAGER
// nsIDOMMozNavigatorTime
partial interface Navigator {
diff --git a/dom/webidl/ScrollAreaEvent.webidl b/dom/webidl/ScrollAreaEvent.webidl
index 0f48b4bc8..f24b7c0ad 100644
--- a/dom/webidl/ScrollAreaEvent.webidl
+++ b/dom/webidl/ScrollAreaEvent.webidl
@@ -12,12 +12,12 @@ interface ScrollAreaEvent : UIEvent
readonly attribute float height;
void initScrollAreaEvent(DOMString type,
- boolean canBubble,
- boolean cancelable,
- Window? view,
- long detail,
- float x,
- float y,
- float width,
- float height);
+ optional boolean canBubble = false,
+ optional boolean cancelable = false,
+ optional Window? view = null,
+ optional long detail = 0,
+ optional float x = 0,
+ optional float y = 0,
+ optional float width = 0,
+ optional float height = 0);
};
diff --git a/dom/webidl/SimpleGestureEvent.webidl b/dom/webidl/SimpleGestureEvent.webidl
index 0829076dd..76d0d20f6 100644
--- a/dom/webidl/SimpleGestureEvent.webidl
+++ b/dom/webidl/SimpleGestureEvent.webidl
@@ -25,22 +25,22 @@ interface SimpleGestureEvent : MouseEvent
readonly attribute unsigned long clickCount;
void initSimpleGestureEvent(DOMString typeArg,
- boolean canBubbleArg,
- boolean cancelableArg,
- Window? viewArg,
- long detailArg,
- long screenXArg,
- long screenYArg,
- long clientXArg,
- long clientYArg,
- boolean ctrlKeyArg,
- boolean altKeyArg,
- boolean shiftKeyArg,
- boolean metaKeyArg,
- unsigned short buttonArg,
- EventTarget? relatedTargetArg,
- unsigned long allowedDirectionsArg,
- unsigned long directionArg,
- double deltaArg,
- unsigned long clickCount);
+ optional boolean canBubbleArg = false,
+ optional boolean cancelableArg = false,
+ optional Window? viewArg = null,
+ optional long detailArg = 0,
+ optional long screenXArg = 0,
+ optional long screenYArg = 0,
+ optional long clientXArg = 0,
+ optional long clientYArg = 0,
+ optional boolean ctrlKeyArg = false,
+ optional boolean altKeyArg = false,
+ optional boolean shiftKeyArg = false,
+ optional boolean metaKeyArg = false,
+ optional short buttonArg = 0,
+ optional EventTarget? relatedTargetArg = null,
+ optional unsigned long allowedDirectionsArg = 0,
+ optional unsigned long directionArg = 0,
+ optional double deltaArg = 0,
+ optional unsigned long clickCount = 0);
};
diff --git a/dom/webidl/StorageEvent.webidl b/dom/webidl/StorageEvent.webidl
index c3e9605eb..e03f8232c 100644
--- a/dom/webidl/StorageEvent.webidl
+++ b/dom/webidl/StorageEvent.webidl
@@ -21,13 +21,13 @@ interface StorageEvent : Event
// Bug 1016053 - This is not spec compliant.
void initStorageEvent(DOMString type,
- boolean canBubble,
- boolean cancelable,
- DOMString? key,
- DOMString? oldValue,
- DOMString? newValue,
- DOMString? url,
- Storage? storageArea);
+ optional boolean canBubble = false,
+ optional boolean cancelable = false,
+ optional DOMString? key = null,
+ optional DOMString? oldValue = null,
+ optional DOMString? newValue = null,
+ optional DOMString? url = null,
+ optional Storage? storageArea = null);
};
dictionary StorageEventInit : EventInit
diff --git a/dom/webidl/TestInterfaceJS.webidl b/dom/webidl/TestInterfaceJS.webidl
index 1ca629c39..2cf8d701a 100644
--- a/dom/webidl/TestInterfaceJS.webidl
+++ b/dom/webidl/TestInterfaceJS.webidl
@@ -24,7 +24,7 @@ interface TestInterfaceJS : EventTarget {
any pingPongObjectOrString((object or DOMString) objOrString);
TestInterfaceJSDictionary pingPongDictionary(optional TestInterfaceJSDictionary dict);
long pingPongDictionaryOrLong(optional (TestInterfaceJSUnionableDictionary or long) dictOrLong);
- DOMString pingPongMap(MozMap<any> map);
+ DOMString pingPongMap(record<DOMString, any> map);
long objectSequenceLength(sequence<object> seq);
long anySequenceLength(sequence<any> seq);
diff --git a/dom/webidl/TimeEvent.webidl b/dom/webidl/TimeEvent.webidl
index 40e7a0beb..8bbe4db53 100644
--- a/dom/webidl/TimeEvent.webidl
+++ b/dom/webidl/TimeEvent.webidl
@@ -15,6 +15,6 @@ interface TimeEvent : Event
readonly attribute long detail;
readonly attribute WindowProxy? view;
void initTimeEvent(DOMString aType,
- Window? aView,
- long aDetail);
+ optional Window? aView = null,
+ optional long aDetail = 0);
};
diff --git a/dom/webidl/TouchEvent.webidl b/dom/webidl/TouchEvent.webidl
index d206fe0fb..fd677787a 100644
--- a/dom/webidl/TouchEvent.webidl
+++ b/dom/webidl/TouchEvent.webidl
@@ -23,15 +23,15 @@ interface TouchEvent : UIEvent {
readonly attribute boolean shiftKey;
void initTouchEvent(DOMString type,
- boolean canBubble,
- boolean cancelable,
- Window? view,
- long detail,
- boolean ctrlKey,
- boolean altKey,
- boolean shiftKey,
- boolean metaKey,
- TouchList? touches,
- TouchList? targetTouches,
- TouchList? changedTouches);
+ optional boolean canBubble = false,
+ optional boolean cancelable = false,
+ optional Window? view = null,
+ optional long detail = 0,
+ optional boolean ctrlKey = false,
+ optional boolean altKey = false,
+ optional boolean shiftKey = false,
+ optional boolean metaKey = false,
+ optional TouchList? touches = null,
+ optional TouchList? targetTouches = null,
+ optional TouchList? changedTouches = null);
};
diff --git a/dom/webidl/UIEvent.webidl b/dom/webidl/UIEvent.webidl
index 9cc1d0cdf..5be6a443a 100644
--- a/dom/webidl/UIEvent.webidl
+++ b/dom/webidl/UIEvent.webidl
@@ -16,10 +16,10 @@ interface UIEvent : Event
readonly attribute WindowProxy? view;
readonly attribute long detail;
void initUIEvent(DOMString aType,
- boolean aCanBubble,
- boolean aCancelable,
- Window? aView,
- long aDetail);
+ optional boolean aCanBubble = false,
+ optional boolean aCancelable = false,
+ optional Window? aView = null,
+ optional long aDetail = 0);
};
// Additional DOM0 properties.
diff --git a/dom/webidl/URLSearchParams.webidl b/dom/webidl/URLSearchParams.webidl
index 93e846071..b93f4e8b1 100644
--- a/dom/webidl/URLSearchParams.webidl
+++ b/dom/webidl/URLSearchParams.webidl
@@ -13,8 +13,7 @@
* http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0.
*/
-[Constructor(optional USVString init = ""),
- Constructor(URLSearchParams init),
+[Constructor(optional (sequence<sequence<USVString>> or record<USVString, USVString> or USVString) init = ""),
Exposed=(Window,Worker,WorkerDebugger,System)]
interface URLSearchParams {
void append(USVString name, USVString value);
diff --git a/dom/webidl/VRDisplay.webidl b/dom/webidl/VRDisplay.webidl
deleted file mode 100644
index 63ebd1205..000000000
--- a/dom/webidl/VRDisplay.webidl
+++ /dev/null
@@ -1,286 +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 VREye {
- "left",
- "right"
-};
-
-[Pref="dom.vr.enabled",
- HeaderFile="mozilla/dom/VRDisplay.h"]
-interface VRFieldOfView {
- readonly attribute double upDegrees;
- readonly attribute double rightDegrees;
- readonly attribute double downDegrees;
- readonly attribute double leftDegrees;
-};
-
-typedef (HTMLCanvasElement or OffscreenCanvas) VRSource;
-
-dictionary VRLayer {
- /**
- * XXX - When WebVR in WebWorkers is implemented, HTMLCanvasElement below
- * should be replaced with VRSource.
- */
- HTMLCanvasElement? source = null;
-
- /**
- * The left and right viewports contain 4 values defining the viewport
- * rectangles within the canvas to present to the eye in UV space.
- * [0] left offset of the viewport (0.0 - 1.0)
- * [1] top offset of the viewport (0.0 - 1.0)
- * [2] width of the viewport (0.0 - 1.0)
- * [3] height of the viewport (0.0 - 1.0)
- *
- * When no values are passed, they will be processed as though the left
- * and right sides of the viewport were passed:
- *
- * leftBounds: [0.0, 0.0, 0.5, 1.0]
- * rightBounds: [0.5, 0.0, 0.5, 1.0]
- */
- sequence<float> leftBounds = [];
- sequence<float> rightBounds = [];
-};
-
-/**
- * Values describing the capabilities of a VRDisplay.
- * These are expected to be static per-device/per-user.
- */
-[Pref="dom.vr.enabled",
- HeaderFile="mozilla/dom/VRDisplay.h"]
-interface VRDisplayCapabilities {
- /**
- * hasPosition is true if the VRDisplay is capable of tracking its position.
- */
- readonly attribute boolean hasPosition;
-
- /**
- * hasOrientation is true if the VRDisplay is capable of tracking its orientation.
- */
- readonly attribute boolean hasOrientation;
-
- /**
- * Whether the VRDisplay is separate from the device’s
- * primary display. If presenting VR content will obscure
- * other content on the device, this should be false. When
- * false, the application should not attempt to mirror VR content
- * or update non-VR UI because that content will not be visible.
- */
- readonly attribute boolean hasExternalDisplay;
-
- /**
- * Whether the VRDisplay is capable of presenting content to an HMD or similar device.
- * Can be used to indicate “magic window” devices that are capable of 6DoF tracking but for
- * which requestPresent is not meaningful. If false then calls to requestPresent should
- * always fail, and getEyeParameters should return null.
- */
- readonly attribute boolean canPresent;
-
- /**
- * Indicates the maximum length of the array that requestPresent() will accept. MUST be 1 if
- canPresent is true, 0 otherwise.
- */
- readonly attribute unsigned long maxLayers;
-};
-
-/**
- * Values describing the the stage / play area for devices
- * that support room-scale experiences.
- */
-[Pref="dom.vr.enabled",
- HeaderFile="mozilla/dom/VRDisplay.h"]
-interface VRStageParameters {
- /**
- * A 16-element array containing the components of a column-major 4x4
- * affine transform matrix. This matrix transforms the sitting-space position
- * returned by get{Immediate}Pose() to a standing-space position.
- */
- [Throws] readonly attribute Float32Array sittingToStandingTransform;
-
- /**
- * Dimensions of the play-area bounds. The bounds are defined
- * as an axis-aligned rectangle on the floor.
- * The center of the rectangle is at (0,0,0) in standing-space
- * coordinates.
- * These bounds are defined for safety purposes.
- * Content should not require the user to move beyond these
- * bounds; however, it is possible for the user to ignore
- * the bounds resulting in position values outside of
- * this rectangle.
- */
- readonly attribute float sizeX;
- readonly attribute float sizeZ;
-};
-
-[Pref="dom.vr.enabled",
- HeaderFile="mozilla/dom/VRDisplay.h"]
-interface VRPose
-{
- /**
- * position, linearVelocity, and linearAcceleration are 3-component vectors.
- * position is relative to a sitting space. Transforming this point with
- * VRStageParameters.sittingToStandingTransform converts this to standing space.
- */
- [Constant, Throws] readonly attribute Float32Array? position;
- [Constant, Throws] readonly attribute Float32Array? linearVelocity;
- [Constant, Throws] readonly attribute Float32Array? linearAcceleration;
-
- /* orientation is a 4-entry array representing the components of a quaternion. */
- [Constant, Throws] readonly attribute Float32Array? orientation;
- /* angularVelocity and angularAcceleration are the components of 3-dimensional vectors. */
- [Constant, Throws] readonly attribute Float32Array? angularVelocity;
- [Constant, Throws] readonly attribute Float32Array? angularAcceleration;
-};
-
-[Constructor,
- Pref="dom.vr.enabled",
- HeaderFile="mozilla/dom/VRDisplay.h"]
-interface VRFrameData {
- readonly attribute DOMHighResTimeStamp timestamp;
-
- [Throws, Pure] readonly attribute Float32Array leftProjectionMatrix;
- [Throws, Pure] readonly attribute Float32Array leftViewMatrix;
-
- [Throws, Pure] readonly attribute Float32Array rightProjectionMatrix;
- [Throws, Pure] readonly attribute Float32Array rightViewMatrix;
-
- [Pure] readonly attribute VRPose pose;
-};
-
-[Pref="dom.vr.enabled",
- HeaderFile="mozilla/dom/VRDisplay.h"]
-interface VREyeParameters {
- /**
- * offset is a 3-component vector representing an offset to
- * translate the eye. This value may vary from frame
- * to frame if the user adjusts their headset ipd.
- */
- [Constant, Throws] readonly attribute Float32Array offset;
-
- /* These values may vary as the user adjusts their headset ipd. */
- [Constant] readonly attribute VRFieldOfView fieldOfView;
-
- /**
- * renderWidth and renderHeight specify the recommended render target
- * size of each eye viewport, in pixels. If multiple eyes are rendered
- * in a single render target, then the render target should be made large
- * enough to fit both viewports.
- */
- [Constant] readonly attribute unsigned long renderWidth;
- [Constant] readonly attribute unsigned long renderHeight;
-};
-
-[Pref="dom.vr.enabled",
- HeaderFile="mozilla/dom/VRDisplay.h"]
-interface VRDisplay : EventTarget {
- readonly attribute boolean isConnected;
- readonly attribute boolean isPresenting;
-
- /**
- * Dictionary of capabilities describing the VRDisplay.
- */
- [Constant] readonly attribute VRDisplayCapabilities capabilities;
-
- /**
- * If this VRDisplay supports room-scale experiences, the optional
- * stage attribute contains details on the room-scale parameters.
- */
- readonly attribute VRStageParameters? stageParameters;
-
- /* Return the current VREyeParameters for the given eye. */
- VREyeParameters getEyeParameters(VREye whichEye);
-
- /**
- * An identifier for this distinct VRDisplay. Used as an
- * association point in the Gamepad API.
- */
- [Constant] readonly attribute unsigned long displayId;
-
- /**
- * A display name, a user-readable name identifying it.
- */
- [Constant] readonly attribute DOMString displayName;
-
- /**
- * Populates the passed VRFrameData with the information required to render
- * the current frame.
- */
- boolean getFrameData(VRFrameData frameData);
-
- /**
- * Return a VRPose containing the future predicted pose of the VRDisplay
- * when the current frame will be presented. Subsequent calls to getPose()
- * MUST return a VRPose with the same values until the next call to
- * submitFrame().
- *
- * The VRPose will contain the position, orientation, velocity,
- * and acceleration of each of these properties.
- */
- [NewObject] VRPose getPose();
-
- /**
- * Reset the pose for this display, treating its current position and
- * orientation as the "origin/zero" values. VRPose.position,
- * VRPose.orientation, and VRStageParameters.sittingToStandingTransform may be
- * updated when calling resetPose(). This should be called in only
- * sitting-space experiences.
- */
- void resetPose();
-
- /**
- * z-depth defining the near plane of the eye view frustum
- * enables mapping of values in the render target depth
- * attachment to scene coordinates. Initially set to 0.01.
- */
- attribute double depthNear;
-
- /**
- * z-depth defining the far plane of the eye view frustum
- * enables mapping of values in the render target depth
- * attachment to scene coordinates. Initially set to 10000.0.
- */
- attribute double depthFar;
-
- /**
- * The callback passed to `requestAnimationFrame` will be called
- * any time a new frame should be rendered. When the VRDisplay is
- * presenting the callback will be called at the native refresh
- * rate of the HMD. When not presenting this function acts
- * identically to how window.requestAnimationFrame acts. Content should
- * make no assumptions of frame rate or vsync behavior as the HMD runs
- * asynchronously from other displays and at differing refresh rates.
- */
- [Throws] long requestAnimationFrame(FrameRequestCallback callback);
-
- /**
- * Passing the value returned by `requestAnimationFrame` to
- * `cancelAnimationFrame` will unregister the callback.
- */
- [Throws] void cancelAnimationFrame(long handle);
-
- /**
- * Begin presenting to the VRDisplay. Must be called in response to a user gesture.
- * Repeat calls while already presenting will update the VRLayers being displayed.
- */
- [Throws] Promise<void> requestPresent(sequence<VRLayer> layers);
-
- /**
- * Stops presenting to the VRDisplay.
- */
- [Throws] Promise<void> exitPresent();
-
- /**
- * Get the layers currently being presented.
- */
- sequence<VRLayer> getLayers();
-
- /**
- * The VRLayer provided to the VRDisplay will be captured and presented
- * in the HMD. Calling this function has the same effect on the source
- * canvas as any other operation that uses its source image, and canvases
- * created without preserveDrawingBuffer set to true will be cleared.
- */
- void submitFrame();
-};
diff --git a/dom/webidl/XULCommandEvent.webidl b/dom/webidl/XULCommandEvent.webidl
index 9c024edc1..72dc3802e 100644
--- a/dom/webidl/XULCommandEvent.webidl
+++ b/dom/webidl/XULCommandEvent.webidl
@@ -15,13 +15,13 @@ interface XULCommandEvent : UIEvent
readonly attribute Event? sourceEvent;
void initCommandEvent(DOMString type,
- boolean canBubble,
- boolean cancelable,
- Window? view,
- long detail,
- boolean ctrlKey,
- boolean altKey,
- boolean shiftKey,
- boolean metaKey,
- Event? sourceEvent);
+ optional boolean canBubble = false,
+ optional boolean cancelable = false,
+ optional Window? view = null,
+ optional long detail = 0,
+ optional boolean ctrlKey = false,
+ optional boolean altKey = false,
+ optional boolean shiftKey = false,
+ optional boolean metaKey = false,
+ optional Event? sourceEvent = null);
};
diff --git a/dom/webidl/moz.build b/dom/webidl/moz.build
index 4c2567a1c..0fe10eff9 100644
--- a/dom/webidl/moz.build
+++ b/dom/webidl/moz.build
@@ -555,7 +555,6 @@ WEBIDL_FILES = [
'VideoStreamTrack.webidl',
'VideoTrack.webidl',
'VideoTrackList.webidl',
- 'VRDisplay.webidl',
'VTTCue.webidl',
'VTTRegion.webidl',
'WaveShaperNode.webidl',
@@ -592,9 +591,6 @@ WEBIDL_FILES = [
'XULElement.webidl',
]
-if CONFIG['MOZ_WEBEXTENSIONS']:
- WEBIDL_FILES += ['AddonManager.webidl']
-
if CONFIG['MOZ_AUDIO_CHANNEL_MANAGER']:
WEBIDL_FILES += [
'AudioChannelManager.webidl',
@@ -723,9 +719,6 @@ GENERATED_EVENTS_WEBIDL_FILES = [
'WebGLContextEvent.webidl',
]
-if CONFIG['MOZ_WEBEXTENSIONS']:
- GENERATED_EVENTS_WEBIDL_FILES += ['AddonEvent.webidl']
-
if CONFIG['MOZ_WEBRTC']:
GENERATED_EVENTS_WEBIDL_FILES += [
'RTCDataChannelEvent.webidl',
@@ -753,7 +746,7 @@ if CONFIG['MOZ_BUILD_APP'] in ['xulrunner'] or CONFIG['MOZ_PHOENIX'] or CONFIG['
'BrowserFeedWriter.webidl',
]
-if CONFIG['MOZ_PHOENIX'] or CONFIG['MOZ_FENNEC'] or CONFIG['MOZ_XULRUNNER']:
+if CONFIG['MOZ_PHOENIX'] or CONFIG['MOZ_XULRUNNER']:
WEBIDL_FILES += [
'External.webidl',
]