mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-27 19:51:34 +00:00
Try to enable all webidls (#573)
* Try to enable all webidls * Separate out unavailable webidl files by reason. * Create record of fully tested WebIDL files * Update notes to reflect new situation with web-idl * Make a blank ident fail, disable the necessary widls. It turns out that all the blank idents came from blank enum variants, which is allowed in webidl apparently.
This commit is contained in:
committed by
Alex Crichton
parent
b7af4e3169
commit
71255acf5d
99
crates/web-sys/webidls/unavailable_enum_ident/Gamepad.webidl
vendored
Normal file
99
crates/web-sys/webidls/unavailable_enum_ident/Gamepad.webidl
vendored
Normal file
@ -0,0 +1,99 @@
|
||||
/* -*- 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/gamepad/
|
||||
* https://w3c.github.io/gamepad/extensions.html
|
||||
* https://w3c.github.io/webvr/spec/1.1/#interface-gamepad
|
||||
*/
|
||||
|
||||
[Pref="dom.gamepad.enabled"]
|
||||
interface GamepadButton {
|
||||
readonly attribute boolean pressed;
|
||||
readonly attribute boolean touched;
|
||||
readonly attribute double value;
|
||||
};
|
||||
|
||||
enum GamepadHand {
|
||||
"",
|
||||
"left",
|
||||
"right"
|
||||
};
|
||||
|
||||
enum GamepadMappingType {
|
||||
"",
|
||||
"standard"
|
||||
};
|
||||
|
||||
[Pref="dom.gamepad.enabled"]
|
||||
interface Gamepad {
|
||||
/**
|
||||
* An identifier, unique per type of device.
|
||||
*/
|
||||
readonly attribute DOMString id;
|
||||
|
||||
/**
|
||||
* The game port index for the device. Unique per device
|
||||
* attached to this system.
|
||||
*/
|
||||
readonly attribute unsigned long index;
|
||||
|
||||
/**
|
||||
* The mapping in use for this device. The empty string
|
||||
* indicates that no mapping is in use.
|
||||
*/
|
||||
readonly attribute GamepadMappingType mapping;
|
||||
|
||||
/**
|
||||
* The hand in use for this device. The empty string
|
||||
* indicates that unknown, both hands, or not applicable
|
||||
*/
|
||||
[Pref="dom.gamepad.extensions.enabled"]
|
||||
readonly attribute GamepadHand hand;
|
||||
|
||||
/**
|
||||
* The displayId in use for as an association point in the VRDisplay API
|
||||
* to identify which VRDisplay that the gamepad is associated with.
|
||||
*/
|
||||
[Pref="dom.vr.enabled"]
|
||||
readonly attribute unsigned long displayId;
|
||||
|
||||
/**
|
||||
* true if this gamepad is currently connected to the system.
|
||||
*/
|
||||
readonly attribute boolean connected;
|
||||
|
||||
/**
|
||||
* The current state of all buttons on the device, an
|
||||
* array of GamepadButton.
|
||||
*/
|
||||
[Pure, Cached, Frozen]
|
||||
readonly attribute sequence<GamepadButton> buttons;
|
||||
|
||||
/**
|
||||
* The current position of all axes on the device, an
|
||||
* array of doubles.
|
||||
*/
|
||||
[Pure, Cached, Frozen]
|
||||
readonly attribute sequence<double> axes;
|
||||
|
||||
/**
|
||||
* Timestamp from when the data of this device was last updated.
|
||||
*/
|
||||
readonly attribute DOMHighResTimeStamp timestamp;
|
||||
|
||||
/**
|
||||
* The current pose of the device, a GamepadPose.
|
||||
*/
|
||||
[Pref="dom.gamepad.extensions.enabled"]
|
||||
readonly attribute GamepadPose? pose;
|
||||
|
||||
/**
|
||||
* The current haptic actuator of the device, an array of
|
||||
* GamepadHapticActuator.
|
||||
*/
|
||||
[Constant, Cached, Frozen, Pref="dom.gamepad.extensions.enabled"]
|
||||
readonly attribute sequence<GamepadHapticActuator> hapticActuators;
|
||||
};
|
1
crates/web-sys/webidls/unavailable_enum_ident/README.md
Normal file
1
crates/web-sys/webidls/unavailable_enum_ident/README.md
Normal file
@ -0,0 +1 @@
|
||||
These WebIDL files have enum variants that are not valid rust Idents, for example "2x", or "".
|
82
crates/web-sys/webidls/unavailable_enum_ident/Request.webidl
vendored
Normal file
82
crates/web-sys/webidls/unavailable_enum_ident/Request.webidl
vendored
Normal file
@ -0,0 +1,82 @@
|
||||
/* -*- Mode: IDL; tab-width: 1; 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://fetch.spec.whatwg.org/#request-class
|
||||
*/
|
||||
|
||||
typedef (Request or USVString) RequestInfo;
|
||||
typedef unsigned long nsContentPolicyType;
|
||||
|
||||
[Constructor(RequestInfo input, optional RequestInit init),
|
||||
Exposed=(Window,Worker)]
|
||||
interface Request {
|
||||
readonly attribute ByteString method;
|
||||
readonly attribute USVString url;
|
||||
[SameObject] readonly attribute Headers headers;
|
||||
|
||||
readonly attribute RequestDestination destination;
|
||||
readonly attribute USVString referrer;
|
||||
readonly attribute ReferrerPolicy referrerPolicy;
|
||||
readonly attribute RequestMode mode;
|
||||
readonly attribute RequestCredentials credentials;
|
||||
readonly attribute RequestCache cache;
|
||||
readonly attribute RequestRedirect redirect;
|
||||
readonly attribute DOMString integrity;
|
||||
|
||||
// If a main-thread fetch() promise rejects, the error passed will be a
|
||||
// nsresult code.
|
||||
[ChromeOnly]
|
||||
readonly attribute boolean mozErrors;
|
||||
|
||||
[BinaryName="getOrCreateSignal"]
|
||||
readonly attribute AbortSignal signal;
|
||||
|
||||
[Throws,
|
||||
NewObject] Request clone();
|
||||
|
||||
// Bug 1124638 - Allow chrome callers to set the context.
|
||||
[ChromeOnly]
|
||||
void overrideContentPolicyType(nsContentPolicyType context);
|
||||
};
|
||||
Request implements Body;
|
||||
|
||||
dictionary RequestInit {
|
||||
ByteString method;
|
||||
HeadersInit headers;
|
||||
BodyInit? body;
|
||||
USVString referrer;
|
||||
ReferrerPolicy referrerPolicy;
|
||||
RequestMode mode;
|
||||
RequestCredentials credentials;
|
||||
RequestCache cache;
|
||||
RequestRedirect redirect;
|
||||
DOMString integrity;
|
||||
|
||||
[ChromeOnly]
|
||||
boolean mozErrors;
|
||||
|
||||
AbortSignal? signal;
|
||||
|
||||
[Func="mozilla::dom::DOMPrefs::FetchObserverEnabled"]
|
||||
ObserverCallback observe;
|
||||
};
|
||||
|
||||
enum RequestDestination {
|
||||
"",
|
||||
"audio", "audioworklet", "document", "embed", "font", "image", "manifest", "object",
|
||||
"paintworklet", "report", "script", "sharedworker", "style", "track", "video",
|
||||
"worker", "xslt"
|
||||
};
|
||||
|
||||
enum RequestMode { "same-origin", "no-cors", "cors", "navigate" };
|
||||
enum RequestCredentials { "omit", "same-origin", "include" };
|
||||
enum RequestCache { "default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached" };
|
||||
enum RequestRedirect { "follow", "error", "manual" };
|
||||
enum ReferrerPolicy {
|
||||
"", "no-referrer", "no-referrer-when-downgrade", "origin",
|
||||
"origin-when-cross-origin", "unsafe-url", "same-origin", "strict-origin",
|
||||
"strict-origin-when-cross-origin"
|
||||
};
|
73
crates/web-sys/webidls/unavailable_enum_ident/VTTCue.webidl
vendored
Normal file
73
crates/web-sys/webidls/unavailable_enum_ident/VTTCue.webidl
vendored
Normal file
@ -0,0 +1,73 @@
|
||||
/* -*- 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
|
||||
* http://dev.w3.org/html5/webvtt/#the-vttcue-interface
|
||||
*/
|
||||
|
||||
enum AutoKeyword { "auto" };
|
||||
|
||||
enum LineAlignSetting {
|
||||
"start",
|
||||
"center",
|
||||
"end"
|
||||
};
|
||||
|
||||
enum PositionAlignSetting {
|
||||
"line-left",
|
||||
"center",
|
||||
"line-right",
|
||||
"auto"
|
||||
};
|
||||
|
||||
enum AlignSetting {
|
||||
"start",
|
||||
"center",
|
||||
"end",
|
||||
"left",
|
||||
"right"
|
||||
};
|
||||
|
||||
enum DirectionSetting {
|
||||
"",
|
||||
"rl",
|
||||
"lr"
|
||||
};
|
||||
|
||||
[Constructor(double startTime, double endTime, DOMString text)]
|
||||
interface VTTCue : TextTrackCue {
|
||||
[Pref="media.webvtt.regions.enabled"]
|
||||
attribute VTTRegion? region;
|
||||
attribute DirectionSetting vertical;
|
||||
attribute boolean snapToLines;
|
||||
attribute (double or AutoKeyword) line;
|
||||
[SetterThrows]
|
||||
attribute LineAlignSetting lineAlign;
|
||||
[SetterThrows]
|
||||
attribute (double or AutoKeyword) position;
|
||||
[SetterThrows]
|
||||
attribute PositionAlignSetting positionAlign;
|
||||
[SetterThrows]
|
||||
attribute double size;
|
||||
attribute AlignSetting align;
|
||||
attribute DOMString text;
|
||||
DocumentFragment getCueAsHTML();
|
||||
};
|
||||
|
||||
// Mozilla extensions.
|
||||
partial interface VTTCue {
|
||||
[ChromeOnly]
|
||||
attribute HTMLDivElement? displayState;
|
||||
[ChromeOnly]
|
||||
readonly attribute boolean hasBeenReset;
|
||||
[ChromeOnly]
|
||||
readonly attribute double computedLine;
|
||||
[ChromeOnly]
|
||||
readonly attribute double computedPosition;
|
||||
[ChromeOnly]
|
||||
readonly attribute PositionAlignSetting computedPositionAlign;
|
||||
[ChromeOnly]
|
||||
readonly attribute boolean getActive;
|
||||
};
|
32
crates/web-sys/webidls/unavailable_enum_ident/VTTRegion.webidl
vendored
Normal file
32
crates/web-sys/webidls/unavailable_enum_ident/VTTRegion.webidl
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
/* -*- 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/webvtt/#the-vttregion-interface
|
||||
*/
|
||||
|
||||
enum ScrollSetting {
|
||||
"",
|
||||
"up"
|
||||
};
|
||||
|
||||
[Constructor, Pref="media.webvtt.regions.enabled"]
|
||||
interface VTTRegion {
|
||||
attribute DOMString id;
|
||||
[SetterThrows]
|
||||
attribute double width;
|
||||
[SetterThrows]
|
||||
attribute long lines;
|
||||
[SetterThrows]
|
||||
attribute double regionAnchorX;
|
||||
[SetterThrows]
|
||||
attribute double regionAnchorY;
|
||||
[SetterThrows]
|
||||
attribute double viewportAnchorX;
|
||||
[SetterThrows]
|
||||
attribute double viewportAnchorY;
|
||||
|
||||
attribute ScrollSetting scroll;
|
||||
};
|
36
crates/web-sys/webidls/unavailable_enum_ident/WaveShaperNode.webidl
vendored
Normal file
36
crates/web-sys/webidls/unavailable_enum_ident/WaveShaperNode.webidl
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
/* -*- 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://webaudio.github.io/web-audio-api/
|
||||
*
|
||||
* Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
|
||||
* liability, trademark and document use rules apply.
|
||||
*/
|
||||
|
||||
enum OverSampleType {
|
||||
"none",
|
||||
"2x",
|
||||
"4x"
|
||||
};
|
||||
|
||||
dictionary WaveShaperOptions : AudioNodeOptions {
|
||||
sequence<float> curve;
|
||||
OverSampleType oversample = "none";
|
||||
};
|
||||
|
||||
[Pref="dom.webaudio.enabled",
|
||||
Constructor(BaseAudioContext context, optional WaveShaperOptions options)]
|
||||
interface WaveShaperNode : AudioNode {
|
||||
|
||||
[Cached, Pure, SetterThrows]
|
||||
attribute Float32Array? curve;
|
||||
attribute OverSampleType oversample;
|
||||
|
||||
};
|
||||
|
||||
// Mozilla extension
|
||||
WaveShaperNode implements AudioNodePassThrough;
|
||||
|
Reference in New Issue
Block a user