From 4ba261fe26354063c9295b192e7ce528d8fb7e83 Mon Sep 17 00:00:00 2001 From: Tom Schuster Date: Mon, 27 Nov 2023 17:54:45 +0100 Subject: [PATCH 1/3] Remove some enum/dicts only used by Gecko (ChromeOnly) webidl --- crates/web-sys/Cargo.toml | 4 - .../src/features/gen_FlexLineGrowthState.rs | 13 -- .../src/features/gen_GridDeclaration.rs | 12 -- .../src/features/gen_GridTrackState.rs | 13 -- .../src/features/gen_InstallTriggerData.rs | 71 ---------- crates/web-sys/src/features/mod.rs | 24 ---- crates/web-sys/webidls/enabled/Flex.webidl | 54 -------- crates/web-sys/webidls/enabled/Grid.webidl | 127 ------------------ .../webidls/enabled/InstallTrigger.webidl | 90 ------------- 9 files changed, 408 deletions(-) delete mode 100644 crates/web-sys/src/features/gen_FlexLineGrowthState.rs delete mode 100644 crates/web-sys/src/features/gen_GridDeclaration.rs delete mode 100644 crates/web-sys/src/features/gen_GridTrackState.rs delete mode 100644 crates/web-sys/src/features/gen_InstallTriggerData.rs delete mode 100644 crates/web-sys/webidls/enabled/Flex.webidl delete mode 100644 crates/web-sys/webidls/enabled/Grid.webidl delete mode 100644 crates/web-sys/webidls/enabled/InstallTrigger.webidl diff --git a/crates/web-sys/Cargo.toml b/crates/web-sys/Cargo.toml index cf173b987d0..3bb92946151 100644 --- a/crates/web-sys/Cargo.toml +++ b/crates/web-sys/Cargo.toml @@ -405,7 +405,6 @@ FileSystemSyncAccessHandle = [] FileSystemWritableFileStream = ["WritableStream"] FillMode = [] FlashClassification = [] -FlexLineGrowthState = [] FlowControlType = [] FocusEvent = ["Event", "UiEvent"] FocusEventInit = [] @@ -571,8 +570,6 @@ GpuVertexBufferLayout = [] GpuVertexFormat = [] GpuVertexState = [] GpuVertexStepMode = [] -GridDeclaration = [] -GridTrackState = [] GroupedHistoryEventInit = [] HalfOpenInfoDict = [] HardwareAcceleration = [] @@ -724,7 +721,6 @@ ImageTrack = ["EventTarget"] ImageTrackList = [] InputEvent = ["Event", "UiEvent"] InputEventInit = [] -InstallTriggerData = [] IntersectionObserver = [] IntersectionObserverEntry = [] IntersectionObserverEntryInit = [] diff --git a/crates/web-sys/src/features/gen_FlexLineGrowthState.rs b/crates/web-sys/src/features/gen_FlexLineGrowthState.rs deleted file mode 100644 index 8b4bd3fd985..00000000000 --- a/crates/web-sys/src/features/gen_FlexLineGrowthState.rs +++ /dev/null @@ -1,13 +0,0 @@ -#![allow(unused_imports)] -#![allow(clippy::all)] -use wasm_bindgen::prelude::*; -#[wasm_bindgen] -#[doc = "The `FlexLineGrowthState` enum."] -#[doc = ""] -#[doc = "*This API requires the following crate features to be activated: `FlexLineGrowthState`*"] -#[derive(Debug, Clone, Copy, PartialEq, Eq)] -pub enum FlexLineGrowthState { - Unchanged = "unchanged", - Shrinking = "shrinking", - Growing = "growing", -} diff --git a/crates/web-sys/src/features/gen_GridDeclaration.rs b/crates/web-sys/src/features/gen_GridDeclaration.rs deleted file mode 100644 index c01e2adba50..00000000000 --- a/crates/web-sys/src/features/gen_GridDeclaration.rs +++ /dev/null @@ -1,12 +0,0 @@ -#![allow(unused_imports)] -#![allow(clippy::all)] -use wasm_bindgen::prelude::*; -#[wasm_bindgen] -#[doc = "The `GridDeclaration` enum."] -#[doc = ""] -#[doc = "*This API requires the following crate features to be activated: `GridDeclaration`*"] -#[derive(Debug, Clone, Copy, PartialEq, Eq)] -pub enum GridDeclaration { - Explicit = "explicit", - Implicit = "implicit", -} diff --git a/crates/web-sys/src/features/gen_GridTrackState.rs b/crates/web-sys/src/features/gen_GridTrackState.rs deleted file mode 100644 index c3c43cf5564..00000000000 --- a/crates/web-sys/src/features/gen_GridTrackState.rs +++ /dev/null @@ -1,13 +0,0 @@ -#![allow(unused_imports)] -#![allow(clippy::all)] -use wasm_bindgen::prelude::*; -#[wasm_bindgen] -#[doc = "The `GridTrackState` enum."] -#[doc = ""] -#[doc = "*This API requires the following crate features to be activated: `GridTrackState`*"] -#[derive(Debug, Clone, Copy, PartialEq, Eq)] -pub enum GridTrackState { - Static = "static", - Repeat = "repeat", - Removed = "removed", -} diff --git a/crates/web-sys/src/features/gen_InstallTriggerData.rs b/crates/web-sys/src/features/gen_InstallTriggerData.rs deleted file mode 100644 index 44c494c56d9..00000000000 --- a/crates/web-sys/src/features/gen_InstallTriggerData.rs +++ /dev/null @@ -1,71 +0,0 @@ -#![allow(unused_imports)] -#![allow(clippy::all)] -use super::*; -use wasm_bindgen::prelude::*; -#[wasm_bindgen] -extern "C" { - # [wasm_bindgen (extends = :: js_sys :: Object , js_name = InstallTriggerData)] - #[derive(Debug, Clone, PartialEq, Eq)] - #[doc = "The `InstallTriggerData` dictionary."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `InstallTriggerData`*"] - pub type InstallTriggerData; -} -impl InstallTriggerData { - #[doc = "Construct a new `InstallTriggerData`."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `InstallTriggerData`*"] - pub fn new() -> Self { - #[allow(unused_mut)] - let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret - } - #[doc = "Change the `Hash` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `InstallTriggerData`*"] - pub fn hash(&mut self, val: Option<&str>) -> &mut Self { - use wasm_bindgen::JsValue; - let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("Hash"), &JsValue::from(val)); - debug_assert!( - r.is_ok(), - "setting properties should never fail on our dictionary objects" - ); - let _ = r; - self - } - #[doc = "Change the `IconURL` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `InstallTriggerData`*"] - pub fn icon_url(&mut self, val: Option<&str>) -> &mut Self { - use wasm_bindgen::JsValue; - let r = ::js_sys::Reflect::set( - self.as_ref(), - &JsValue::from("IconURL"), - &JsValue::from(val), - ); - debug_assert!( - r.is_ok(), - "setting properties should never fail on our dictionary objects" - ); - let _ = r; - self - } - #[doc = "Change the `URL` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `InstallTriggerData`*"] - pub fn url(&mut self, val: &str) -> &mut Self { - use wasm_bindgen::JsValue; - let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("URL"), &JsValue::from(val)); - debug_assert!( - r.is_ok(), - "setting properties should never fail on our dictionary objects" - ); - let _ = r; - self - } -} -impl Default for InstallTriggerData { - fn default() -> Self { - Self::new() - } -} diff --git a/crates/web-sys/src/features/mod.rs b/crates/web-sys/src/features/mod.rs index 16189dcc688..4adf421a68b 100644 --- a/crates/web-sys/src/features/mod.rs +++ b/crates/web-sys/src/features/mod.rs @@ -2242,12 +2242,6 @@ mod gen_FlashClassification; #[cfg(feature = "FlashClassification")] pub use gen_FlashClassification::*; -#[cfg(feature = "FlexLineGrowthState")] -#[allow(non_snake_case)] -mod gen_FlexLineGrowthState; -#[cfg(feature = "FlexLineGrowthState")] -pub use gen_FlexLineGrowthState::*; - #[cfg(feature = "FlowControlType")] #[allow(non_snake_case)] mod gen_FlowControlType; @@ -3238,18 +3232,6 @@ mod gen_GpuVertexStepMode; #[cfg(feature = "GpuVertexStepMode")] pub use gen_GpuVertexStepMode::*; -#[cfg(feature = "GridDeclaration")] -#[allow(non_snake_case)] -mod gen_GridDeclaration; -#[cfg(feature = "GridDeclaration")] -pub use gen_GridDeclaration::*; - -#[cfg(feature = "GridTrackState")] -#[allow(non_snake_case)] -mod gen_GridTrackState; -#[cfg(feature = "GridTrackState")] -pub use gen_GridTrackState::*; - #[cfg(feature = "GroupedHistoryEventInit")] #[allow(non_snake_case)] mod gen_GroupedHistoryEventInit; @@ -4156,12 +4138,6 @@ mod gen_InputEventInit; #[cfg(feature = "InputEventInit")] pub use gen_InputEventInit::*; -#[cfg(feature = "InstallTriggerData")] -#[allow(non_snake_case)] -mod gen_InstallTriggerData; -#[cfg(feature = "InstallTriggerData")] -pub use gen_InstallTriggerData::*; - #[cfg(feature = "IntersectionObserver")] #[allow(non_snake_case)] mod gen_IntersectionObserver; diff --git a/crates/web-sys/webidls/enabled/Flex.webidl b/crates/web-sys/webidls/enabled/Flex.webidl deleted file mode 100644 index 58c713630be..00000000000 --- a/crates/web-sys/webidls/enabled/Flex.webidl +++ /dev/null @@ -1,54 +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/. - */ - -/** - * These objects support visualization of flex containers by the - * dev tools. - */ - -[ChromeOnly] -interface Flex -{ - sequence getLines(); -}; - -/** - * Lines with items that have been shrunk are shrinking; with items - * that have grown are growing, and all others are unchanged. - */ -enum FlexLineGrowthState { "unchanged", "shrinking", "growing" }; - -[ChromeOnly] -interface FlexLine -{ - readonly attribute FlexLineGrowthState growthState; - readonly attribute double crossStart; - readonly attribute double crossSize; - - // firstBaselineOffset measures from flex-start edge. - readonly attribute double firstBaselineOffset; - - // lastBaselineOffset measures from flex-end edge. - readonly attribute double lastBaselineOffset; - - /** - * getItems() returns FlexItems only for the Elements in this Flex - * container -- ignoring struts and abs-pos Elements. - */ - sequence getItems(); -}; - -[ChromeOnly] -interface FlexItem -{ - readonly attribute Node? node; - readonly attribute double mainBaseSize; - readonly attribute double mainDeltaSize; - readonly attribute double mainMinSize; - readonly attribute double mainMaxSize; - readonly attribute double crossMinSize; - readonly attribute double crossMaxSize; -}; diff --git a/crates/web-sys/webidls/enabled/Grid.webidl b/crates/web-sys/webidls/enabled/Grid.webidl deleted file mode 100644 index 0b5dbf23991..00000000000 --- a/crates/web-sys/webidls/enabled/Grid.webidl +++ /dev/null @@ -1,127 +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/. - */ - -/* These objects support visualization of a css-grid by the dev tools. */ - -/** - * Explicit and implicit types apply to tracks, lines, and areas. - * https://drafts.csswg.org/css-grid/#explicit-grids - * https://drafts.csswg.org/css-grid/#implicit-grids - */ -enum GridDeclaration { "explicit", "implicit" }; - -/** - * Tracks expanded from auto-fill are repeat , auto-fits with elements are - * also repeat, auto-fits with no elements are removed, other tracks are static. - */ -enum GridTrackState { "static", "repeat", "removed" }; - -[ChromeOnly] -interface Grid -{ - readonly attribute GridDimension rows; - readonly attribute GridDimension cols; - [Cached, Constant] - readonly attribute sequence areas; -}; - -[ChromeOnly] -interface GridDimension -{ - readonly attribute GridLines lines; - readonly attribute GridTracks tracks; -}; - -[ChromeOnly] -interface GridLines -{ - readonly attribute unsigned long length; - - /** - * This accessor method allows array-like access to lines. - * @param index A 0-indexed value. - */ - getter GridLine? item(unsigned long index); -}; - -[ChromeOnly] -interface GridLine -{ - /** - * Names include both explicit names and implicit names, which will be - * assigned if the line contributes to a named area. - * https://drafts.csswg.org/css-grid/#implicit-named-lines - */ - [Cached, Constant] - readonly attribute sequence names; - - readonly attribute double start; - - /** - * Breadth is the gap between the start of this line and the start of the - * next track in flow direction. It primarily is set by use of the -gap - * properties. - * https://drafts.csswg.org/css-grid/#gutters - */ - readonly attribute double breadth; - - readonly attribute GridDeclaration type; - - /** - * Number is the 1-indexed index of the line in flow order. The - * first explicit line has number 1, and numbers increment by 1 for - * each line after that. Lines before the first explicit line - * have number 0, which is not a valid addressable line number, and - * should be filtered out by callers. - */ - readonly attribute unsigned long number; - - /** - * NegativeNumber is the 1-indexed index of the line in reverse - * flow order. The last explicit line has negativeNumber -1, and - * negativeNumbers decrement by 1 for each line before that. - * Lines after the last explicit line have negativeNumber 0, which - * is not a valid addressable line number, and should be filtered - * out by callers. - */ - readonly attribute long negativeNumber; -}; - -[ChromeOnly] -interface GridTracks -{ - readonly attribute unsigned long length; - - /** - * This accessor method allows array-like access to tracks. - * @param index A 0-indexed value. - */ - getter GridTrack? item(unsigned long index); -}; - -[ChromeOnly] -interface GridTrack -{ - readonly attribute double start; - readonly attribute double breadth; - readonly attribute GridDeclaration type; - readonly attribute GridTrackState state; -}; - -[ChromeOnly] -interface GridArea -{ - readonly attribute DOMString name; - readonly attribute GridDeclaration type; - - /** - * These values are 1-indexed line numbers bounding the area. - */ - readonly attribute unsigned long rowStart; - readonly attribute unsigned long rowEnd; - readonly attribute unsigned long columnStart; - readonly attribute unsigned long columnEnd; -}; diff --git a/crates/web-sys/webidls/enabled/InstallTrigger.webidl b/crates/web-sys/webidls/enabled/InstallTrigger.webidl deleted file mode 100644 index 17a1d18f121..00000000000 --- a/crates/web-sys/webidls/enabled/InstallTrigger.webidl +++ /dev/null @@ -1,90 +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/. - */ - - -/** - * A callback function that webpages can implement to be notified when triggered - * installs complete. - */ -callback InstallTriggerCallback = undefined(DOMString url, short status); - -dictionary InstallTriggerData { - DOMString URL; - DOMString? IconURL; - DOMString? Hash; -}; - -/** - * The interface for the InstallTrigger object available to all websites. - */ -[ChromeOnly, - JSImplementation="@mozilla.org/addons/installtrigger;1"] -interface InstallTriggerImpl { - /** - * Retained for backwards compatibility. - */ - const unsigned short SKIN = 1; - const unsigned short LOCALE = 2; - const unsigned short CONTENT = 4; - const unsigned short PACKAGE = 7; - - /** - * Tests if installation is enabled. - */ - boolean enabled(); - - /** - * Tests if installation is enabled. - * - * @deprecated Use "enabled" in the future. - */ - boolean updateEnabled(); - - /** - * Starts a new installation of a set of add-ons. - * - * @param aArgs - * The add-ons to install. This should be a JS object, each property - * is the name of an add-on to be installed. The value of the - * property should either be a string URL, or an object with the - * following properties: - * * URL for the add-on's URL - * * IconURL for an icon for the add-on - * * Hash for a hash of the add-on - * @param aCallback - * A callback to call as each installation succeeds or fails - * @return true if the installations were successfully started - */ - boolean install(record installs, - optional InstallTriggerCallback callback); - - /** - * Starts installing a new add-on. - * - * @deprecated use "install" in the future. - * - * @param aType - * Unused, retained for backwards compatibility - * @param aUrl - * The URL of the add-on - * @param aSkin - * Unused, retained for backwards compatibility - * @return true if the installation was successfully started - */ - boolean installChrome(unsigned short type, DOMString url, DOMString skin); - - /** - * Starts installing a new add-on. - * - * @deprecated use "install" in the future. - * - * @param aUrl - * The URL of the add-on - * @param aFlags - * Unused, retained for backwards compatibility - * @return true if the installation was successfully started - */ - boolean startSoftwareUpdate(DOMString url, optional unsigned short flags); -}; From bbde8fd960bc64e2e767a6735d7d3548855ea370 Mon Sep 17 00:00:00 2001 From: Tom Schuster Date: Sun, 26 Nov 2023 14:08:52 +0100 Subject: [PATCH 2/3] Remove some enum/dicts only used by Gecko (ChromeOnly) webidl for WebRTC --- crates/web-sys/Cargo.toml | 2 - .../src/features/gen_RtcLifecycleEvent.rs | 13 -- .../gen_WebrtcGlobalStatisticsReport.rs | 45 ------ crates/web-sys/src/features/mod.rs | 12 -- .../webidls/enabled/PeerConnectionImpl.webidl | 134 ------------------ .../enabled/RTCPeerConnectionStatic.webidl | 39 ----- .../webidls/enabled/TransceiverImpl.webidl | 23 --- .../enabled/WebrtcGlobalInformation.webidl | 41 ------ 8 files changed, 309 deletions(-) delete mode 100644 crates/web-sys/src/features/gen_RtcLifecycleEvent.rs delete mode 100644 crates/web-sys/src/features/gen_WebrtcGlobalStatisticsReport.rs delete mode 100644 crates/web-sys/webidls/enabled/PeerConnectionImpl.webidl delete mode 100644 crates/web-sys/webidls/enabled/RTCPeerConnectionStatic.webidl delete mode 100644 crates/web-sys/webidls/enabled/TransceiverImpl.webidl delete mode 100644 crates/web-sys/webidls/enabled/WebrtcGlobalInformation.webidl diff --git a/crates/web-sys/Cargo.toml b/crates/web-sys/Cargo.toml index 3bb92946151..68d1ce9197e 100644 --- a/crates/web-sys/Cargo.toml +++ b/crates/web-sys/Cargo.toml @@ -1086,7 +1086,6 @@ RtcIdentityProviderOptions = [] RtcIdentityProviderRegistrar = [] RtcIdentityValidationResult = [] RtcInboundRtpStreamStats = [] -RtcLifecycleEvent = [] RtcMediaStreamStats = [] RtcMediaStreamTrackStats = [] RtcOfferAnswerOptions = [] @@ -1535,7 +1534,6 @@ WebglDepthTexture = [] WebglDrawBuffers = [] WebglLoseContext = [] WebglMultiDraw = [] -WebrtcGlobalStatisticsReport = [] WgslLanguageFeatures = [] WheelEvent = ["Event", "MouseEvent", "UiEvent"] WheelEventInit = [] diff --git a/crates/web-sys/src/features/gen_RtcLifecycleEvent.rs b/crates/web-sys/src/features/gen_RtcLifecycleEvent.rs deleted file mode 100644 index 98fd2a54e3e..00000000000 --- a/crates/web-sys/src/features/gen_RtcLifecycleEvent.rs +++ /dev/null @@ -1,13 +0,0 @@ -#![allow(unused_imports)] -#![allow(clippy::all)] -use wasm_bindgen::prelude::*; -#[wasm_bindgen] -#[doc = "The `RtcLifecycleEvent` enum."] -#[doc = ""] -#[doc = "*This API requires the following crate features to be activated: `RtcLifecycleEvent`*"] -#[derive(Debug, Clone, Copy, PartialEq, Eq)] -pub enum RtcLifecycleEvent { - Initialized = "initialized", - Icegatheringstatechange = "icegatheringstatechange", - Iceconnectionstatechange = "iceconnectionstatechange", -} diff --git a/crates/web-sys/src/features/gen_WebrtcGlobalStatisticsReport.rs b/crates/web-sys/src/features/gen_WebrtcGlobalStatisticsReport.rs deleted file mode 100644 index a06f06ede05..00000000000 --- a/crates/web-sys/src/features/gen_WebrtcGlobalStatisticsReport.rs +++ /dev/null @@ -1,45 +0,0 @@ -#![allow(unused_imports)] -#![allow(clippy::all)] -use super::*; -use wasm_bindgen::prelude::*; -#[wasm_bindgen] -extern "C" { - # [wasm_bindgen (extends = :: js_sys :: Object , js_name = WebrtcGlobalStatisticsReport)] - #[derive(Debug, Clone, PartialEq, Eq)] - #[doc = "The `WebrtcGlobalStatisticsReport` dictionary."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebrtcGlobalStatisticsReport`*"] - pub type WebrtcGlobalStatisticsReport; -} -impl WebrtcGlobalStatisticsReport { - #[doc = "Construct a new `WebrtcGlobalStatisticsReport`."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebrtcGlobalStatisticsReport`*"] - pub fn new() -> Self { - #[allow(unused_mut)] - let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret - } - #[doc = "Change the `reports` field of this object."] - #[doc = ""] - #[doc = "*This API requires the following crate features to be activated: `WebrtcGlobalStatisticsReport`*"] - pub fn reports(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - use wasm_bindgen::JsValue; - let r = ::js_sys::Reflect::set( - self.as_ref(), - &JsValue::from("reports"), - &JsValue::from(val), - ); - debug_assert!( - r.is_ok(), - "setting properties should never fail on our dictionary objects" - ); - let _ = r; - self - } -} -impl Default for WebrtcGlobalStatisticsReport { - fn default() -> Self { - Self::new() - } -} diff --git a/crates/web-sys/src/features/mod.rs b/crates/web-sys/src/features/mod.rs index 4adf421a68b..5c034caaa27 100644 --- a/crates/web-sys/src/features/mod.rs +++ b/crates/web-sys/src/features/mod.rs @@ -6328,12 +6328,6 @@ mod gen_RtcInboundRtpStreamStats; #[cfg(feature = "RtcInboundRtpStreamStats")] pub use gen_RtcInboundRtpStreamStats::*; -#[cfg(feature = "RtcLifecycleEvent")] -#[allow(non_snake_case)] -mod gen_RtcLifecycleEvent; -#[cfg(feature = "RtcLifecycleEvent")] -pub use gen_RtcLifecycleEvent::*; - #[cfg(feature = "RtcMediaStreamStats")] #[allow(non_snake_case)] mod gen_RtcMediaStreamStats; @@ -9022,12 +9016,6 @@ mod gen_WebglMultiDraw; #[cfg(feature = "WebglMultiDraw")] pub use gen_WebglMultiDraw::*; -#[cfg(feature = "WebrtcGlobalStatisticsReport")] -#[allow(non_snake_case)] -mod gen_WebrtcGlobalStatisticsReport; -#[cfg(feature = "WebrtcGlobalStatisticsReport")] -pub use gen_WebrtcGlobalStatisticsReport::*; - #[cfg(feature = "WgslLanguageFeatures")] #[allow(non_snake_case)] mod gen_WgslLanguageFeatures; diff --git a/crates/web-sys/webidls/enabled/PeerConnectionImpl.webidl b/crates/web-sys/webidls/enabled/PeerConnectionImpl.webidl deleted file mode 100644 index f6d817bea38..00000000000 --- a/crates/web-sys/webidls/enabled/PeerConnectionImpl.webidl +++ /dev/null @@ -1,134 +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/. - * - * PeerConnection.js' interface to the C++ PeerConnectionImpl. - * - * Do not confuse with RTCPeerConnection. This interface is purely for - * communication between the PeerConnection JS DOM binding and the C++ - * implementation in SIPCC. - * - * See media/webrtc/signaling/include/PeerConnectionImpl.h - * - */ - -// invalid widl -//interface nsISupports; - -/* Must be created first. Observer events will be dispatched on the thread provided */ -[ChromeOnly, Constructor] -interface PeerConnectionImpl { - /* Must be called first. Observer events dispatched on the thread provided */ - [Throws] - undefined initialize(PeerConnectionObserver observer, Window window, - RTCConfiguration iceServers, - nsISupports thread); - - /* JSEP calls */ - [Throws] - undefined createOffer(optional RTCOfferOptions options); - [Throws] - undefined createAnswer(); - [Throws] - undefined setLocalDescription(long action, DOMString sdp); - [Throws] - undefined setRemoteDescription(long action, DOMString sdp); - - /* Stats call, calls either |onGetStatsSuccess| or |onGetStatsError| on our - observer. (see the |PeerConnectionObserver| interface) */ - [Throws] - undefined getStats(MediaStreamTrack? selector); - - /* Adds the tracks created by GetUserMedia */ - [Throws] - TransceiverImpl createTransceiverImpl(DOMString kind, - MediaStreamTrack? track); - [Throws] - boolean checkNegotiationNeeded(); - [Throws] - undefined insertDTMF(TransceiverImpl transceiver, DOMString tones, - optional unsigned long duration = 100, - optional unsigned long interToneGap = 70); - [Throws] - DOMString getDTMFToneBuffer(RTCRtpSender sender); - [Throws] - sequence getRtpSources(MediaStreamTrack track, - DOMHighResTimeStamp rtpSourceNow); - DOMHighResTimeStamp getNowInRtpSourceReferenceTime(); - - [Throws] - undefined replaceTrackNoRenegotiation(TransceiverImpl transceiverImpl, - MediaStreamTrack? withTrack); - [Throws] - undefined closeStreams(); - - [Throws] - undefined addRIDExtension(MediaStreamTrack recvTrack, unsigned short extensionId); - [Throws] - undefined addRIDFilter(MediaStreamTrack recvTrack, DOMString rid); - - // Inserts CSRC data for the RtpSourceObserver for testing - [Throws] - undefined insertAudioLevelForContributingSource(MediaStreamTrack recvTrack, - unsigned long source, - DOMHighResTimeStamp timestamp, - boolean hasLevel, - byte level); - - [Throws] - undefined enablePacketDump(unsigned long level, - mozPacketDumpType type, - boolean sending); - - [Throws] - undefined disablePacketDump(unsigned long level, - mozPacketDumpType type, - boolean sending); - - /* As the ICE candidates roll in this one should be called each time - * in order to keep the candidate list up-to-date for the next SDP-related - * call PeerConnectionImpl does not parse ICE candidates, just sticks them - * into the SDP. - */ - [Throws] - undefined addIceCandidate(DOMString candidate, DOMString mid, unsigned short level); - - /* Puts the SIPCC engine back to 'kIdle', shuts down threads, deletes state */ - [Throws] - undefined close(); - - /* Notify DOM window if this plugin crash is ours. */ - boolean pluginCrash(unsigned long long pluginId, DOMString name); - - /* Attributes */ - /* This provides the implementation with the certificate it uses to - * authenticate itself. The JS side must set this before calling - * createOffer/createAnswer or retrieving the value of fingerprint. This has - * to be delayed because generating the certificate takes some time. */ - attribute RTCCertificate certificate; - [Constant] - readonly attribute DOMString fingerprint; - readonly attribute DOMString localDescription; - readonly attribute DOMString currentLocalDescription; - readonly attribute DOMString pendingLocalDescription; - readonly attribute DOMString remoteDescription; - readonly attribute DOMString currentRemoteDescription; - readonly attribute DOMString pendingRemoteDescription; - - readonly attribute PCImplIceConnectionState iceConnectionState; - readonly attribute PCImplIceGatheringState iceGatheringState; - readonly attribute PCImplSignalingState signalingState; - attribute DOMString id; - - [SetterThrows] - attribute DOMString peerIdentity; - readonly attribute boolean privacyRequested; - - /* Data channels */ - [Throws] - RTCDataChannel createDataChannel(DOMString label, DOMString protocol, - unsigned short type, boolean ordered, - unsigned short maxTime, unsigned short maxNum, - boolean externalNegotiated, unsigned short stream); -}; diff --git a/crates/web-sys/webidls/enabled/RTCPeerConnectionStatic.webidl b/crates/web-sys/webidls/enabled/RTCPeerConnectionStatic.webidl deleted file mode 100644 index 85db3f5a6a2..00000000000 --- a/crates/web-sys/webidls/enabled/RTCPeerConnectionStatic.webidl +++ /dev/null @@ -1,39 +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/. - */ - -/* - Right now, it is not possible to add static functions to a JS implemented - interface (see bug 863952), so we need to create a simple interface with a - trivial constructor and no data to hold these functions that really ought to - be static in RTCPeerConnection. - TODO(bcampen@mozilla.com) Merge this code into RTCPeerConnection once this - limitation is gone. (Bug 1017082) -*/ - -enum RTCLifecycleEvent { - "initialized", - "icegatheringstatechange", - "iceconnectionstatechange" -}; - -callback PeerConnectionLifecycleCallback = undefined (RTCPeerConnection pc, - unsigned long long windowId, - RTCLifecycleEvent eventType); - -[ChromeOnly, - Pref="media.peerconnection.enabled", - JSImplementation="@mozilla.org/dom/peerconnectionstatic;1", - Constructor()] -interface RTCPeerConnectionStatic { - - /* One slot per window (the window in which the register call is made), - automatically unregistered when window goes away. - Fires when a PC is created, and whenever the ICE connection state or - gathering state changes. */ - undefined registerPeerConnectionLifecycleCallback( - PeerConnectionLifecycleCallback cb); -}; - diff --git a/crates/web-sys/webidls/enabled/TransceiverImpl.webidl b/crates/web-sys/webidls/enabled/TransceiverImpl.webidl deleted file mode 100644 index 395c1bbdd37..00000000000 --- a/crates/web-sys/webidls/enabled/TransceiverImpl.webidl +++ /dev/null @@ -1,23 +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/. - * - * PeerConnection.js' interface to the C++ TransceiverImpl. - * - * Do not confuse with RTCRtpTransceiver. This interface is purely for - * communication between the PeerConnection JS DOM binding and the C++ - * implementation. - * - * See media/webrtc/signaling/src/peerconnection/TransceiverImpl.h - * - */ - -// Constructed by PeerConnectionImpl::CreateTransceiverImpl. -[ChromeOnly] -interface TransceiverImpl { - MediaStreamTrack getReceiveTrack(); - [Throws] - undefined syncWithJS(RTCRtpTransceiver transceiver); -}; - diff --git a/crates/web-sys/webidls/enabled/WebrtcGlobalInformation.webidl b/crates/web-sys/webidls/enabled/WebrtcGlobalInformation.webidl deleted file mode 100644 index 6c77c09fa72..00000000000 --- a/crates/web-sys/webidls/enabled/WebrtcGlobalInformation.webidl +++ /dev/null @@ -1,41 +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/. - */ - -dictionary WebrtcGlobalStatisticsReport { - sequence reports; -}; - -callback WebrtcGlobalStatisticsCallback = undefined (WebrtcGlobalStatisticsReport reports); -callback WebrtcGlobalLoggingCallback = undefined (sequence logMessages); - -[ChromeOnly] -interface WebrtcGlobalInformation { - - [Throws] - static undefined getAllStats(WebrtcGlobalStatisticsCallback callback, - optional DOMString pcIdFilter); - - static undefined clearAllStats(); - - [Throws] - static undefined getLogging(DOMString pattern, - WebrtcGlobalLoggingCallback callback); - - static undefined clearLogging(); - - // NSPR WebRTC Trace debug level (0 - 65535) - // - // Notes: - // - Setting a non-zero debug level turns on gathering of log for file output. - // - Subsequently setting a zero debug level writes that log to disk. - - static attribute long debugLevel; - - // WebRTC AEC debugging enable - static attribute boolean aecDebug; - - static readonly attribute DOMString aecDebugLogDir; -}; From 675c998e1fd043bc60fd537edac6c210c4e78d71 Mon Sep 17 00:00:00 2001 From: Tom Schuster Date: Mon, 27 Nov 2023 17:48:17 +0100 Subject: [PATCH 3/3] Update changelog for Gecko-only removals --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ece9e0c330c..a85fbfb7bf3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,10 @@ * Removed Gecko-internal dictionary bindings `Csp`, `CspPolicies`, `CspReport` and `CspReportProperties`. [#3721](https://github.com/rustwasm/wasm-bindgen/pull/3721) +* Removed Gecko-only `InstallTriggerData` and Gecko-internal `FlexLineGrowthState`, `GridDeclaration`, `GridTrackState`, + `RtcLifecycleEvent` and `WebrtcGlobalStatisticsReport` features. + [#3723](https://github.com/rustwasm/wasm-bindgen/pull/3723) + ## [0.2.88](https://github.com/rustwasm/wasm-bindgen/compare/0.2.87...0.2.88) Released 2023-11-01