summaryrefslogtreecommitdiffstats
path: root/dom/webidl
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2020-09-23 23:45:46 +0000
committerMoonchild <moonchild@palemoon.org>2020-09-23 23:45:46 +0000
commit9f5c27ba479c54d4ebb1bd59b61fbf793f6df93f (patch)
tree831e0ae1649d6135429def03688bc93ff7c86b03 /dom/webidl
parent42f895f27f239e973c9c06241f7a58da7381353c (diff)
parentf624bd1375655dea196cdcb70a9860bc5817df49 (diff)
downloadUXP-RELBASE_20200929.tar
UXP-RELBASE_20200929.tar.gz
UXP-RELBASE_20200929.tar.lz
UXP-RELBASE_20200929.tar.xz
UXP-RELBASE_20200929.zip
Merge branch 'redwood' into releaseRELBASE_20200929RC_20200924
Diffstat (limited to 'dom/webidl')
-rw-r--r--dom/webidl/MediaQueryList.webidl16
-rw-r--r--dom/webidl/MediaQueryListEvent.webidl18
-rw-r--r--dom/webidl/ResizeObserver.webidl39
-rw-r--r--dom/webidl/moz.build2
4 files changed, 69 insertions, 6 deletions
diff --git a/dom/webidl/MediaQueryList.webidl b/dom/webidl/MediaQueryList.webidl
index 519ddb0e5..af641a268 100644
--- a/dom/webidl/MediaQueryList.webidl
+++ b/dom/webidl/MediaQueryList.webidl
@@ -4,17 +4,21 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* The origin of this IDL file is
- * http://dev.w3.org/csswg/cssom-view/#the-mediaquerylist-interface
+ * https://drafts.csswg.org/cssom-view/#mediaquerylist
*
* Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
* liability, trademark and document use rules apply.
*/
-interface MediaQueryList {
+interface MediaQueryList : EventTarget {
readonly attribute DOMString media;
readonly attribute boolean matches;
- void addListener(MediaQueryListListener listener);
- void removeListener(MediaQueryListListener listener);
-};
-callback MediaQueryListListener = void (MediaQueryList list);
+ [Throws]
+ void addListener(EventListener? listener);
+
+ [Throws]
+ void removeListener(EventListener? listener);
+
+ attribute EventHandler onchange;
+};
diff --git a/dom/webidl/MediaQueryListEvent.webidl b/dom/webidl/MediaQueryListEvent.webidl
new file mode 100644
index 000000000..f3a66fb57
--- /dev/null
+++ b/dom/webidl/MediaQueryListEvent.webidl
@@ -0,0 +1,18 @@
+/* -*- 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/.
+ *
+ * https://drafts.csswg.org/cssom-view/#mediaquerylistevent
+ */
+
+[Constructor(DOMString type, optional MediaQueryListEventInit eventInitDict)]
+interface MediaQueryListEvent : Event {
+ readonly attribute DOMString media;
+ readonly attribute boolean matches;
+};
+
+dictionary MediaQueryListEventInit : EventInit {
+ DOMString media = "";
+ boolean matches = false;
+};
diff --git a/dom/webidl/ResizeObserver.webidl b/dom/webidl/ResizeObserver.webidl
new file mode 100644
index 000000000..98700f53c
--- /dev/null
+++ b/dom/webidl/ResizeObserver.webidl
@@ -0,0 +1,39 @@
+/* -*- 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/ResizeObserver/
+ */
+
+[Constructor(ResizeObserverCallback callback),
+ Exposed=Window,
+ Pref="layout.css.resizeobserver.enabled"]
+interface ResizeObserver {
+ [Throws]
+ void observe(Element? target);
+ [Throws]
+ void unobserve(Element? target);
+ void disconnect();
+};
+
+callback ResizeObserverCallback = void (sequence<ResizeObserverEntry> entries, ResizeObserver observer);
+
+[Constructor(Element? target),
+ ChromeOnly,
+ Pref="layout.css.resizeobserver.enabled"]
+interface ResizeObserverEntry {
+ readonly attribute Element target;
+ readonly attribute DOMRectReadOnly? contentRect;
+};
+
+[Constructor(Element? target),
+ ChromeOnly,
+ Pref="layout.css.resizeobserver.enabled"]
+interface ResizeObservation {
+ readonly attribute Element target;
+ readonly attribute long broadcastWidth;
+ readonly attribute long broadcastHeight;
+ boolean isActive();
+};
diff --git a/dom/webidl/moz.build b/dom/webidl/moz.build
index 687e502fa..a4214caea 100644
--- a/dom/webidl/moz.build
+++ b/dom/webidl/moz.build
@@ -365,6 +365,7 @@ WEBIDL_FILES = [
'Range.webidl',
'Rect.webidl',
'Request.webidl',
+ 'ResizeObserver.webidl',
'Response.webidl',
'RGBColor.webidl',
'RTCStatsReport.webidl',
@@ -680,6 +681,7 @@ GENERATED_EVENTS_WEBIDL_FILES = [
'HashChangeEvent.webidl',
'HiddenPluginEvent.webidl',
'ImageCaptureErrorEvent.webidl',
+ 'MediaQueryListEvent.webidl',
'MediaStreamEvent.webidl',
'MediaStreamTrackEvent.webidl',
'MozSettingsEvent.webidl',