r?smaug - Add WebGLContextEvent.
draft
r?smaug - Add WebGLContextEvent.
From ad9361bfcf9be9aff34e5a706d55c955b1c0fc7d Mon Sep 17 00:00:00 2001
---
dom/tests/mochitest/general/test_interfaces.html | 2 ++
dom/webidl/WebGLContextEvent.webidl | 20 ++++++++++++++++++++
dom/webidl/WebGLRenderingContext.webidl | 16 +++-------------
dom/webidl/moz.build | 1 +
dom/workers/test/test_worker_interfaces.js | 2 ++
5 files changed, 28 insertions(+), 13 deletions(-)
create mode 100644 dom/webidl/WebGLContextEvent.webidl
MozReview-Commit-ID: LsmYiYmDB5j
--- a/dom/tests/mochitest/general/test_interfaces.html
+++ b/dom/tests/mochitest/general/test_interfaces.html
@@ -1408,16 +1408,18 @@ var interfaceNamesInGlobalScope =
{name: "VTTRegion", disabled: true},
// IMPORTANT: Do not change this list without review from a DOM peer!
"WaveShaperNode",
// IMPORTANT: Do not change this list without review from a DOM peer!
"WebGLActiveInfo",
// IMPORTANT: Do not change this list without review from a DOM peer!
"WebGLBuffer",
// IMPORTANT: Do not change this list without review from a DOM peer!
+ "WebGLContextEvent",
+// IMPORTANT: Do not change this list without review from a DOM peer!
"WebGLFramebuffer",
// IMPORTANT: Do not change this list without review from a DOM peer!
"WebGLProgram",
// IMPORTANT: Do not change this list without review from a DOM peer!
{name: "WebGLQuery", nightly: true},
// IMPORTANT: Do not change this list without review from a DOM peer!
"WebGLRenderbuffer",
// IMPORTANT: Do not change this list without review from a DOM peer!
new file mode 100644
--- /dev/null
+++ b/dom/webidl/WebGLContextEvent.webidl
@@ -0,0 +1,20 @@
+/* -*- 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://www.khronos.org/registry/webgl/specs/latest/1.0/#fire-a-webgl-context-event
+ */
+
+[Constructor(DOMString type, optional WebGLContextEventInit eventInit),
+ Exposed=(Window,Worker),
+ Func="mozilla::dom::OffscreenCanvas::PrefEnabledOnWorkerThread"]
+interface WebGLContextEvent : Event {
+ readonly attribute DOMString statusMessage;
+};
+
+// EventInit is defined in the DOM4 specification.
+dictionary WebGLContextEventInit : EventInit {
+ DOMString statusMessage = "";
+};
--- a/dom/webidl/WebGLRenderingContext.webidl
+++ b/dom/webidl/WebGLRenderingContext.webidl
@@ -788,31 +788,21 @@ interface WebGLRenderingContext {
void viewport(GLint x, GLint y, GLsizei width, GLsizei height);
};
// For OffscreenCanvas
// Reference: https://wiki.whatwg.org/wiki/OffscreenCanvas
[Exposed=(Window,Worker)]
partial interface WebGLRenderingContext {
- [Func="mozilla::dom::OffscreenCanvas::PrefEnabled"]
- void commit();
+ [Func="mozilla::dom::OffscreenCanvas::PrefEnabled"]
+ void commit();
};
-/*[Constructor(DOMString type, optional WebGLContextEventInit eventInit)]
-interface WebGLContextEvent : Event {
- readonly attribute DOMString statusMessage;
- };*/
-
-// EventInit is defined in the DOM4 specification.
-/*dictionary WebGLContextEventInit : EventInit {
- DOMString statusMessage;
- };*/
-
-
+////////////////////////////////////////
// specific extension interfaces
[NoInterfaceObject]
interface WEBGL_compressed_texture_s3tc
{
const GLenum COMPRESSED_RGB_S3TC_DXT1_EXT = 0x83F0;
const GLenum COMPRESSED_RGBA_S3TC_DXT1_EXT = 0x83F1;
const GLenum COMPRESSED_RGBA_S3TC_DXT3_EXT = 0x83F2;
--- a/dom/webidl/moz.build
+++ b/dom/webidl/moz.build
@@ -825,16 +825,17 @@ GENERATED_EVENTS_WEBIDL_FILES = [
'TrackEvent.webidl',
'TVCurrentChannelChangedEvent.webidl',
'TVCurrentSourceChangedEvent.webidl',
'TVEITBroadcastedEvent.webidl',
'TVScanningStateChangedEvent.webidl',
'UDPMessageEvent.webidl',
'UserProximityEvent.webidl',
'USSDReceivedEvent.webidl',
+ 'WebGLContextEvent.webidl',
]
if CONFIG['MOZ_WEBRTC']:
GENERATED_EVENTS_WEBIDL_FILES += [
'MediaStreamTrackEvent.webidl',
'RTCDataChannelEvent.webidl',
'RTCPeerConnectionIceEvent.webidl',
'RTCTrackEvent.webidl',
--- a/dom/workers/test/test_worker_interfaces.js
+++ b/dom/workers/test/test_worker_interfaces.js
@@ -192,16 +192,18 @@ var interfaceNamesInGlobalScope =
"URL",
// IMPORTANT: Do not change this list without review from a DOM peer!
"URLSearchParams",
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "WebGLActiveInfo", disabled: true },
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "WebGLBuffer", disabled: true },
// IMPORTANT: Do not change this list without review from a DOM peer!
+ { name: "WebGLContextEvent", disabled: true },
+// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "WebGLFramebuffer", disabled: true },
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "WebGLProgram", disabled: true },
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "WebGLRenderbuffer", disabled: true },
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "WebGLRenderingContext", disabled: true },
// IMPORTANT: Do not change this list without review from a DOM peer!