diff options
353 files changed, 327 insertions, 1236 deletions
diff --git a/components/script/dom/analysernode.rs b/components/script/dom/analysernode.rs index 397d3102ff3..d09dd61d9f3 100644 --- a/components/script/dom/analysernode.rs +++ b/components/script/dom/analysernode.rs @@ -6,7 +6,7 @@ use crate::dom::audionode::AudioNode; use crate::dom::baseaudiocontext::BaseAudioContext; use crate::dom::bindings::cell::DomRefCell; use crate::dom::bindings::codegen::Bindings::AnalyserNodeBinding::{ - self, AnalyserNodeMethods, AnalyserOptions, + AnalyserNodeMethods, AnalyserOptions, }; use crate::dom::bindings::codegen::Bindings::AudioNodeBinding::{ ChannelCountMode, ChannelInterpretation, @@ -96,7 +96,7 @@ impl AnalyserNode { options: &AnalyserOptions, ) -> Fallible<DomRoot<AnalyserNode>> { let (node, recv) = AnalyserNode::new_inherited(window, context, options)?; - let object = reflect_dom_object(Box::new(node), window, AnalyserNodeBinding::Wrap); + let object = reflect_dom_object(Box::new(node), window); let (source, canceller) = window .task_manager() .dom_manipulation_task_source_with_canceller(); diff --git a/components/script/dom/attr.rs b/components/script/dom/attr.rs index f81a3cf9817..259a0d560c2 100644 --- a/components/script/dom/attr.rs +++ b/components/script/dom/attr.rs @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::cell::{DomRefCell, Ref}; -use crate::dom::bindings::codegen::Bindings::AttrBinding::{self, AttrMethods}; +use crate::dom::bindings::codegen::Bindings::AttrBinding::AttrMethods; use crate::dom::bindings::inheritance::Castable; use crate::dom::bindings::root::{DomRoot, LayoutDom, MutNullableDom}; use crate::dom::bindings::str::DOMString; @@ -70,7 +70,6 @@ impl Attr { document, local_name, value, name, namespace, prefix, owner, )), document, - AttrBinding::Wrap, ) } diff --git a/components/script/dom/audiobuffer.rs b/components/script/dom/audiobuffer.rs index fb598068998..ade645827a6 100644 --- a/components/script/dom/audiobuffer.rs +++ b/components/script/dom/audiobuffer.rs @@ -5,7 +5,7 @@ use crate::dom::audionode::MAX_CHANNEL_COUNT; use crate::dom::bindings::cell::{DomRefCell, Ref}; use crate::dom::bindings::codegen::Bindings::AudioBufferBinding::{ - self, AudioBufferMethods, AudioBufferOptions, + AudioBufferMethods, AudioBufferOptions, }; use crate::dom::bindings::error::{Error, Fallible}; use crate::dom::bindings::num::Finite; @@ -84,7 +84,7 @@ impl AudioBuffer { initial_data: Option<&[Vec<f32>]>, ) -> DomRoot<AudioBuffer> { let buffer = AudioBuffer::new_inherited(number_of_channels, length, sample_rate); - let buffer = reflect_dom_object(Box::new(buffer), global, AudioBufferBinding::Wrap); + let buffer = reflect_dom_object(Box::new(buffer), global); buffer.set_initial_data(initial_data); buffer } diff --git a/components/script/dom/audiobuffersourcenode.rs b/components/script/dom/audiobuffersourcenode.rs index 656cfef9699..683f32f4ec0 100644 --- a/components/script/dom/audiobuffersourcenode.rs +++ b/components/script/dom/audiobuffersourcenode.rs @@ -6,7 +6,6 @@ use crate::dom::audiobuffer::AudioBuffer; use crate::dom::audioparam::AudioParam; use crate::dom::audioscheduledsourcenode::AudioScheduledSourceNode; use crate::dom::baseaudiocontext::BaseAudioContext; -use crate::dom::bindings::codegen::Bindings::AudioBufferSourceNodeBinding; use crate::dom::bindings::codegen::Bindings::AudioBufferSourceNodeBinding::AudioBufferSourceNodeMethods; use crate::dom::bindings::codegen::Bindings::AudioBufferSourceNodeBinding::AudioBufferSourceOptions; use crate::dom::bindings::codegen::Bindings::AudioParamBinding::AutomationRate; @@ -100,11 +99,7 @@ impl AudioBufferSourceNode { options: &AudioBufferSourceOptions, ) -> Fallible<DomRoot<AudioBufferSourceNode>> { let node = AudioBufferSourceNode::new_inherited(window, context, options)?; - Ok(reflect_dom_object( - Box::new(node), - window, - AudioBufferSourceNodeBinding::Wrap, - )) + Ok(reflect_dom_object(Box::new(node), window)) } #[allow(non_snake_case)] diff --git a/components/script/dom/audiocontext.rs b/components/script/dom/audiocontext.rs index b81caed793b..f7fb005f18d 100644 --- a/components/script/dom/audiocontext.rs +++ b/components/script/dom/audiocontext.rs @@ -3,7 +3,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::baseaudiocontext::{BaseAudioContext, BaseAudioContextOptions}; -use crate::dom::bindings::codegen::Bindings::AudioContextBinding; use crate::dom::bindings::codegen::Bindings::AudioContextBinding::{ AudioContextLatencyCategory, AudioContextMethods, }; @@ -77,7 +76,7 @@ impl AudioContext { pub fn new(window: &Window, options: &AudioContextOptions) -> DomRoot<AudioContext> { let pipeline_id = window.pipeline_id(); let context = AudioContext::new_inherited(options, pipeline_id); - let context = reflect_dom_object(Box::new(context), window, AudioContextBinding::Wrap); + let context = reflect_dom_object(Box::new(context), window); context.resume(); context } diff --git a/components/script/dom/audiodestinationnode.rs b/components/script/dom/audiodestinationnode.rs index c59ec350d0b..7e820240b63 100644 --- a/components/script/dom/audiodestinationnode.rs +++ b/components/script/dom/audiodestinationnode.rs @@ -4,9 +4,7 @@ use crate::dom::audionode::{AudioNode, MAX_CHANNEL_COUNT}; use crate::dom::baseaudiocontext::BaseAudioContext; -use crate::dom::bindings::codegen::Bindings::AudioDestinationNodeBinding::{ - self, AudioDestinationNodeMethods, -}; +use crate::dom::bindings::codegen::Bindings::AudioDestinationNodeBinding::AudioDestinationNodeMethods; use crate::dom::bindings::codegen::Bindings::AudioNodeBinding::AudioNodeOptions; use crate::dom::bindings::codegen::Bindings::AudioNodeBinding::{ ChannelCountMode, ChannelInterpretation, @@ -46,7 +44,7 @@ impl AudioDestinationNode { options: &AudioNodeOptions, ) -> DomRoot<AudioDestinationNode> { let node = AudioDestinationNode::new_inherited(context, options); - reflect_dom_object(Box::new(node), global, AudioDestinationNodeBinding::Wrap) + reflect_dom_object(Box::new(node), global) } } diff --git a/components/script/dom/audiolistener.rs b/components/script/dom/audiolistener.rs index 79bbe381b07..2256efaf558 100644 --- a/components/script/dom/audiolistener.rs +++ b/components/script/dom/audiolistener.rs @@ -4,7 +4,7 @@ use crate::dom::audioparam::AudioParam; use crate::dom::baseaudiocontext::BaseAudioContext; -use crate::dom::bindings::codegen::Bindings::AudioListenerBinding::{self, AudioListenerMethods}; +use crate::dom::bindings::codegen::Bindings::AudioListenerBinding::AudioListenerMethods; use crate::dom::bindings::codegen::Bindings::AudioParamBinding::AutomationRate; use crate::dom::bindings::error::Fallible; use crate::dom::bindings::num::Finite; @@ -143,7 +143,7 @@ impl AudioListener { #[allow(unrooted_must_root)] pub fn new(window: &Window, context: &BaseAudioContext) -> DomRoot<AudioListener> { let node = AudioListener::new_inherited(window, context); - reflect_dom_object(Box::new(node), window, AudioListenerBinding::Wrap) + reflect_dom_object(Box::new(node), window) } } diff --git a/components/script/dom/audioparam.rs b/components/script/dom/audioparam.rs index 8d07a0d4bd5..dd0e72f7bcf 100644 --- a/components/script/dom/audioparam.rs +++ b/components/script/dom/audioparam.rs @@ -3,7 +3,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::baseaudiocontext::BaseAudioContext; -use crate::dom::bindings::codegen::Bindings::AudioParamBinding; use crate::dom::bindings::codegen::Bindings::AudioParamBinding::{ AudioParamMethods, AutomationRate, }; @@ -75,7 +74,7 @@ impl AudioParam { min_value, max_value, ); - reflect_dom_object(Box::new(audio_param), window, AudioParamBinding::Wrap) + reflect_dom_object(Box::new(audio_param), window) } fn message_node(&self, message: AudioNodeMessage) { diff --git a/components/script/dom/audiotrack.rs b/components/script/dom/audiotrack.rs index af237bc8b1a..19bc6d0a6cd 100644 --- a/components/script/dom/audiotrack.rs +++ b/components/script/dom/audiotrack.rs @@ -4,7 +4,7 @@ use crate::dom::audiotracklist::AudioTrackList; use crate::dom::bindings::cell::DomRefCell; -use crate::dom::bindings::codegen::Bindings::AudioTrackBinding::{self, AudioTrackMethods}; +use crate::dom::bindings::codegen::Bindings::AudioTrackBinding::AudioTrackMethods; use crate::dom::bindings::reflector::{reflect_dom_object, Reflector}; use crate::dom::bindings::root::{Dom, DomRoot}; use crate::dom::bindings::str::DOMString; @@ -55,7 +55,6 @@ impl AudioTrack { id, kind, label, language, track_list, )), window, - AudioTrackBinding::Wrap, ) } diff --git a/components/script/dom/audiotracklist.rs b/components/script/dom/audiotracklist.rs index 5191221b7d9..6a7fd3b4ebb 100644 --- a/components/script/dom/audiotracklist.rs +++ b/components/script/dom/audiotracklist.rs @@ -4,7 +4,7 @@ use crate::dom::audiotrack::AudioTrack; use crate::dom::bindings::cell::DomRefCell; -use crate::dom::bindings::codegen::Bindings::AudioTrackListBinding::{self, AudioTrackListMethods}; +use crate::dom::bindings::codegen::Bindings::AudioTrackListBinding::AudioTrackListMethods; use crate::dom::bindings::inheritance::Castable; use crate::dom::bindings::refcounted::Trusted; use crate::dom::bindings::reflector::{reflect_dom_object, DomObject}; @@ -43,7 +43,6 @@ impl AudioTrackList { reflect_dom_object( Box::new(AudioTrackList::new_inherited(tracks, media_element)), window, - AudioTrackListBinding::Wrap, ) } diff --git a/components/script/dom/beforeunloadevent.rs b/components/script/dom/beforeunloadevent.rs index b20f12650d7..d4e27e94b32 100644 --- a/components/script/dom/beforeunloadevent.rs +++ b/components/script/dom/beforeunloadevent.rs @@ -5,7 +5,6 @@ #![allow(dead_code)] use crate::dom::bindings::cell::DomRefCell; -use crate::dom::bindings::codegen::Bindings::BeforeUnloadEventBinding; use crate::dom::bindings::codegen::Bindings::BeforeUnloadEventBinding::BeforeUnloadEventMethods; use crate::dom::bindings::codegen::Bindings::EventBinding::EventMethods; use crate::dom::bindings::inheritance::Castable; @@ -33,11 +32,7 @@ impl BeforeUnloadEvent { } pub fn new_uninitialized(window: &Window) -> DomRoot<BeforeUnloadEvent> { - reflect_dom_object( - Box::new(BeforeUnloadEvent::new_inherited()), - window, - BeforeUnloadEventBinding::Wrap, - ) + reflect_dom_object(Box::new(BeforeUnloadEvent::new_inherited()), window) } pub fn new( diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py index fab5e1e713a..8f0281be802 100644 --- a/components/script/dom/bindings/codegen/CodegenRust.py +++ b/components/script/dom/bindings/codegen/CodegenRust.py @@ -2858,6 +2858,50 @@ impl PartialEq for %(name)s { """ % {'check': check, 'name': name} +class CGDomObjectWrap(CGThing): + """ + Class for codegen of an implementation of the DomObjectWrap trait. + """ + def __init__(self, descriptor): + CGThing.__init__(self) + self.descriptor = descriptor + + def define(self): + name = self.descriptor.concreteType + name = "dom::%s::%s" % (name.lower(), name) + return """\ +impl DomObjectWrap for %s { + const WRAP: unsafe fn( + SafeJSContext, + &GlobalScope, + Box<Self>, + ) -> Root<Dom<Self>> = Wrap; +} +""" % (name) + + +class CGDomObjectIteratorWrap(CGThing): + """ + Class for codegen of an implementation of the DomObjectIteratorWrap trait. + """ + def __init__(self, descriptor): + CGThing.__init__(self) + self.descriptor = descriptor + + def define(self): + assert self.descriptor.interface.isIteratorInterface() + name = self.descriptor.interface.iterableInterface.identifier.name + return """\ +impl DomObjectIteratorWrap for %s { + const ITER_WRAP: unsafe fn( + SafeJSContext, + &GlobalScope, + Box<IterableIterator<Self>>, + ) -> Root<Dom<IterableIterator<Self>>> = Wrap; +} +""" % (name) + + class CGAbstractExternMethod(CGAbstractMethod): """ Abstract base class for codegen of implementation-only (no @@ -6067,6 +6111,8 @@ def generate_imports(config, cgthings, descriptors, callbacks=None, dictionaries 'crate::dom::bindings::namespace::create_namespace_object', 'crate::dom::bindings::reflector::MutDomObject', 'crate::dom::bindings::reflector::DomObject', + 'crate::dom::bindings::reflector::DomObjectWrap', + 'crate::dom::bindings::reflector::DomObjectIteratorWrap', 'crate::dom::bindings::root::Dom', 'crate::dom::bindings::root::DomRoot', 'crate::dom::bindings::root::DomSlice', @@ -6286,6 +6332,10 @@ class CGDescriptor(CGThing): cgThings.append(CGWrapGlobalMethod(descriptor, properties)) else: cgThings.append(CGWrapMethod(descriptor)) + if descriptor.interface.isIteratorInterface(): + cgThings.append(CGDomObjectIteratorWrap(descriptor)) + else: + cgThings.append(CGDomObjectWrap(descriptor)) reexports.append('Wrap') haveUnscopables = False @@ -7445,9 +7495,7 @@ class CGIterableMethodGenerator(CGGeneric): return CGGeneric.__init__(self, fill( """ - let result = ${iterClass}::new(&*this, - IteratorType::${itrMethod}, - super::${ifaceName}IteratorBinding::Wrap); + let result = ${iterClass}::new(&*this, IteratorType::${itrMethod}); """, iterClass=iteratorNativeType(descriptor, True), ifaceName=descriptor.interface.identifier.name, diff --git a/components/script/dom/bindings/iterable.rs b/components/script/dom/bindings/iterable.rs index 17c5f2fb1ae..2eac830a4bb 100644 --- a/components/script/dom/bindings/iterable.rs +++ b/components/script/dom/bindings/iterable.rs @@ -9,8 +9,10 @@ use crate::dom::bindings::codegen::Bindings::IterableIteratorBinding::IterableKeyAndValueResult; use crate::dom::bindings::codegen::Bindings::IterableIteratorBinding::IterableKeyOrValueResult; use crate::dom::bindings::error::Fallible; -use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector}; -use crate::dom::bindings::root::{Dom, DomRoot}; +use crate::dom::bindings::reflector::{ + reflect_dom_object, DomObjectIteratorWrap, DomObjectWrap, Reflector, +}; +use crate::dom::bindings::root::{Dom, DomRoot, Root}; use crate::dom::bindings::trace::{JSTraceable, RootedTraceableBox}; use crate::dom::globalscope::GlobalScope; use crate::script_runtime::JSContext; @@ -51,27 +53,23 @@ pub trait Iterable { /// An iterator over the iterable entries of a given DOM interface. //FIXME: #12811 prevents dom_struct with type parameters #[dom_struct] -pub struct IterableIterator<T: DomObject + JSTraceable + Iterable> { +pub struct IterableIterator<T: DomObjectIteratorWrap + JSTraceable + Iterable> { reflector: Reflector, iterable: Dom<T>, type_: IteratorType, index: Cell<u32>, } -impl<T: DomObject + JSTraceable + Iterable> IterableIterator<T> { +impl<T: DomObjectIteratorWrap + JSTraceable + Iterable> IterableIterator<T> { /// Create a new iterator instance for the provided iterable DOM interface. - pub fn new( - iterable: &T, - type_: IteratorType, - wrap: unsafe fn(JSContext, &GlobalScope, Box<IterableIterator<T>>) -> DomRoot<Self>, - ) -> DomRoot<Self> { + pub fn new(iterable: &T, type_: IteratorType) -> DomRoot<Self> { let iterator = Box::new(IterableIterator { reflector: Reflector::new(), type_: type_, iterable: Dom::from_ref(iterable), index: Cell::new(0), }); - reflect_dom_object(iterator, &*iterable.global(), wrap) + reflect_dom_object(iterator, &*iterable.global()) } /// Return the next value from the iterable object. @@ -119,6 +117,10 @@ impl<T: DomObject + JSTraceable + Iterable> IterableIterator<T> { } } +impl<T: DomObjectIteratorWrap + JSTraceable + Iterable> DomObjectWrap for IterableIterator<T> { + const WRAP: unsafe fn(JSContext, &GlobalScope, Box<Self>) -> Root<Dom<Self>> = T::ITER_WRAP; +} + fn dict_return( cx: JSContext, mut result: MutableHandleObject, diff --git a/components/script/dom/bindings/reflector.rs b/components/script/dom/bindings/reflector.rs index 78635b2be31..04bf9fdbbed 100644 --- a/components/script/dom/bindings/reflector.rs +++ b/components/script/dom/bindings/reflector.rs @@ -5,7 +5,8 @@ //! The `Reflector` struct. use crate::dom::bindings::conversions::DerivedFrom; -use crate::dom::bindings::root::DomRoot; +use crate::dom::bindings::iterable::{Iterable, IterableIterator}; +use crate::dom::bindings::root::{Dom, DomRoot, Root}; use crate::dom::bindings::trace::JSTraceable; use crate::dom::globalscope::GlobalScope; use crate::script_runtime::JSContext; @@ -15,17 +16,13 @@ use std::default::Default; /// Create the reflector for a new DOM object and yield ownership to the /// reflector. -pub fn reflect_dom_object<T, U>( - obj: Box<T>, - global: &U, - wrap_fn: unsafe fn(JSContext, &GlobalScope, Box<T>) -> DomRoot<T>, -) -> DomRoot<T> +pub fn reflect_dom_object<T, U>(obj: Box<T>, global: &U) -> DomRoot<T> where - T: DomObject, + T: DomObject + DomObjectWrap, U: DerivedFrom<GlobalScope>, { let global_scope = global.upcast(); - unsafe { wrap_fn(global_scope.get_cx(), global_scope, obj) } + unsafe { T::WRAP(global_scope.get_cx(), global_scope, obj) } } /// A struct to store a reference to the reflector of a DOM object. @@ -106,3 +103,20 @@ impl MutDomObject for Reflector { self.set_jsobject(obj) } } + +/// A trait to provide a function pointer to wrap function for DOM objects. +pub trait DomObjectWrap: Sized + DomObject { + /// Function pointer to the general wrap function type + const WRAP: unsafe fn(JSContext, &GlobalScope, Box<Self>) -> Root<Dom<Self>>; +} + +/// A trait to provide a function pointer to wrap function for +/// DOM iterator interfaces. +pub trait DomObjectIteratorWrap: DomObjectWrap + JSTraceable + Iterable { + /// Function pointer to the wrap function for IterableIterator<T> + const ITER_WRAP: unsafe fn( + JSContext, + &GlobalScope, + Box<IterableIterator<Self>>, + ) -> Root<Dom<IterableIterator<Self>>>; +} diff --git a/components/script/dom/biquadfilternode.rs b/components/script/dom/biquadfilternode.rs index 5b3569eeb9b..540f094bfe5 100644 --- a/components/script/dom/biquadfilternode.rs +++ b/components/script/dom/biquadfilternode.rs @@ -9,11 +9,9 @@ use crate::dom::bindings::codegen::Bindings::AudioNodeBinding::{ ChannelCountMode, ChannelInterpretation, }; use crate::dom::bindings::codegen::Bindings::AudioParamBinding::AutomationRate; +use crate::dom::bindings::codegen::Bindings::BiquadFilterNodeBinding::BiquadFilterNodeMethods; use crate::dom::bindings::codegen::Bindings::BiquadFilterNodeBinding::BiquadFilterOptions; use crate::dom::bindings::codegen::Bindings::BiquadFilterNodeBinding::BiquadFilterType; -use crate::dom::bindings::codegen::Bindings::BiquadFilterNodeBinding::{ - self, BiquadFilterNodeMethods, -}; use crate::dom::bindings::error::Fallible; use crate::dom::bindings::reflector::reflect_dom_object; use crate::dom::bindings::root::{Dom, DomRoot}; @@ -113,11 +111,7 @@ impl BiquadFilterNode { options: &BiquadFilterOptions, ) -> Fallible<DomRoot<BiquadFilterNode>> { let node = BiquadFilterNode::new_inherited(window, context, options)?; - Ok(reflect_dom_object( - Box::new(node), - window, - BiquadFilterNodeBinding::Wrap, - )) + Ok(reflect_dom_object(Box::new(node), window)) } #[allow(non_snake_case)] diff --git a/components/script/dom/blob.rs b/components/script/dom/blob.rs index bc8799a3d8d..aba1b99ab5e 100644 --- a/components/script/dom/blob.rs +++ b/components/script/dom/blob.rs @@ -40,7 +40,6 @@ impl Blob { blob_id: blob_impl.blob_id(), }), global, - BlobBinding::Wrap, ); global.track_blob(&dom_blob, blob_impl); dom_blob diff --git a/components/script/dom/bluetooth.rs b/components/script/dom/bluetooth.rs index c769cfcef94..2bdc636dc7a 100644 --- a/components/script/dom/bluetooth.rs +++ b/components/script/dom/bluetooth.rs @@ -9,7 +9,7 @@ use bluetooth_traits::scanfilter::{BluetoothScanfilter, BluetoothScanfilterSeque use bluetooth_traits::scanfilter::{RequestDeviceoptions, ServiceUUIDSequence}; use crate::realms::{AlreadyInRealm, InRealm}; use crate::dom::bindings::cell::{DomRefCell, Ref}; -use crate::dom::bindings::codegen::Bindings::BluetoothBinding::{self, BluetoothDataFilterInit}; +use crate::dom::bindings::codegen::Bindings::BluetoothBinding::BluetoothDataFilterInit; use crate::dom::bindings::codegen::Bindings::BluetoothBinding::{BluetoothMethods, RequestDeviceOptions}; use crate::dom::bindings::codegen::Bindings::BluetoothBinding::BluetoothLEScanFilterInit; use crate::dom::bindings::codegen::Bindings::BluetoothPermissionResultBinding::BluetoothPermissionDescriptor; @@ -144,11 +144,7 @@ impl Bluetooth { } pub fn new(global: &GlobalScope) -> DomRoot<Bluetooth> { - reflect_dom_object( - Box::new(Bluetooth::new_inherited()), - global, - BluetoothBinding::Wrap, - ) + reflect_dom_object(Box::new(Bluetooth::new_inherited()), global) } fn get_bluetooth_thread(&self) -> IpcSender<BluetoothRequest> { diff --git a/components/script/dom/bluetoothadvertisingevent.rs b/components/script/dom/bluetoothadvertisingevent.rs index 7a85acb6e16..7d31fad2dc7 100644 --- a/components/script/dom/bluetoothadvertisingevent.rs +++ b/components/script/dom/bluetoothadvertisingevent.rs @@ -2,10 +2,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ +use crate::dom::bindings::codegen::Bindings::BluetoothAdvertisingEventBinding::BluetoothAdvertisingEventInit; use crate::dom::bindings::codegen::Bindings::BluetoothAdvertisingEventBinding::BluetoothAdvertisingEventMethods; -use crate::dom::bindings::codegen::Bindings::BluetoothAdvertisingEventBinding::{ - self, BluetoothAdvertisingEventInit, -}; use crate::dom::bindings::codegen::Bindings::EventBinding::EventBinding::EventMethods; use crate::dom::bindings::error::Fallible; use crate::dom::bindings::inheritance::Castable; @@ -65,7 +63,6 @@ impl BluetoothAdvertisingEvent { device, name, appearance, txPower, rssi, )), global, - BluetoothAdvertisingEventBinding::Wrap, ); { let event = ev.upcast::<Event>(); diff --git a/components/script/dom/bluetoothcharacteristicproperties.rs b/components/script/dom/bluetoothcharacteristicproperties.rs index 10dc09b77da..f48eb52772c 100644 --- a/components/script/dom/bluetoothcharacteristicproperties.rs +++ b/components/script/dom/bluetoothcharacteristicproperties.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::BluetoothCharacteristicPropertiesBinding; use crate::dom::bindings::codegen::Bindings::BluetoothCharacteristicPropertiesBinding::BluetoothCharacteristicPropertiesMethods; use crate::dom::bindings::reflector::{reflect_dom_object, Reflector}; use crate::dom::bindings::root::DomRoot; @@ -76,7 +75,6 @@ impl BluetoothCharacteristicProperties { writableAuxiliaries, )), global, - BluetoothCharacteristicPropertiesBinding::Wrap, ) } } diff --git a/components/script/dom/bluetoothdevice.rs b/components/script/dom/bluetoothdevice.rs index 3ba192aa36f..bff2e0871ff 100644 --- a/components/script/dom/bluetoothdevice.rs +++ b/components/script/dom/bluetoothdevice.rs @@ -3,7 +3,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::cell::DomRefCell; -use crate::dom::bindings::codegen::Bindings::BluetoothDeviceBinding; use crate::dom::bindings::codegen::Bindings::BluetoothDeviceBinding::BluetoothDeviceMethods; use crate::dom::bindings::codegen::Bindings::BluetoothRemoteGATTServerBinding::BluetoothRemoteGATTServerMethods; use crate::dom::bindings::error::Error; @@ -77,7 +76,6 @@ impl BluetoothDevice { reflect_dom_object( Box::new(BluetoothDevice::new_inherited(id, name, context)), global, - BluetoothDeviceBinding::Wrap, ) } diff --git a/components/script/dom/bluetoothpermissionresult.rs b/components/script/dom/bluetoothpermissionresult.rs index 1051ecebb8e..0f7266e0443 100644 --- a/components/script/dom/bluetoothpermissionresult.rs +++ b/components/script/dom/bluetoothpermissionresult.rs @@ -3,9 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::cell::DomRefCell; -use crate::dom::bindings::codegen::Bindings::BluetoothPermissionResultBinding::{ - self, BluetoothPermissionResultMethods, -}; +use crate::dom::bindings::codegen::Bindings::BluetoothPermissionResultBinding::BluetoothPermissionResultMethods; use crate::dom::bindings::codegen::Bindings::NavigatorBinding::NavigatorBinding::NavigatorMethods; use crate::dom::bindings::codegen::Bindings::PermissionStatusBinding::PermissionStatusBinding::PermissionStatusMethods; use crate::dom::bindings::codegen::Bindings::PermissionStatusBinding::{ @@ -51,7 +49,6 @@ impl BluetoothPermissionResult { reflect_dom_object( Box::new(BluetoothPermissionResult::new_inherited(status)), global, - BluetoothPermissionResultBinding::Wrap, ) } diff --git a/components/script/dom/bluetoothremotegattcharacteristic.rs b/components/script/dom/bluetoothremotegattcharacteristic.rs index d5e700a0949..fd01653c84d 100644 --- a/components/script/dom/bluetoothremotegattcharacteristic.rs +++ b/components/script/dom/bluetoothremotegattcharacteristic.rs @@ -4,7 +4,6 @@ use crate::dom::bindings::cell::DomRefCell; use crate::dom::bindings::codegen::Bindings::BluetoothCharacteristicPropertiesBinding::BluetoothCharacteristicPropertiesMethods; -use crate::dom::bindings::codegen::Bindings::BluetoothRemoteGATTCharacteristicBinding; use crate::dom::bindings::codegen::Bindings::BluetoothRemoteGATTCharacteristicBinding::BluetoothRemoteGATTCharacteristicMethods; use crate::dom::bindings::codegen::Bindings::BluetoothRemoteGATTServerBinding::BluetoothRemoteGATTServerMethods; use crate::dom::bindings::codegen::Bindings::BluetoothRemoteGATTServiceBinding::BluetoothRemoteGATTServiceMethods; @@ -77,7 +76,6 @@ impl BluetoothRemoteGATTCharacteristic { instance_id, )), global, - BluetoothRemoteGATTCharacteristicBinding::Wrap, ) } diff --git a/components/script/dom/bluetoothremotegattdescriptor.rs b/components/script/dom/bluetoothremotegattdescriptor.rs index 9680ea75cd3..39e298f923c 100644 --- a/components/script/dom/bluetoothremotegattdescriptor.rs +++ b/components/script/dom/bluetoothremotegattdescriptor.rs @@ -4,7 +4,6 @@ use crate::dom::bindings::cell::DomRefCell; use crate::dom::bindings::codegen::Bindings::BluetoothRemoteGATTCharacteristicBinding::BluetoothRemoteGATTCharacteristicMethods; -use crate::dom::bindings::codegen::Bindings::BluetoothRemoteGATTDescriptorBinding; use crate::dom::bindings::codegen::Bindings::BluetoothRemoteGATTDescriptorBinding::BluetoothRemoteGATTDescriptorMethods; use crate::dom::bindings::codegen::Bindings::BluetoothRemoteGATTServerBinding::BluetoothRemoteGATTServerMethods; use crate::dom::bindings::codegen::Bindings::BluetoothRemoteGATTServiceBinding::BluetoothRemoteGATTServiceMethods; @@ -64,7 +63,6 @@ impl BluetoothRemoteGATTDescriptor { instance_id, )), global, - BluetoothRemoteGATTDescriptorBinding::Wrap, ) } diff --git a/components/script/dom/bluetoothremotegattserver.rs b/components/script/dom/bluetoothremotegattserver.rs index 76270373d73..8a4f94fe35c 100644 --- a/components/script/dom/bluetoothremotegattserver.rs +++ b/components/script/dom/bluetoothremotegattserver.rs @@ -3,7 +3,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::codegen::Bindings::BluetoothDeviceBinding::BluetoothDeviceMethods; -use crate::dom::bindings::codegen::Bindings::BluetoothRemoteGATTServerBinding; use crate::dom::bindings::codegen::Bindings::BluetoothRemoteGATTServerBinding::BluetoothRemoteGATTServerMethods; use crate::dom::bindings::error::Error; use crate::dom::bindings::error::ErrorResult; @@ -45,7 +44,6 @@ impl BluetoothRemoteGATTServer { reflect_dom_object( Box::new(BluetoothRemoteGATTServer::new_inherited(device)), global, - BluetoothRemoteGATTServerBinding::Wrap, ) } diff --git a/components/script/dom/bluetoothremotegattservice.rs b/components/script/dom/bluetoothremotegattservice.rs index e82267a62aa..62b46a8b9bd 100644 --- a/components/script/dom/bluetoothremotegattservice.rs +++ b/components/script/dom/bluetoothremotegattservice.rs @@ -3,7 +3,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::codegen::Bindings::BluetoothRemoteGATTServerBinding::BluetoothRemoteGATTServerMethods; -use crate::dom::bindings::codegen::Bindings::BluetoothRemoteGATTServiceBinding; use crate::dom::bindings::codegen::Bindings::BluetoothRemoteGATTServiceBinding::BluetoothRemoteGATTServiceMethods; use crate::dom::bindings::error::Error; use crate::dom::bindings::reflector::reflect_dom_object; @@ -58,7 +57,6 @@ impl BluetoothRemoteGATTService { device, uuid, isPrimary, instanceID, )), global, - BluetoothRemoteGATTServiceBinding::Wrap, ) } diff --git a/components/script/dom/broadcastchannel.rs b/components/script/dom/broadcastchannel.rs index f7d75d8c101..701f71b27cd 100644 --- a/components/script/dom/broadcastchannel.rs +++ b/components/script/dom/broadcastchannel.rs @@ -2,9 +2,7 @@ * 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/. */ -use crate::dom::bindings::codegen::Bindings::BroadcastChannelBinding::{ - BroadcastChannelMethods, Wrap, -}; +use crate::dom::bindings::codegen::Bindings::BroadcastChannelBinding::BroadcastChannelMethods; use crate::dom::bindings::error::{Error, ErrorResult}; use crate::dom::bindings::reflector::{reflect_dom_object, DomObject}; use crate::dom::bindings::root::DomRoot; @@ -35,11 +33,7 @@ impl BroadcastChannel { } pub fn new(global: &GlobalScope, name: DOMString) -> DomRoot<BroadcastChannel> { - let channel = reflect_dom_object( - Box::new(BroadcastChannel::new_inherited(name)), - global, - Wrap, - ); + let channel = reflect_dom_object(Box::new(BroadcastChannel::new_inherited(name)), global); global.track_broadcast_channel(&*channel); channel } diff --git a/components/script/dom/canvasgradient.rs b/components/script/dom/canvasgradient.rs index f24106d81c2..3671df678af 100644 --- a/components/script/dom/canvasgradient.rs +++ b/components/script/dom/canvasgradient.rs @@ -3,7 +3,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::cell::DomRefCell; -use crate::dom::bindings::codegen::Bindings::CanvasGradientBinding; use crate::dom::bindings::codegen::Bindings::CanvasGradientBinding::CanvasGradientMethods; use crate::dom::bindings::error::{Error, ErrorResult}; use crate::dom::bindings::num::Finite; @@ -42,11 +41,7 @@ impl CanvasGradient { } pub fn new(global: &GlobalScope, style: CanvasGradientStyle) -> DomRoot<CanvasGradient> { - reflect_dom_object( - Box::new(CanvasGradient::new_inherited(style)), - global, - CanvasGradientBinding::Wrap, - ) + reflect_dom_object(Box::new(CanvasGradient::new_inherited(style)), global) } } diff --git a/components/script/dom/canvaspattern.rs b/components/script/dom/canvaspattern.rs index bce7cd24c54..3557f646ab9 100644 --- a/components/script/dom/canvaspattern.rs +++ b/components/script/dom/canvaspattern.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::CanvasPatternBinding; use crate::dom::bindings::reflector::{reflect_dom_object, Reflector}; use crate::dom::bindings::root::DomRoot; use crate::dom::canvasgradient::ToFillOrStrokeStyle; @@ -60,7 +59,6 @@ impl CanvasPattern { origin_clean, )), global, - CanvasPatternBinding::Wrap, ) } pub fn origin_is_clean(&self) -> bool { diff --git a/components/script/dom/canvasrenderingcontext2d.rs b/components/script/dom/canvasrenderingcontext2d.rs index 5956827d654..fc34cab49eb 100644 --- a/components/script/dom/canvasrenderingcontext2d.rs +++ b/components/script/dom/canvasrenderingcontext2d.rs @@ -4,7 +4,6 @@ use crate::canvas_state::{CanvasContextState, CanvasState}; use crate::dom::bindings::cell::DomRefCell; -use crate::dom::bindings::codegen::Bindings::CanvasRenderingContext2DBinding; use crate::dom::bindings::codegen::Bindings::CanvasRenderingContext2DBinding::CanvasFillRule; use crate::dom::bindings::codegen::Bindings::CanvasRenderingContext2DBinding::CanvasImageSource; use crate::dom::bindings::codegen::Bindings::CanvasRenderingContext2DBinding::CanvasLineCap; @@ -67,7 +66,7 @@ impl CanvasRenderingContext2D { Some(canvas), size, )); - reflect_dom_object(boxed, global, CanvasRenderingContext2DBinding::Wrap) + reflect_dom_object(boxed, global) } // https://html.spec.whatwg.org/multipage/#concept-canvas-set-bitmap-dimensions diff --git a/components/script/dom/cdatasection.rs b/components/script/dom/cdatasection.rs index f4c788fd722..7e026bb7673 100644 --- a/components/script/dom/cdatasection.rs +++ b/components/script/dom/cdatasection.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::CDATASectionBinding; use crate::dom::bindings::root::DomRoot; use crate::dom::bindings::str::DOMString; use crate::dom::document::Document; @@ -26,7 +25,6 @@ impl CDATASection { Node::reflect_node( Box::new(CDATASection::new_inherited(text, document)), document, - CDATASectionBinding::Wrap, ) } } diff --git a/components/script/dom/channelmergernode.rs b/components/script/dom/channelmergernode.rs index 0ebc086626c..7e8bccd885e 100644 --- a/components/script/dom/channelmergernode.rs +++ b/components/script/dom/channelmergernode.rs @@ -7,9 +7,7 @@ use crate::dom::baseaudiocontext::BaseAudioContext; use crate::dom::bindings::codegen::Bindings::AudioNodeBinding::{ ChannelCountMode, ChannelInterpretation, }; -use crate::dom::bindings::codegen::Bindings::ChannelMergerNodeBinding::{ - self, ChannelMergerOptions, -}; +use crate::dom::bindings::codegen::Bindings::ChannelMergerNodeBinding::ChannelMergerOptions; use crate::dom::bindings::error::{Error, Fallible}; use crate::dom::bindings::reflector::reflect_dom_object; use crate::dom::bindings::root::DomRoot; @@ -61,11 +59,7 @@ impl ChannelMergerNode { options: &ChannelMergerOptions, ) -> Fallible<DomRoot<ChannelMergerNode>> { let node = ChannelMergerNode::new_inherited(window, context, options)?; - Ok(reflect_dom_object( - Box::new(node), - window, - ChannelMergerNodeBinding::Wrap, - )) + Ok(reflect_dom_object(Box::new(node), window)) } #[allow(non_snake_case)] diff --git a/components/script/dom/channelsplitternode.rs b/components/script/dom/channelsplitternode.rs index 4ec38609bce..3efd3b2465c 100644 --- a/components/script/dom/channelsplitternode.rs +++ b/components/script/dom/channelsplitternode.rs @@ -7,9 +7,7 @@ use crate::dom::baseaudiocontext::BaseAudioContext; use crate::dom::bindings::codegen::Bindings::AudioNodeBinding::{ ChannelCountMode, ChannelInterpretation, }; -use crate::dom::bindings::codegen::Bindings::ChannelSplitterNodeBinding::{ - self, ChannelSplitterOptions, -}; +use crate::dom::bindings::codegen::Bindings::ChannelSplitterNodeBinding::ChannelSplitterOptions; use crate::dom::bindings::error::{Error, Fallible}; use crate::dom::bindings::reflector::reflect_dom_object; use crate::dom::bindings::root::DomRoot; @@ -63,11 +61,7 @@ impl ChannelSplitterNode { options: &ChannelSplitterOptions, ) -> Fallible<DomRoot<ChannelSplitterNode>> { let node = ChannelSplitterNode::new_inherited(window, context, options)?; - Ok(reflect_dom_object( - Box::new(node), - window, - ChannelSplitterNodeBinding::Wrap, - )) + Ok(reflect_dom_object(Box::new(node), window)) } #[allow(non_snake_case)] diff --git a/components/script/dom/client.rs b/components/script/dom/client.rs index 4a448ea1a5a..53c692d5591 100644 --- a/components/script/dom/client.rs +++ b/components/script/dom/client.rs @@ -2,8 +2,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ +use crate::dom::bindings::codegen::Bindings::ClientBinding::ClientMethods; use crate::dom::bindings::codegen::Bindings::ClientBinding::FrameType; -use crate::dom::bindings::codegen::Bindings::ClientBinding::{ClientMethods, Wrap}; use crate::dom::bindings::reflector::{reflect_dom_object, Reflector}; use crate::dom::bindings::root::{DomRoot, MutNullableDom}; use crate::dom::bindings::str::{DOMString, USVString}; @@ -36,11 +36,7 @@ impl Client { } pub fn new(window: &Window) -> DomRoot<Client> { - reflect_dom_object( - Box::new(Client::new_inherited(window.get_url())), - window, - Wrap, - ) + reflect_dom_object(Box::new(Client::new_inherited(window.get_url())), window) } pub fn creation_url(&self) -> ServoUrl { diff --git a/components/script/dom/closeevent.rs b/components/script/dom/closeevent.rs index 8bd0446d24e..abc579d8df9 100644 --- a/components/script/dom/closeevent.rs +++ b/components/script/dom/closeevent.rs @@ -44,7 +44,7 @@ impl CloseEvent { reason: DOMString, ) -> DomRoot<CloseEvent> { let event = Box::new(CloseEvent::new_inherited(wasClean, code, reason)); - let ev = reflect_dom_object(event, global, CloseEventBinding::Wrap); + let ev = reflect_dom_object(event, global); { let event = ev.upcast::<Event>(); event.init_event(type_, bool::from(bubbles), bool::from(cancelable)); diff --git a/components/script/dom/comment.rs b/components/script/dom/comment.rs index 06750f4a67f..d87f4d77094 100644 --- a/components/script/dom/comment.rs +++ b/components/script/dom/comment.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::CommentBinding; use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowMethods; use crate::dom::bindings::error::Fallible; use crate::dom::bindings::root::DomRoot; @@ -27,11 +26,7 @@ impl Comment { } pub fn new(text: DOMString, document: &Document) -> DomRoot<Comment> { - Node::reflect_node( - Box::new(Comment::new_inherited(text, document)), - document, - CommentBinding::Wrap, - ) + Node::reflect_node(Box::new(Comment::new_inherited(text, document)), document) } #[allow(non_snake_case)] diff --git a/components/script/dom/compositionevent.rs b/components/script/dom/compositionevent.rs index 121034f42bc..1cdc1cd8dcc 100644 --- a/components/script/dom/compositionevent.rs +++ b/components/script/dom/compositionevent.rs @@ -29,11 +29,7 @@ impl CompositionEvent { } pub fn new_uninitialized(window: &Window) -> DomRoot<CompositionEvent> { - reflect_dom_object( - Box::new(CompositionEvent::new_inherited()), - window, - CompositionEventBinding::Wrap, - ) + reflect_dom_object(Box::new(CompositionEvent::new_inherited()), window) } pub fn new( @@ -51,7 +47,6 @@ impl CompositionEvent { data: data, }), window, - CompositionEventBinding::Wrap, ); ev.uievent .InitUIEvent(type_, can_bubble, cancelable, view, detail); diff --git a/components/script/dom/constantsourcenode.rs b/components/script/dom/constantsourcenode.rs index ca7b9b382f5..90851da88c2 100644 --- a/components/script/dom/constantsourcenode.rs +++ b/components/script/dom/constantsourcenode.rs @@ -7,9 +7,7 @@ use crate::dom::audioscheduledsourcenode::AudioScheduledSourceNode; use crate::dom::baseaudiocontext::BaseAudioContext; use crate::dom::bindings::codegen::Bindings::AudioParamBinding::AutomationRate; use crate::dom::bindings::codegen::Bindings::ConstantSourceNodeBinding::ConstantSourceNodeMethods; -use crate::dom::bindings::codegen::Bindings::ConstantSourceNodeBinding::{ - self, ConstantSourceOptions, -}; +use crate::dom::bindings::codegen::Bindings::ConstantSourceNodeBinding::ConstantSourceOptions; use crate::dom::bindings::error::Fallible; use crate::dom::bindings::reflector::reflect_dom_object; use crate::dom::bindings::root::{Dom, DomRoot}; @@ -66,11 +64,7 @@ impl ConstantSourceNode { options: &ConstantSourceOptions, ) -> Fallible<DomRoot<ConstantSourceNode>> { let node = ConstantSourceNode::new_inherited(window, context, options)?; - Ok(reflect_dom_object( - Box::new(node), - window, - ConstantSourceNodeBinding::Wrap, - )) + Ok(reflect_dom_object(Box::new(node), window)) } #[allow(non_snake_case)] diff --git a/components/script/dom/crypto.rs b/components/script/dom/crypto.rs index c0660dd8409..6aec75cbf3f 100644 --- a/components/script/dom/crypto.rs +++ b/components/script/dom/crypto.rs @@ -3,7 +3,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::cell::DomRefCell; -use crate::dom::bindings::codegen::Bindings::CryptoBinding; use crate::dom::bindings::codegen::Bindings::CryptoBinding::CryptoMethods; use crate::dom::bindings::error::{Error, Fallible}; use crate::dom::bindings::reflector::{reflect_dom_object, Reflector}; @@ -37,11 +36,7 @@ impl Crypto { } pub fn new(global: &GlobalScope) -> DomRoot<Crypto> { - reflect_dom_object( - Box::new(Crypto::new_inherited()), - global, - CryptoBinding::Wrap, - ) + reflect_dom_object(Box::new(Crypto::new_inherited()), global) } } diff --git a/components/script/dom/cssfontfacerule.rs b/components/script/dom/cssfontfacerule.rs index bcfbe27b716..8e2349a0429 100644 --- a/components/script/dom/cssfontfacerule.rs +++ b/components/script/dom/cssfontfacerule.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::CSSFontFaceRuleBinding; use crate::dom::bindings::reflector::reflect_dom_object; use crate::dom::bindings::root::DomRoot; use crate::dom::bindings::str::DOMString; @@ -44,7 +43,6 @@ impl CSSFontFaceRule { fontfacerule, )), window, - CSSFontFaceRuleBinding::Wrap, ) } } diff --git a/components/script/dom/cssimportrule.rs b/components/script/dom/cssimportrule.rs index 74fca1bc064..52fbe62c2bd 100644 --- a/components/script/dom/cssimportrule.rs +++ b/components/script/dom/cssimportrule.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::CSSImportRuleBinding; use crate::dom::bindings::reflector::reflect_dom_object; use crate::dom::bindings::root::DomRoot; use crate::dom::bindings::str::DOMString; @@ -41,7 +40,6 @@ impl CSSImportRule { reflect_dom_object( Box::new(Self::new_inherited(parent_stylesheet, import_rule)), window, - CSSImportRuleBinding::Wrap, ) } } diff --git a/components/script/dom/csskeyframerule.rs b/components/script/dom/csskeyframerule.rs index 93ba825441a..281fc4b8e5e 100644 --- a/components/script/dom/csskeyframerule.rs +++ b/components/script/dom/csskeyframerule.rs @@ -2,9 +2,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::CSSKeyframeRuleBinding::{ - self, CSSKeyframeRuleMethods, -}; +use crate::dom::bindings::codegen::Bindings::CSSKeyframeRuleBinding::CSSKeyframeRuleMethods; use crate::dom::bindings::inheritance::Castable; use crate::dom::bindings::reflector::{reflect_dom_object, DomObject}; use crate::dom::bindings::root::{Dom, DomRoot, MutNullableDom}; @@ -50,7 +48,6 @@ impl CSSKeyframeRule { keyframerule, )), window, - CSSKeyframeRuleBinding::Wrap, ) } } diff --git a/components/script/dom/csskeyframesrule.rs b/components/script/dom/csskeyframesrule.rs index e17632f7672..aa2be337022 100644 --- a/components/script/dom/csskeyframesrule.rs +++ b/components/script/dom/csskeyframesrule.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::CSSKeyframesRuleBinding; use crate::dom::bindings::codegen::Bindings::CSSKeyframesRuleBinding::CSSKeyframesRuleMethods; use crate::dom::bindings::error::ErrorResult; use crate::dom::bindings::inheritance::Castable; @@ -53,7 +52,6 @@ impl CSSKeyframesRule { keyframesrule, )), window, - CSSKeyframesRuleBinding::Wrap, ) } diff --git a/components/script/dom/cssmediarule.rs b/components/script/dom/cssmediarule.rs index 5c5061dee0d..2f54b0a0839 100644 --- a/components/script/dom/cssmediarule.rs +++ b/components/script/dom/cssmediarule.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::CSSMediaRuleBinding; use crate::dom::bindings::codegen::Bindings::CSSMediaRuleBinding::CSSMediaRuleMethods; use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowBinding::WindowMethods; use crate::dom::bindings::reflector::{reflect_dom_object, DomObject}; @@ -53,7 +52,6 @@ impl CSSMediaRule { reflect_dom_object( Box::new(CSSMediaRule::new_inherited(parent_stylesheet, mediarule)), window, - CSSMediaRuleBinding::Wrap, ) } diff --git a/components/script/dom/cssnamespacerule.rs b/components/script/dom/cssnamespacerule.rs index 394de07556c..f3ff8df36d9 100644 --- a/components/script/dom/cssnamespacerule.rs +++ b/components/script/dom/cssnamespacerule.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::CSSNamespaceRuleBinding; use crate::dom::bindings::codegen::Bindings::CSSNamespaceRuleBinding::CSSNamespaceRuleMethods; use crate::dom::bindings::reflector::reflect_dom_object; use crate::dom::bindings::root::DomRoot; @@ -45,7 +44,6 @@ impl CSSNamespaceRule { namespacerule, )), window, - CSSNamespaceRuleBinding::Wrap, ) } } diff --git a/components/script/dom/cssrulelist.rs b/components/script/dom/cssrulelist.rs index b7dc2025343..18a41857923 100644 --- a/components/script/dom/cssrulelist.rs +++ b/components/script/dom/cssrulelist.rs @@ -3,7 +3,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::cell::DomRefCell; -use crate::dom::bindings::codegen::Bindings::CSSRuleListBinding; use crate::dom::bindings::codegen::Bindings::CSSRuleListBinding::CSSRuleListMethods; use crate::dom::bindings::error::{Error, ErrorResult, Fallible}; use crate::dom::bindings::inheritance::Castable; @@ -86,7 +85,6 @@ impl CSSRuleList { reflect_dom_object( Box::new(CSSRuleList::new_inherited(parent_stylesheet, rules)), window, - CSSRuleListBinding::Wrap, ) } diff --git a/components/script/dom/cssstyledeclaration.rs b/components/script/dom/cssstyledeclaration.rs index 2ad565f9b45..01e41d3f0ef 100644 --- a/components/script/dom/cssstyledeclaration.rs +++ b/components/script/dom/cssstyledeclaration.rs @@ -2,9 +2,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::CSSStyleDeclarationBinding::{ - self, CSSStyleDeclarationMethods, -}; +use crate::dom::bindings::codegen::Bindings::CSSStyleDeclarationBinding::CSSStyleDeclarationMethods; use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowMethods; use crate::dom::bindings::error::{Error, ErrorResult, Fallible}; use crate::dom::bindings::inheritance::Castable; @@ -233,7 +231,6 @@ impl CSSStyleDeclaration { modification_access, )), global, - CSSStyleDeclarationBinding::Wrap, ) } diff --git a/components/script/dom/cssstylerule.rs b/components/script/dom/cssstylerule.rs index 14d7cdcdbef..30e4e197ce5 100644 --- a/components/script/dom/cssstylerule.rs +++ b/components/script/dom/cssstylerule.rs @@ -2,7 +2,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::CSSStyleRuleBinding::{self, CSSStyleRuleMethods}; +use crate::dom::bindings::codegen::Bindings::CSSStyleRuleBinding::CSSStyleRuleMethods; use crate::dom::bindings::inheritance::Castable; use crate::dom::bindings::reflector::{reflect_dom_object, DomObject}; use crate::dom::bindings::root::{Dom, DomRoot, MutNullableDom}; @@ -51,7 +51,6 @@ impl CSSStyleRule { reflect_dom_object( Box::new(CSSStyleRule::new_inherited(parent_stylesheet, stylerule)), window, - CSSStyleRuleBinding::Wrap, ) } } diff --git a/components/script/dom/cssstylesheet.rs b/components/script/dom/cssstylesheet.rs index 66d2fd8a339..35277ddc0fc 100644 --- a/components/script/dom/cssstylesheet.rs +++ b/components/script/dom/cssstylesheet.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::CSSStyleSheetBinding; use crate::dom::bindings::codegen::Bindings::CSSStyleSheetBinding::CSSStyleSheetMethods; use crate::dom::bindings::error::{Error, ErrorResult, Fallible}; use crate::dom::bindings::inheritance::Castable; @@ -61,7 +60,6 @@ impl CSSStyleSheet { owner, type_, href, title, stylesheet, )), window, - CSSStyleSheetBinding::Wrap, ) } diff --git a/components/script/dom/cssstylevalue.rs b/components/script/dom/cssstylevalue.rs index 7bdcd50adc1..f272b34e945 100644 --- a/components/script/dom/cssstylevalue.rs +++ b/components/script/dom/cssstylevalue.rs @@ -3,7 +3,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::codegen::Bindings::CSSStyleValueBinding::CSSStyleValueMethods; -use crate::dom::bindings::codegen::Bindings::CSSStyleValueBinding::Wrap; use crate::dom::bindings::reflector::reflect_dom_object; use crate::dom::bindings::reflector::Reflector; use crate::dom::bindings::root::DomRoot; @@ -29,7 +28,7 @@ impl CSSStyleValue { } pub fn new(global: &GlobalScope, value: String) -> DomRoot<CSSStyleValue> { - reflect_dom_object(Box::new(CSSStyleValue::new_inherited(value)), global, Wrap) + reflect_dom_object(Box::new(CSSStyleValue::new_inherited(value)), global) } } diff --git a/components/script/dom/csssupportsrule.rs b/components/script/dom/csssupportsrule.rs index 564abcb0e83..c462faf7eba 100644 --- a/components/script/dom/csssupportsrule.rs +++ b/components/script/dom/csssupportsrule.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::CSSSupportsRuleBinding; use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowBinding::WindowMethods; use crate::dom::bindings::reflector::{reflect_dom_object, DomObject}; use crate::dom::bindings::root::DomRoot; @@ -52,7 +51,6 @@ impl CSSSupportsRule { supportsrule, )), window, - CSSSupportsRuleBinding::Wrap, ) } diff --git a/components/script/dom/cssviewportrule.rs b/components/script/dom/cssviewportrule.rs index 1c0a7bf2206..088d1b4a75e 100644 --- a/components/script/dom/cssviewportrule.rs +++ b/components/script/dom/cssviewportrule.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::CSSViewportRuleBinding; use crate::dom::bindings::reflector::reflect_dom_object; use crate::dom::bindings::root::DomRoot; use crate::dom::bindings::str::DOMString; @@ -44,7 +43,6 @@ impl CSSViewportRule { viewportrule, )), window, - CSSViewportRuleBinding::Wrap, ) } } diff --git a/components/script/dom/customelementregistry.rs b/components/script/dom/customelementregistry.rs index 3f1346e93a3..b1b8a241b63 100644 --- a/components/script/dom/customelementregistry.rs +++ b/components/script/dom/customelementregistry.rs @@ -4,7 +4,6 @@ use crate::dom::bindings::callback::{CallbackContainer, ExceptionHandling}; use crate::dom::bindings::cell::DomRefCell; -use crate::dom::bindings::codegen::Bindings::CustomElementRegistryBinding; use crate::dom::bindings::codegen::Bindings::CustomElementRegistryBinding::CustomElementConstructor; use crate::dom::bindings::codegen::Bindings::CustomElementRegistryBinding::CustomElementRegistryMethods; use crate::dom::bindings::codegen::Bindings::CustomElementRegistryBinding::ElementDefinitionOptions; @@ -96,7 +95,6 @@ impl CustomElementRegistry { reflect_dom_object( Box::new(CustomElementRegistry::new_inherited(window)), window, - CustomElementRegistryBinding::Wrap, ) } diff --git a/components/script/dom/customevent.rs b/components/script/dom/customevent.rs index 26366f65f5e..7dadacee375 100644 --- a/components/script/dom/customevent.rs +++ b/components/script/dom/customevent.rs @@ -37,11 +37,7 @@ impl CustomEvent { } pub fn new_uninitialized(global: &GlobalScope) -> DomRoot<CustomEvent> { - reflect_dom_object( - Box::new(CustomEvent::new_inherited()), - global, - CustomEventBinding::Wrap, - ) + reflect_dom_object(Box::new(CustomEvent::new_inherited()), global) } pub fn new( global: &GlobalScope, diff --git a/components/script/dom/dissimilaroriginlocation.rs b/components/script/dom/dissimilaroriginlocation.rs index f7b978bc185..d1c466bb781 100644 --- a/components/script/dom/dissimilaroriginlocation.rs +++ b/components/script/dom/dissimilaroriginlocation.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::DissimilarOriginLocationBinding; use crate::dom::bindings::codegen::Bindings::DissimilarOriginLocationBinding::DissimilarOriginLocationMethods; use crate::dom::bindings::error::{Error, ErrorResult, Fallible}; use crate::dom::bindings::reflector::reflect_dom_object; @@ -42,7 +41,6 @@ impl DissimilarOriginLocation { reflect_dom_object( Box::new(DissimilarOriginLocation::new_inherited(window)), window, - DissimilarOriginLocationBinding::Wrap, ) } } diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs index 303c51660f0..93957fa9e65 100644 --- a/components/script/dom/document.rs +++ b/components/script/dom/document.rs @@ -8,7 +8,6 @@ use crate::dom::beforeunloadevent::BeforeUnloadEvent; use crate::dom::bindings::callback::ExceptionHandling; use crate::dom::bindings::cell::{ref_filter_map, DomRefCell, Ref, RefMut}; use crate::dom::bindings::codegen::Bindings::BeforeUnloadEventBinding::BeforeUnloadEventBinding::BeforeUnloadEventMethods; -use crate::dom::bindings::codegen::Bindings::DocumentBinding; use crate::dom::bindings::codegen::Bindings::DocumentBinding::{ DocumentMethods, DocumentReadyState, }; @@ -3044,7 +3043,6 @@ impl Document { canceller, )), window, - DocumentBinding::Wrap, ); { let node = document.upcast::<Node>(); diff --git a/components/script/dom/documentfragment.rs b/components/script/dom/documentfragment.rs index a7da3745ee0..1aea832646a 100644 --- a/components/script/dom/documentfragment.rs +++ b/components/script/dom/documentfragment.rs @@ -3,7 +3,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::cell::DomRefCell; -use crate::dom::bindings::codegen::Bindings::DocumentFragmentBinding; use crate::dom::bindings::codegen::Bindings::DocumentFragmentBinding::DocumentFragmentMethods; use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowMethods; use crate::dom::bindings::codegen::UnionTypes::NodeOrString; @@ -42,7 +41,6 @@ impl DocumentFragment { Node::reflect_node( Box::new(DocumentFragment::new_inherited(document)), document, - DocumentFragmentBinding::Wrap, ) } diff --git a/components/script/dom/documenttype.rs b/components/script/dom/documenttype.rs index a1f9f07b4ef..f323cd63d63 100644 --- a/components/script/dom/documenttype.rs +++ b/components/script/dom/documenttype.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::DocumentTypeBinding; use crate::dom::bindings::codegen::Bindings::DocumentTypeBinding::DocumentTypeMethods; use crate::dom::bindings::codegen::UnionTypes::NodeOrString; use crate::dom::bindings::error::ErrorResult; @@ -49,7 +48,6 @@ impl DocumentType { name, public_id, system_id, document, )), document, - DocumentTypeBinding::Wrap, ) } diff --git a/components/script/dom/domexception.rs b/components/script/dom/domexception.rs index e749541eace..c2533cd7932 100644 --- a/components/script/dom/domexception.rs +++ b/components/script/dom/domexception.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::DOMExceptionBinding; use crate::dom::bindings::codegen::Bindings::DOMExceptionBinding::DOMExceptionConstants; use crate::dom::bindings::codegen::Bindings::DOMExceptionBinding::DOMExceptionMethods; use crate::dom::bindings::error::Error; @@ -134,11 +133,7 @@ impl DOMException { pub fn new(global: &GlobalScope, code: DOMErrorName) -> DomRoot<DOMException> { let (message, name) = DOMException::get_error_data_by_code(code); - reflect_dom_object( - Box::new(DOMException::new_inherited(message, name)), - global, - DOMExceptionBinding::Wrap, - ) + reflect_dom_object(Box::new(DOMException::new_inherited(message, name)), global) } #[allow(non_snake_case)] @@ -150,7 +145,6 @@ impl DOMException { Ok(reflect_dom_object( Box::new(DOMException::new_inherited(message, name)), global, - DOMExceptionBinding::Wrap, )) } diff --git a/components/script/dom/domimplementation.rs b/components/script/dom/domimplementation.rs index d12b18168f8..d5a3f07bde2 100644 --- a/components/script/dom/domimplementation.rs +++ b/components/script/dom/domimplementation.rs @@ -3,7 +3,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::document_loader::DocumentLoader; -use crate::dom::bindings::codegen::Bindings::DOMImplementationBinding; use crate::dom::bindings::codegen::Bindings::DOMImplementationBinding::DOMImplementationMethods; use crate::dom::bindings::codegen::Bindings::DocumentBinding::{ DocumentMethods, ElementCreationOptions, @@ -46,11 +45,7 @@ impl DOMImplementation { pub fn new(document: &Document) -> DomRoot<DOMImplementation> { let window = document.window(); - reflect_dom_object( - Box::new(DOMImplementation::new_inherited(document)), - window, - DOMImplementationBinding::Wrap, - ) + reflect_dom_object(Box::new(DOMImplementation::new_inherited(document)), window) } } diff --git a/components/script/dom/dommatrix.rs b/components/script/dom/dommatrix.rs index 0f6d2ae2cd2..c5520c7d6a7 100644 --- a/components/script/dom/dommatrix.rs +++ b/components/script/dom/dommatrix.rs @@ -2,9 +2,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::DOMMatrixBinding::{ - DOMMatrixInit, DOMMatrixMethods, Wrap, -}; +use crate::dom::bindings::codegen::Bindings::DOMMatrixBinding::{DOMMatrixInit, DOMMatrixMethods}; use crate::dom::bindings::codegen::Bindings::DOMMatrixReadOnlyBinding::DOMMatrixReadOnlyMethods; use crate::dom::bindings::codegen::UnionTypes::StringOrUnrestrictedDoubleSequence; use crate::dom::bindings::error; @@ -32,7 +30,7 @@ impl DOMMatrix { #[allow(unrooted_must_root)] pub fn new(global: &GlobalScope, is2D: bool, matrix: Transform3D<f64>) -> DomRoot<Self> { let dommatrix = Self::new_inherited(is2D, matrix); - reflect_dom_object(Box::new(dommatrix), global, Wrap) + reflect_dom_object(Box::new(dommatrix), global) } pub fn new_inherited(is2D: bool, matrix: Transform3D<f64>) -> Self { diff --git a/components/script/dom/dommatrixreadonly.rs b/components/script/dom/dommatrixreadonly.rs index e7e32318020..ff724524909 100644 --- a/components/script/dom/dommatrixreadonly.rs +++ b/components/script/dom/dommatrixreadonly.rs @@ -4,9 +4,7 @@ use crate::dom::bindings::cell::{DomRefCell, Ref}; use crate::dom::bindings::codegen::Bindings::DOMMatrixBinding::{DOMMatrixInit, DOMMatrixMethods}; -use crate::dom::bindings::codegen::Bindings::DOMMatrixReadOnlyBinding::{ - DOMMatrixReadOnlyMethods, Wrap, -}; +use crate::dom::bindings::codegen::Bindings::DOMMatrixReadOnlyBinding::DOMMatrixReadOnlyMethods; use crate::dom::bindings::codegen::Bindings::DOMPointBinding::DOMPointInit; use crate::dom::bindings::codegen::UnionTypes::StringOrUnrestrictedDoubleSequence; use crate::dom::bindings::error; @@ -45,7 +43,7 @@ impl DOMMatrixReadOnly { #[allow(unrooted_must_root)] pub fn new(global: &GlobalScope, is2D: bool, matrix: Transform3D<f64>) -> DomRoot<Self> { let dommatrix = Self::new_inherited(is2D, matrix); - reflect_dom_object(Box::new(dommatrix), global, Wrap) + reflect_dom_object(Box::new(dommatrix), global) } pub fn new_inherited(is2D: bool, matrix: Transform3D<f64>) -> Self { diff --git a/components/script/dom/domparser.rs b/components/script/dom/domparser.rs index d714ba30ed2..6a0328fc438 100644 --- a/components/script/dom/domparser.rs +++ b/components/script/dom/domparser.rs @@ -37,11 +37,7 @@ impl DOMParser { } pub fn new(window: &Window) -> DomRoot<DOMParser> { - reflect_dom_object( - Box::new(DOMParser::new_inherited(window)), - window, - DOMParserBinding::Wrap, - ) + reflect_dom_object(Box::new(DOMParser::new_inherited(window)), window) } #[allow(non_snake_case)] diff --git a/components/script/dom/dompoint.rs b/components/script/dom/dompoint.rs index 4c1fde655cc..fe523b8e766 100644 --- a/components/script/dom/dompoint.rs +++ b/components/script/dom/dompoint.rs @@ -2,9 +2,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::DOMPointBinding::{ - DOMPointInit, DOMPointMethods, Wrap, -}; +use crate::dom::bindings::codegen::Bindings::DOMPointBinding::{DOMPointInit, DOMPointMethods}; use crate::dom::bindings::codegen::Bindings::DOMPointReadOnlyBinding::DOMPointReadOnlyMethods; use crate::dom::bindings::error::Fallible; use crate::dom::bindings::reflector::reflect_dom_object; @@ -28,7 +26,7 @@ impl DOMPoint { } pub fn new(global: &GlobalScope, x: f64, y: f64, z: f64, w: f64) -> DomRoot<DOMPoint> { - reflect_dom_object(Box::new(DOMPoint::new_inherited(x, y, z, w)), global, Wrap) + reflect_dom_object(Box::new(DOMPoint::new_inherited(x, y, z, w)), global) } pub fn Constructor( diff --git a/components/script/dom/dompointreadonly.rs b/components/script/dom/dompointreadonly.rs index d98e9a4bde3..9d093db2b81 100644 --- a/components/script/dom/dompointreadonly.rs +++ b/components/script/dom/dompointreadonly.rs @@ -3,9 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::codegen::Bindings::DOMPointBinding::DOMPointInit; -use crate::dom::bindings::codegen::Bindings::DOMPointReadOnlyBinding::{ - DOMPointReadOnlyMethods, Wrap, -}; +use crate::dom::bindings::codegen::Bindings::DOMPointReadOnlyBinding::DOMPointReadOnlyMethods; use crate::dom::bindings::error::Fallible; use crate::dom::bindings::reflector::{reflect_dom_object, Reflector}; use crate::dom::bindings::root::DomRoot; @@ -39,7 +37,6 @@ impl DOMPointReadOnly { reflect_dom_object( Box::new(DOMPointReadOnly::new_inherited(x, y, z, w)), global, - Wrap, ) } diff --git a/components/script/dom/domquad.rs b/components/script/dom/domquad.rs index 3101370582a..e6decd7e1b2 100644 --- a/components/script/dom/domquad.rs +++ b/components/script/dom/domquad.rs @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::codegen::Bindings::DOMPointBinding::{DOMPointInit, DOMPointMethods}; -use crate::dom::bindings::codegen::Bindings::DOMQuadBinding::{DOMQuadInit, DOMQuadMethods, Wrap}; +use crate::dom::bindings::codegen::Bindings::DOMQuadBinding::{DOMQuadInit, DOMQuadMethods}; use crate::dom::bindings::codegen::Bindings::DOMRectReadOnlyBinding::DOMRectInit; use crate::dom::bindings::error::Fallible; use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector}; @@ -42,11 +42,7 @@ impl DOMQuad { p3: &DOMPoint, p4: &DOMPoint, ) -> DomRoot<DOMQuad> { - reflect_dom_object( - Box::new(DOMQuad::new_inherited(p1, p2, p3, p4)), - global, - Wrap, - ) + reflect_dom_object(Box::new(DOMQuad::new_inherited(p1, p2, p3, p4)), global) } pub fn Constructor( diff --git a/components/script/dom/domrect.rs b/components/script/dom/domrect.rs index 0aab9dc4d61..d925176f96d 100644 --- a/components/script/dom/domrect.rs +++ b/components/script/dom/domrect.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::DOMRectBinding; use crate::dom::bindings::codegen::Bindings::DOMRectBinding::DOMRectMethods; use crate::dom::bindings::codegen::Bindings::DOMRectReadOnlyBinding::DOMRectReadOnlyMethods; use crate::dom::bindings::error::Fallible; @@ -28,7 +27,6 @@ impl DOMRect { reflect_dom_object( Box::new(DOMRect::new_inherited(x, y, width, height)), global, - DOMRectBinding::Wrap, ) } diff --git a/components/script/dom/domrectreadonly.rs b/components/script/dom/domrectreadonly.rs index 6bdbac9c388..49eed59ac58 100644 --- a/components/script/dom/domrectreadonly.rs +++ b/components/script/dom/domrectreadonly.rs @@ -2,9 +2,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::DOMRectReadOnlyBinding::{ - DOMRectReadOnlyMethods, Wrap, -}; +use crate::dom::bindings::codegen::Bindings::DOMRectReadOnlyBinding::DOMRectReadOnlyMethods; use crate::dom::bindings::error::Fallible; use crate::dom::bindings::reflector::{reflect_dom_object, Reflector}; use crate::dom::bindings::root::DomRoot; @@ -42,7 +40,6 @@ impl DOMRectReadOnly { reflect_dom_object( Box::new(DOMRectReadOnly::new_inherited(x, y, width, height)), global, - Wrap, ) } diff --git a/components/script/dom/domstringlist.rs b/components/script/dom/domstringlist.rs index f9f55a69f03..a1592faca79 100644 --- a/components/script/dom/domstringlist.rs +++ b/components/script/dom/domstringlist.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::DOMStringListBinding; use crate::dom::bindings::codegen::Bindings::DOMStringListBinding::DOMStringListMethods; use crate::dom::bindings::reflector::{reflect_dom_object, Reflector}; use crate::dom::bindings::root::DomRoot; @@ -27,11 +26,7 @@ impl DOMStringList { #[allow(unused)] pub fn new(window: &Window, strings: Vec<DOMString>) -> DomRoot<DOMStringList> { - reflect_dom_object( - Box::new(DOMStringList::new_inherited(strings)), - window, - DOMStringListBinding::Wrap, - ) + reflect_dom_object(Box::new(DOMStringList::new_inherited(strings)), window) } } diff --git a/components/script/dom/domstringmap.rs b/components/script/dom/domstringmap.rs index a3603e0ee93..9ff1071e85b 100644 --- a/components/script/dom/domstringmap.rs +++ b/components/script/dom/domstringmap.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::DOMStringMapBinding; use crate::dom::bindings::codegen::Bindings::DOMStringMapBinding::DOMStringMapMethods; use crate::dom::bindings::error::ErrorResult; use crate::dom::bindings::reflector::{reflect_dom_object, Reflector}; @@ -28,11 +27,7 @@ impl DOMStringMap { pub fn new(element: &HTMLElement) -> DomRoot<DOMStringMap> { let window = window_from_node(element); - reflect_dom_object( - Box::new(DOMStringMap::new_inherited(element)), - &*window, - DOMStringMapBinding::Wrap, - ) + reflect_dom_object(Box::new(DOMStringMap::new_inherited(element)), &*window) } } diff --git a/components/script/dom/domtokenlist.rs b/components/script/dom/domtokenlist.rs index 7f56f58c502..5c25409971c 100644 --- a/components/script/dom/domtokenlist.rs +++ b/components/script/dom/domtokenlist.rs @@ -3,7 +3,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::attr::Attr; -use crate::dom::bindings::codegen::Bindings::DOMTokenListBinding; use crate::dom::bindings::codegen::Bindings::DOMTokenListBinding::DOMTokenListMethods; use crate::dom::bindings::error::{Error, ErrorResult, Fallible}; use crate::dom::bindings::reflector::{reflect_dom_object, Reflector}; @@ -37,7 +36,6 @@ impl DOMTokenList { reflect_dom_object( Box::new(DOMTokenList::new_inherited(element, local_name.clone())), &*window, - DOMTokenListBinding::Wrap, ) } diff --git a/components/script/dom/element.rs b/components/script/dom/element.rs index 268b263fc41..9f20d31dbc6 100644 --- a/components/script/dom/element.rs +++ b/components/script/dom/element.rs @@ -9,7 +9,6 @@ use crate::dom::attr::{Attr, AttrHelpersForLayout}; use crate::dom::bindings::cell::{ref_filter_map, DomRefCell, Ref, RefMut}; use crate::dom::bindings::codegen::Bindings::AttrBinding::AttrMethods; use crate::dom::bindings::codegen::Bindings::DocumentBinding::DocumentMethods; -use crate::dom::bindings::codegen::Bindings::ElementBinding; use crate::dom::bindings::codegen::Bindings::ElementBinding::ElementMethods; use crate::dom::bindings::codegen::Bindings::FunctionBinding::Function; use crate::dom::bindings::codegen::Bindings::HTMLTemplateElementBinding::HTMLTemplateElementMethods; @@ -294,7 +293,6 @@ impl Element { local_name, namespace, prefix, document, )), document, - ElementBinding::Wrap, ) } diff --git a/components/script/dom/errorevent.rs b/components/script/dom/errorevent.rs index 10f3ab5853f..129f96dc910 100644 --- a/components/script/dom/errorevent.rs +++ b/components/script/dom/errorevent.rs @@ -46,11 +46,7 @@ impl ErrorEvent { } pub fn new_uninitialized(global: &GlobalScope) -> DomRoot<ErrorEvent> { - reflect_dom_object( - Box::new(ErrorEvent::new_inherited()), - global, - ErrorEventBinding::Wrap, - ) + reflect_dom_object(Box::new(ErrorEvent::new_inherited()), global) } pub fn new( diff --git a/components/script/dom/event.rs b/components/script/dom/event.rs index cc960c7ba1b..aba0179a59b 100644 --- a/components/script/dom/event.rs +++ b/components/script/dom/event.rs @@ -72,7 +72,7 @@ impl Event { } pub fn new_uninitialized(global: &GlobalScope) -> DomRoot<Event> { - reflect_dom_object(Box::new(Event::new_inherited()), global, EventBinding::Wrap) + reflect_dom_object(Box::new(Event::new_inherited()), global) } pub fn new( diff --git a/components/script/dom/eventsource.rs b/components/script/dom/eventsource.rs index 83866370527..101eb851cfb 100644 --- a/components/script/dom/eventsource.rs +++ b/components/script/dom/eventsource.rs @@ -4,7 +4,7 @@ use crate::dom::bindings::cell::DomRefCell; use crate::dom::bindings::codegen::Bindings::EventSourceBinding::{ - EventSourceInit, EventSourceMethods, Wrap, + EventSourceInit, EventSourceMethods, }; use crate::dom::bindings::error::{Error, Fallible}; use crate::dom::bindings::inheritance::Castable; @@ -463,7 +463,6 @@ impl EventSource { reflect_dom_object( Box::new(EventSource::new_inherited(url, with_credentials)), global, - Wrap, ) } diff --git a/components/script/dom/eventtarget.rs b/components/script/dom/eventtarget.rs index 90e533c8cc3..bc726d02119 100644 --- a/components/script/dom/eventtarget.rs +++ b/components/script/dom/eventtarget.rs @@ -15,7 +15,6 @@ use crate::dom::bindings::codegen::Bindings::EventListenerBinding::EventListener use crate::dom::bindings::codegen::Bindings::EventTargetBinding::AddEventListenerOptions; use crate::dom::bindings::codegen::Bindings::EventTargetBinding::EventListenerOptions; use crate::dom::bindings::codegen::Bindings::EventTargetBinding::EventTargetMethods; -use crate::dom::bindings::codegen::Bindings::EventTargetBinding::Wrap; use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowMethods; use crate::dom::bindings::codegen::UnionTypes::AddEventListenerOptionsOrBoolean; use crate::dom::bindings::codegen::UnionTypes::EventListenerOptionsOrBoolean; @@ -340,7 +339,7 @@ impl EventTarget { } fn new(global: &GlobalScope) -> DomRoot<EventTarget> { - reflect_dom_object(Box::new(EventTarget::new_inherited()), global, Wrap) + reflect_dom_object(Box::new(EventTarget::new_inherited()), global) } #[allow(non_snake_case)] diff --git a/components/script/dom/extendableevent.rs b/components/script/dom/extendableevent.rs index a7b0e2dd581..deb2dce4dfa 100644 --- a/components/script/dom/extendableevent.rs +++ b/components/script/dom/extendableevent.rs @@ -37,11 +37,7 @@ impl ExtendableEvent { bubbles: bool, cancelable: bool, ) -> DomRoot<ExtendableEvent> { - let ev = reflect_dom_object( - Box::new(ExtendableEvent::new_inherited()), - worker, - ExtendableEventBinding::Wrap, - ); + let ev = reflect_dom_object(Box::new(ExtendableEvent::new_inherited()), worker); { let event = ev.upcast::<Event>(); event.init_event(type_, bubbles, cancelable); diff --git a/components/script/dom/extendablemessageevent.rs b/components/script/dom/extendablemessageevent.rs index ce9539d091f..8d1a965808b 100644 --- a/components/script/dom/extendablemessageevent.rs +++ b/components/script/dom/extendablemessageevent.rs @@ -73,7 +73,7 @@ impl ExtendableMessageEvent { lastEventId, ports, )); - let ev = reflect_dom_object(ev, global, ExtendableMessageEventBinding::Wrap); + let ev = reflect_dom_object(ev, global); { let event = ev.upcast::<Event>(); event.init_event(type_, bubbles, cancelable); diff --git a/components/script/dom/fakexrdevice.rs b/components/script/dom/fakexrdevice.rs index dd599d4a3a4..537251fffed 100644 --- a/components/script/dom/fakexrdevice.rs +++ b/components/script/dom/fakexrdevice.rs @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::codegen::Bindings::FakeXRDeviceBinding::{ - self, FakeXRDeviceMethods, FakeXRRigidTransformInit, FakeXRViewInit, + FakeXRDeviceMethods, FakeXRRigidTransformInit, FakeXRViewInit, }; use crate::dom::bindings::codegen::Bindings::FakeXRInputControllerBinding::FakeXRInputSourceInit; use crate::dom::bindings::codegen::Bindings::XRInputSourceBinding::{ @@ -51,11 +51,7 @@ impl FakeXRDevice { } pub fn new(global: &GlobalScope, sender: IpcSender<MockDeviceMsg>) -> DomRoot<FakeXRDevice> { - reflect_dom_object( - Box::new(FakeXRDevice::new_inherited(sender)), - global, - FakeXRDeviceBinding::Wrap, - ) + reflect_dom_object(Box::new(FakeXRDevice::new_inherited(sender)), global) } pub fn disconnect(&self, sender: IpcSender<()>) { diff --git a/components/script/dom/fakexrinputcontroller.rs b/components/script/dom/fakexrinputcontroller.rs index e93d328ff29..5699fa5d747 100644 --- a/components/script/dom/fakexrinputcontroller.rs +++ b/components/script/dom/fakexrinputcontroller.rs @@ -3,9 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::codegen::Bindings::FakeXRDeviceBinding::FakeXRRigidTransformInit; -use crate::dom::bindings::codegen::Bindings::FakeXRInputControllerBinding::{ - self, FakeXRInputControllerMethods, -}; +use crate::dom::bindings::codegen::Bindings::FakeXRInputControllerBinding::FakeXRInputControllerMethods; use crate::dom::bindings::codegen::Bindings::XRInputSourceBinding::{ XRHandedness, XRTargetRayMode, }; @@ -47,7 +45,6 @@ impl FakeXRInputController { reflect_dom_object( Box::new(FakeXRInputController::new_inherited(sender, id)), global, - FakeXRInputControllerBinding::Wrap, ) } diff --git a/components/script/dom/file.rs b/components/script/dom/file.rs index 9fcd580bbee..cbbc16bd264 100644 --- a/components/script/dom/file.rs +++ b/components/script/dom/file.rs @@ -51,7 +51,6 @@ impl File { let file = reflect_dom_object( Box::new(File::new_inherited(&blob_impl, name, modified)), global, - FileBinding::Wrap, ); global.track_file(&file, blob_impl); file diff --git a/components/script/dom/filelist.rs b/components/script/dom/filelist.rs index a8f7354ad49..de83ccb9db6 100644 --- a/components/script/dom/filelist.rs +++ b/components/script/dom/filelist.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::FileListBinding; use crate::dom::bindings::codegen::Bindings::FileListBinding::FileListMethods; use crate::dom::bindings::reflector::{reflect_dom_object, Reflector}; use crate::dom::bindings::root::{Dom, DomRoot}; @@ -34,7 +33,6 @@ impl FileList { files.iter().map(|r| Dom::from_ref(&**r)).collect(), )), window, - FileListBinding::Wrap, ) } diff --git a/components/script/dom/filereader.rs b/components/script/dom/filereader.rs index 557b2def761..084cecc9577 100644 --- a/components/script/dom/filereader.rs +++ b/components/script/dom/filereader.rs @@ -5,7 +5,7 @@ use crate::dom::bindings::cell::DomRefCell; use crate::dom::bindings::codegen::Bindings::BlobBinding::BlobMethods; use crate::dom::bindings::codegen::Bindings::FileReaderBinding::{ - self, FileReaderConstants, FileReaderMethods, + FileReaderConstants, FileReaderMethods, }; use crate::dom::bindings::codegen::UnionTypes::StringOrObject; use crate::dom::bindings::error::{Error, ErrorResult, Fallible}; @@ -152,11 +152,7 @@ impl FileReader { } pub fn new(global: &GlobalScope) -> DomRoot<FileReader> { - reflect_dom_object( - Box::new(FileReader::new_inherited()), - global, - FileReaderBinding::Wrap, - ) + reflect_dom_object(Box::new(FileReader::new_inherited()), global) } #[allow(non_snake_case)] diff --git a/components/script/dom/filereadersync.rs b/components/script/dom/filereadersync.rs index 5b3ace3863e..044cb48c27d 100644 --- a/components/script/dom/filereadersync.rs +++ b/components/script/dom/filereadersync.rs @@ -3,9 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::codegen::Bindings::BlobBinding::BlobMethods; -use crate::dom::bindings::codegen::Bindings::FileReaderSyncBinding::{ - FileReaderSyncBinding, FileReaderSyncMethods, -}; +use crate::dom::bindings::codegen::Bindings::FileReaderSyncBinding::FileReaderSyncMethods; use crate::dom::bindings::error::{Error, Fallible}; use crate::dom::bindings::reflector::{reflect_dom_object, Reflector}; use crate::dom::bindings::root::DomRoot; @@ -33,11 +31,7 @@ impl FileReaderSync { } pub fn new(global: &GlobalScope) -> DomRoot<FileReaderSync> { - reflect_dom_object( - Box::new(FileReaderSync::new_inherited()), - global, - FileReaderSyncBinding::Wrap, - ) + reflect_dom_object(Box::new(FileReaderSync::new_inherited()), global) } #[allow(non_snake_case)] diff --git a/components/script/dom/focusevent.rs b/components/script/dom/focusevent.rs index 5ff76a0d60e..2d983bcc881 100644 --- a/components/script/dom/focusevent.rs +++ b/components/script/dom/focusevent.rs @@ -32,11 +32,7 @@ impl FocusEvent { } pub fn new_uninitialized(window: &Window) -> DomRoot<FocusEvent> { - reflect_dom_object( - Box::new(FocusEvent::new_inherited()), - window, - FocusEventBinding::Wrap, - ) + reflect_dom_object(Box::new(FocusEvent::new_inherited()), window) } pub fn new( diff --git a/components/script/dom/formdata.rs b/components/script/dom/formdata.rs index 10d1a11f18e..3a8f3ce4b5b 100644 --- a/components/script/dom/formdata.rs +++ b/components/script/dom/formdata.rs @@ -4,7 +4,6 @@ use crate::dom::bindings::cell::DomRefCell; use crate::dom::bindings::codegen::Bindings::FormDataBinding::FormDataMethods; -use crate::dom::bindings::codegen::Bindings::FormDataBinding::FormDataWrap; use crate::dom::bindings::codegen::UnionTypes::FileOrUSVString; use crate::dom::bindings::error::{Error, Fallible}; use crate::dom::bindings::inheritance::Castable; @@ -43,11 +42,7 @@ impl FormData { } pub fn new(form_datums: Option<Vec<FormDatum>>, global: &GlobalScope) -> DomRoot<FormData> { - reflect_dom_object( - Box::new(FormData::new_inherited(form_datums)), - global, - FormDataWrap, - ) + reflect_dom_object(Box::new(FormData::new_inherited(form_datums)), global) } // https://xhr.spec.whatwg.org/#dom-formdata diff --git a/components/script/dom/formdataevent.rs b/components/script/dom/formdataevent.rs index 60eb479f7dd..263d176f66f 100644 --- a/components/script/dom/formdataevent.rs +++ b/components/script/dom/formdataevent.rs @@ -38,7 +38,6 @@ impl FormDataEvent { form_data: Dom::from_ref(form_data), }), global, - FormDataEventBinding::Wrap, ); { diff --git a/components/script/dom/gainnode.rs b/components/script/dom/gainnode.rs index f91a2ba2591..86a957734dd 100644 --- a/components/script/dom/gainnode.rs +++ b/components/script/dom/gainnode.rs @@ -9,9 +9,7 @@ use crate::dom::bindings::codegen::Bindings::AudioNodeBinding::{ ChannelCountMode, ChannelInterpretation, }; use crate::dom::bindings::codegen::Bindings::AudioParamBinding::AutomationRate; -use crate::dom::bindings::codegen::Bindings::GainNodeBinding::{ - self, GainNodeMethods, GainOptions, -}; +use crate::dom::bindings::codegen::Bindings::GainNodeBinding::{GainNodeMethods, GainOptions}; use crate::dom::bindings::error::Fallible; use crate::dom::bindings::reflector::reflect_dom_object; use crate::dom::bindings::root::{Dom, DomRoot}; @@ -69,11 +67,7 @@ impl GainNode { options: &GainOptions, ) -> Fallible<DomRoot<GainNode>> { let node = GainNode::new_inherited(window, context, options)?; - Ok(reflect_dom_object( - Box::new(node), - window, - GainNodeBinding::Wrap, - )) + Ok(reflect_dom_object(Box::new(node), window)) } #[allow(non_snake_case)] diff --git a/components/script/dom/gamepad.rs b/components/script/dom/gamepad.rs index 60a73a691fd..7223450c513 100644 --- a/components/script/dom/gamepad.rs +++ b/components/script/dom/gamepad.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::GamepadBinding; use crate::dom::bindings::codegen::Bindings::GamepadBinding::GamepadMethods; use crate::dom::bindings::inheritance::Castable; use crate::dom::bindings::num::Finite; @@ -95,7 +94,6 @@ impl Gamepad { data.display_id, )), global, - GamepadBinding::Wrap, ); let cx = global.get_cx(); diff --git a/components/script/dom/gamepadbutton.rs b/components/script/dom/gamepadbutton.rs index 176e5255874..6bcbcc2a724 100644 --- a/components/script/dom/gamepadbutton.rs +++ b/components/script/dom/gamepadbutton.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::GamepadButtonBinding; use crate::dom::bindings::codegen::Bindings::GamepadButtonBinding::GamepadButtonMethods; use crate::dom::bindings::num::Finite; use crate::dom::bindings::reflector::{reflect_dom_object, Reflector}; @@ -33,7 +32,6 @@ impl GamepadButton { reflect_dom_object( Box::new(GamepadButton::new_inherited(pressed, touched)), global, - GamepadButtonBinding::Wrap, ) } } diff --git a/components/script/dom/gamepadbuttonlist.rs b/components/script/dom/gamepadbuttonlist.rs index e784939c260..496302de9f9 100644 --- a/components/script/dom/gamepadbuttonlist.rs +++ b/components/script/dom/gamepadbuttonlist.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::GamepadButtonListBinding; use crate::dom::bindings::codegen::Bindings::GamepadButtonListBinding::GamepadButtonListMethods; use crate::dom::bindings::reflector::{reflect_dom_object, Reflector}; use crate::dom::bindings::root::{Dom, DomRoot, DomSlice}; @@ -34,11 +33,7 @@ impl GamepadButtonList { rooted_vec!(let list <- buttons.iter() .map(|btn| GamepadButton::new(&global, btn.pressed, btn.touched))); - reflect_dom_object( - Box::new(GamepadButtonList::new_inherited(list.r())), - global, - GamepadButtonListBinding::Wrap, - ) + reflect_dom_object(Box::new(GamepadButtonList::new_inherited(list.r())), global) } pub fn sync_from_vr(&self, vr_buttons: &[WebVRGamepadButton]) { diff --git a/components/script/dom/gamepadevent.rs b/components/script/dom/gamepadevent.rs index 3d57645a9be..a6a3ad9e57c 100644 --- a/components/script/dom/gamepadevent.rs +++ b/components/script/dom/gamepadevent.rs @@ -43,11 +43,7 @@ impl GamepadEvent { cancelable: bool, gamepad: &Gamepad, ) -> DomRoot<GamepadEvent> { - let ev = reflect_dom_object( - Box::new(GamepadEvent::new_inherited(&gamepad)), - global, - GamepadEventBinding::Wrap, - ); + let ev = reflect_dom_object(Box::new(GamepadEvent::new_inherited(&gamepad)), global); { let event = ev.upcast::<Event>(); event.init_event(type_, bubbles, cancelable); diff --git a/components/script/dom/gamepadlist.rs b/components/script/dom/gamepadlist.rs index 7b81fe7bda7..34479e6bb7c 100644 --- a/components/script/dom/gamepadlist.rs +++ b/components/script/dom/gamepadlist.rs @@ -3,7 +3,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::cell::DomRefCell; -use crate::dom::bindings::codegen::Bindings::GamepadListBinding; use crate::dom::bindings::codegen::Bindings::GamepadListBinding::GamepadListMethods; use crate::dom::bindings::reflector::{reflect_dom_object, Reflector}; use crate::dom::bindings::root::{Dom, DomRoot}; @@ -27,11 +26,7 @@ impl GamepadList { } pub fn new(global: &GlobalScope, list: &[&Gamepad]) -> DomRoot<GamepadList> { - reflect_dom_object( - Box::new(GamepadList::new_inherited(list)), - global, - GamepadListBinding::Wrap, - ) + reflect_dom_object(Box::new(GamepadList::new_inherited(list)), global) } pub fn add_if_not_exists(&self, gamepads: &[DomRoot<Gamepad>]) { diff --git a/components/script/dom/gpu.rs b/components/script/dom/gpu.rs index e2f7e3e5a82..3980c2a3bd2 100644 --- a/components/script/dom/gpu.rs +++ b/components/script/dom/gpu.rs @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::codegen::Bindings::GPUBinding::GPURequestAdapterOptions; -use crate::dom::bindings::codegen::Bindings::GPUBinding::{self, GPUMethods, GPUPowerPreference}; +use crate::dom::bindings::codegen::Bindings::GPUBinding::{GPUMethods, GPUPowerPreference}; use crate::dom::bindings::error::Error; use crate::dom::bindings::refcounted::{Trusted, TrustedPromise}; use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector}; @@ -36,7 +36,7 @@ impl GPU { } pub fn new(global: &GlobalScope) -> DomRoot<GPU> { - reflect_dom_object(Box::new(GPU::new_inherited()), global, GPUBinding::Wrap) + reflect_dom_object(Box::new(GPU::new_inherited()), global) } } diff --git a/components/script/dom/gpuadapter.rs b/components/script/dom/gpuadapter.rs index 34f040405c1..74a17130c69 100644 --- a/components/script/dom/gpuadapter.rs +++ b/components/script/dom/gpuadapter.rs @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::codegen::Bindings::GPUAdapterBinding::{ - self, GPUAdapterMethods, GPUDeviceDescriptor, + GPUAdapterMethods, GPUDeviceDescriptor, }; use crate::dom::bindings::error::Error; use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector}; @@ -61,7 +61,6 @@ impl GPUAdapter { channel, name, extensions, adapter, )), global, - GPUAdapterBinding::Wrap, ) } } diff --git a/components/script/dom/gpubindgroup.rs b/components/script/dom/gpubindgroup.rs index 96f2d8db59b..b7b8cadeacf 100644 --- a/components/script/dom/gpubindgroup.rs +++ b/components/script/dom/gpubindgroup.rs @@ -3,9 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::cell::DomRefCell; -use crate::dom::bindings::codegen::Bindings::GPUBindGroupBinding::{ - GPUBindGroupBinding, GPUBindGroupMethods, -}; +use crate::dom::bindings::codegen::Bindings::GPUBindGroupBinding::GPUBindGroupMethods; use crate::dom::bindings::reflector::{reflect_dom_object, Reflector}; use crate::dom::bindings::root::DomRoot; use crate::dom::bindings::str::DOMString; @@ -40,7 +38,6 @@ impl GPUBindGroup { reflect_dom_object( Box::new(GPUBindGroup::new_inherited(bind_group, valid)), global, - GPUBindGroupBinding::Wrap, ) } } diff --git a/components/script/dom/gpubindgrouplayout.rs b/components/script/dom/gpubindgrouplayout.rs index 7651d16b52b..da1e8a19446 100644 --- a/components/script/dom/gpubindgrouplayout.rs +++ b/components/script/dom/gpubindgrouplayout.rs @@ -4,7 +4,7 @@ use crate::dom::bindings::cell::DomRefCell; use crate::dom::bindings::codegen::Bindings::GPUBindGroupLayoutBinding::{ - self, GPUBindGroupLayoutBindings, GPUBindGroupLayoutMethods, + GPUBindGroupLayoutBindings, GPUBindGroupLayoutMethods, }; use crate::dom::bindings::reflector::{reflect_dom_object, Reflector}; use crate::dom::bindings::root::DomRoot; @@ -58,7 +58,6 @@ impl GPUBindGroupLayout { valid, )), global, - GPUBindGroupLayoutBinding::Wrap, ) } } diff --git a/components/script/dom/gpubuffer.rs b/components/script/dom/gpubuffer.rs index fc2d17a689e..5da4c445c3e 100644 --- a/components/script/dom/gpubuffer.rs +++ b/components/script/dom/gpubuffer.rs @@ -3,9 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::cell::{DomRefCell, Ref}; -use crate::dom::bindings::codegen::Bindings::GPUBufferBinding::{ - self, GPUBufferMethods, GPUBufferSize, -}; +use crate::dom::bindings::codegen::Bindings::GPUBufferBinding::{GPUBufferMethods, GPUBufferSize}; use crate::dom::bindings::error::Error; use crate::dom::bindings::reflector::DomObject; use crate::dom::bindings::reflector::{reflect_dom_object, Reflector}; @@ -98,7 +96,6 @@ impl GPUBuffer { channel, buffer, device, state, size, usage, valid, mapping, )), global, - GPUBufferBinding::Wrap, ) } } diff --git a/components/script/dom/gpucommandbuffer.rs b/components/script/dom/gpucommandbuffer.rs index 24cd781c092..b1871051e52 100644 --- a/components/script/dom/gpucommandbuffer.rs +++ b/components/script/dom/gpucommandbuffer.rs @@ -3,9 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::cell::{DomRefCell, Ref}; -use crate::dom::bindings::codegen::Bindings::GPUCommandBufferBinding::{ - self, GPUCommandBufferMethods, -}; +use crate::dom::bindings::codegen::Bindings::GPUCommandBufferBinding::GPUCommandBufferMethods; use crate::dom::bindings::reflector::{reflect_dom_object, Reflector}; use crate::dom::bindings::root::Dom; use crate::dom::bindings::root::DomRoot; @@ -62,7 +60,6 @@ impl GPUCommandBuffer { buffers, )), global, - GPUCommandBufferBinding::Wrap, ) } } diff --git a/components/script/dom/gpucommandencoder.rs b/components/script/dom/gpucommandencoder.rs index 348e77828f1..46d0872643e 100644 --- a/components/script/dom/gpucommandencoder.rs +++ b/components/script/dom/gpucommandencoder.rs @@ -4,7 +4,7 @@ use crate::dom::bindings::cell::DomRefCell; use crate::dom::bindings::codegen::Bindings::GPUCommandEncoderBinding::{ - self, GPUCommandBufferDescriptor, GPUCommandEncoderMethods, GPUComputePassDescriptor, + GPUCommandBufferDescriptor, GPUCommandEncoderMethods, GPUComputePassDescriptor, }; use crate::dom::bindings::reflector::DomObject; use crate::dom::bindings::reflector::{reflect_dom_object, Reflector}; @@ -48,7 +48,6 @@ impl GPUCommandEncoder { reflect_dom_object( Box::new(GPUCommandEncoder::new_inherited(channel, encoder)), global, - GPUCommandEncoderBinding::Wrap, ) } } diff --git a/components/script/dom/gpucomputepassencoder.rs b/components/script/dom/gpucomputepassencoder.rs index a25f47e1330..c7e742cae84 100644 --- a/components/script/dom/gpucomputepassencoder.rs +++ b/components/script/dom/gpucomputepassencoder.rs @@ -3,9 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::cell::DomRefCell; -use crate::dom::bindings::codegen::Bindings::GPUComputePassEncoderBinding::{ - self, GPUComputePassEncoderMethods, -}; +use crate::dom::bindings::codegen::Bindings::GPUComputePassEncoderBinding::GPUComputePassEncoderMethods; use crate::dom::bindings::reflector::{reflect_dom_object, Reflector}; use crate::dom::bindings::root::DomRoot; use crate::dom::bindings::str::DOMString; @@ -53,7 +51,6 @@ impl GPUComputePassEncoder { reflect_dom_object( Box::new(GPUComputePassEncoder::new_inherited(channel, parent)), global, - GPUComputePassEncoderBinding::Wrap, ) } } diff --git a/components/script/dom/gpucomputepipeline.rs b/components/script/dom/gpucomputepipeline.rs index 5d7620b4556..a4700db4505 100644 --- a/components/script/dom/gpucomputepipeline.rs +++ b/components/script/dom/gpucomputepipeline.rs @@ -3,9 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::cell::DomRefCell; -use crate::dom::bindings::codegen::Bindings::GPUComputePipelineBinding::{ - GPUComputePipelineBinding, GPUComputePipelineMethods, -}; +use crate::dom::bindings::codegen::Bindings::GPUComputePipelineBinding::GPUComputePipelineMethods; use crate::dom::bindings::reflector::reflect_dom_object; use crate::dom::bindings::reflector::Reflector; use crate::dom::bindings::root::DomRoot; @@ -37,7 +35,6 @@ impl GPUComputePipeline { reflect_dom_object( Box::new(GPUComputePipeline::new_inherited(compute_pipeline)), global, - GPUComputePipelineBinding::Wrap, ) } } diff --git a/components/script/dom/gpudevice.rs b/components/script/dom/gpudevice.rs index 4a1e4747715..571fde904fd 100644 --- a/components/script/dom/gpudevice.rs +++ b/components/script/dom/gpudevice.rs @@ -13,7 +13,7 @@ use crate::dom::bindings::codegen::Bindings::GPUBindGroupLayoutBinding::{ use crate::dom::bindings::codegen::Bindings::GPUBufferBinding::GPUBufferDescriptor; use crate::dom::bindings::codegen::Bindings::GPUComputePipelineBinding::GPUComputePipelineDescriptor; use crate::dom::bindings::codegen::Bindings::GPUDeviceBinding::{ - self, GPUCommandEncoderDescriptor, GPUDeviceMethods, + GPUCommandEncoderDescriptor, GPUDeviceMethods, }; use crate::dom::bindings::codegen::Bindings::GPUPipelineLayoutBinding::GPUPipelineLayoutDescriptor; use crate::dom::bindings::codegen::Bindings::GPUShaderModuleBinding::GPUShaderModuleDescriptor; @@ -100,7 +100,6 @@ impl GPUDevice { channel, adapter, extensions, limits, device, &queue, )), global, - GPUDeviceBinding::Wrap, ) } } diff --git a/components/script/dom/gpupipelinelayout.rs b/components/script/dom/gpupipelinelayout.rs index 40f5fd9324d..a3f816deb0d 100644 --- a/components/script/dom/gpupipelinelayout.rs +++ b/components/script/dom/gpupipelinelayout.rs @@ -3,9 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::cell::DomRefCell; -use crate::dom::bindings::codegen::Bindings::GPUPipelineLayoutBinding::{ - self, GPUPipelineLayoutMethods, -}; +use crate::dom::bindings::codegen::Bindings::GPUPipelineLayoutBinding::GPUPipelineLayoutMethods; use crate::dom::bindings::reflector::{reflect_dom_object, Reflector}; use crate::dom::bindings::root::DomRoot; use crate::dom::bindings::str::DOMString; @@ -51,7 +49,6 @@ impl GPUPipelineLayout { valid, )), global, - GPUPipelineLayoutBinding::Wrap, ) } } diff --git a/components/script/dom/gpuqueue.rs b/components/script/dom/gpuqueue.rs index c257ec5ef09..1b4ffa590f3 100644 --- a/components/script/dom/gpuqueue.rs +++ b/components/script/dom/gpuqueue.rs @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::cell::DomRefCell; -use crate::dom::bindings::codegen::Bindings::GPUQueueBinding::{self, GPUQueueMethods}; +use crate::dom::bindings::codegen::Bindings::GPUQueueBinding::GPUQueueMethods; use crate::dom::bindings::reflector::{reflect_dom_object, Reflector}; use crate::dom::bindings::root::DomRoot; use crate::dom::bindings::str::DOMString; @@ -33,11 +33,7 @@ impl GPUQueue { } pub fn new(global: &GlobalScope, channel: WebGPU, queue: WebGPUQueue) -> DomRoot<GPUQueue> { - reflect_dom_object( - Box::new(GPUQueue::new_inherited(channel, queue)), - global, - GPUQueueBinding::Wrap, - ) + reflect_dom_object(Box::new(GPUQueue::new_inherited(channel, queue)), global) } } diff --git a/components/script/dom/gpushadermodule.rs b/components/script/dom/gpushadermodule.rs index 241f0650245..07aef69cbcc 100644 --- a/components/script/dom/gpushadermodule.rs +++ b/components/script/dom/gpushadermodule.rs @@ -3,9 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::cell::DomRefCell; -use crate::dom::bindings::codegen::Bindings::GPUShaderModuleBinding::{ - self, GPUShaderModuleMethods, -}; +use crate::dom::bindings::codegen::Bindings::GPUShaderModuleBinding::GPUShaderModuleMethods; use crate::dom::bindings::reflector::{reflect_dom_object, Reflector}; use crate::dom::bindings::root::DomRoot; use crate::dom::bindings::str::DOMString; @@ -36,7 +34,6 @@ impl GPUShaderModule { reflect_dom_object( Box::new(GPUShaderModule::new_inherited(shader_module)), global, - GPUShaderModuleBinding::Wrap, ) } } diff --git a/components/script/dom/hashchangeevent.rs b/components/script/dom/hashchangeevent.rs index 44a46f162db..046500b9b6d 100644 --- a/components/script/dom/hashchangeevent.rs +++ b/components/script/dom/hashchangeevent.rs @@ -36,7 +36,6 @@ impl HashChangeEvent { reflect_dom_object( Box::new(HashChangeEvent::new_inherited(String::new(), String::new())), window, - HashChangeEventBinding::Wrap, ) } @@ -51,7 +50,6 @@ impl HashChangeEvent { let ev = reflect_dom_object( Box::new(HashChangeEvent::new_inherited(old_url, new_url)), window, - HashChangeEventBinding::Wrap, ); { let event = ev.upcast::<Event>(); diff --git a/components/script/dom/headers.rs b/components/script/dom/headers.rs index f16d24604db..c8d0f79fc82 100644 --- a/components/script/dom/headers.rs +++ b/components/script/dom/headers.rs @@ -3,9 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::cell::DomRefCell; -use crate::dom::bindings::codegen::Bindings::HeadersBinding::{ - HeadersInit, HeadersMethods, HeadersWrap, -}; +use crate::dom::bindings::codegen::Bindings::HeadersBinding::{HeadersInit, HeadersMethods}; use crate::dom::bindings::error::{Error, ErrorResult, Fallible}; use crate::dom::bindings::iterable::Iterable; use crate::dom::bindings::reflector::{reflect_dom_object, Reflector}; @@ -46,7 +44,7 @@ impl Headers { } pub fn new(global: &GlobalScope) -> DomRoot<Headers> { - reflect_dom_object(Box::new(Headers::new_inherited()), global, HeadersWrap) + reflect_dom_object(Box::new(Headers::new_inherited()), global) } // https://fetch.spec.whatwg.org/#dom-headers diff --git a/components/script/dom/history.rs b/components/script/dom/history.rs index ef7a6fbe916..9023a397c66 100644 --- a/components/script/dom/history.rs +++ b/components/script/dom/history.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::HistoryBinding; use crate::dom::bindings::codegen::Bindings::HistoryBinding::HistoryMethods; use crate::dom::bindings::codegen::Bindings::LocationBinding::LocationBinding::LocationMethods; use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowMethods; @@ -59,11 +58,7 @@ impl History { } pub fn new(window: &Window) -> DomRoot<History> { - reflect_dom_object( - Box::new(History::new_inherited(window)), - window, - HistoryBinding::Wrap, - ) + reflect_dom_object(Box::new(History::new_inherited(window)), window) } } diff --git a/components/script/dom/htmlanchorelement.rs b/components/script/dom/htmlanchorelement.rs index 00a3fb5a06f..a0f939b93ad 100644 --- a/components/script/dom/htmlanchorelement.rs +++ b/components/script/dom/htmlanchorelement.rs @@ -5,7 +5,6 @@ use crate::dom::activation::Activatable; use crate::dom::bindings::cell::DomRefCell; use crate::dom::bindings::codegen::Bindings::AttrBinding::AttrMethods; -use crate::dom::bindings::codegen::Bindings::HTMLAnchorElementBinding; use crate::dom::bindings::codegen::Bindings::HTMLAnchorElementBinding::HTMLAnchorElementMethods; use crate::dom::bindings::codegen::Bindings::MouseEventBinding::MouseEventMethods; use crate::dom::bindings::codegen::Bindings::NodeBinding::NodeMethods; @@ -66,7 +65,6 @@ impl HTMLAnchorElement { local_name, prefix, document, )), document, - HTMLAnchorElementBinding::Wrap, ) } diff --git a/components/script/dom/htmlareaelement.rs b/components/script/dom/htmlareaelement.rs index 2e6549f5939..1f25510b819 100644 --- a/components/script/dom/htmlareaelement.rs +++ b/components/script/dom/htmlareaelement.rs @@ -3,7 +3,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::activation::Activatable; -use crate::dom::bindings::codegen::Bindings::HTMLAreaElementBinding; use crate::dom::bindings::codegen::Bindings::HTMLAreaElementBinding::HTMLAreaElementMethods; use crate::dom::bindings::inheritance::Castable; use crate::dom::bindings::root::{DomRoot, MutNullableDom}; @@ -257,7 +256,6 @@ impl HTMLAreaElement { Node::reflect_node( Box::new(HTMLAreaElement::new_inherited(local_name, prefix, document)), document, - HTMLAreaElementBinding::Wrap, ) } diff --git a/components/script/dom/htmlaudioelement.rs b/components/script/dom/htmlaudioelement.rs index aa18834e631..db8f1877a6d 100644 --- a/components/script/dom/htmlaudioelement.rs +++ b/components/script/dom/htmlaudioelement.rs @@ -3,7 +3,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::codegen::Bindings::ElementBinding::ElementBinding::ElementMethods; -use crate::dom::bindings::codegen::Bindings::HTMLAudioElementBinding; use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowMethods; use crate::dom::bindings::error::Fallible; use crate::dom::bindings::inheritance::Castable; @@ -44,7 +43,6 @@ impl HTMLAudioElement { local_name, prefix, document, )), document, - HTMLAudioElementBinding::Wrap, ) } diff --git a/components/script/dom/htmlbaseelement.rs b/components/script/dom/htmlbaseelement.rs index 71aa235df62..e6568716e1f 100644 --- a/components/script/dom/htmlbaseelement.rs +++ b/components/script/dom/htmlbaseelement.rs @@ -3,7 +3,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::attr::Attr; -use crate::dom::bindings::codegen::Bindings::HTMLBaseElementBinding; use crate::dom::bindings::codegen::Bindings::HTMLBaseElementBinding::HTMLBaseElementMethods; use crate::dom::bindings::inheritance::Castable; use crate::dom::bindings::root::DomRoot; @@ -42,7 +41,6 @@ impl HTMLBaseElement { Node::reflect_node( Box::new(HTMLBaseElement::new_inherited(local_name, prefix, document)), document, - HTMLBaseElementBinding::Wrap, ) } diff --git a/components/script/dom/htmlbodyelement.rs b/components/script/dom/htmlbodyelement.rs index f59d163d163..cc2e20e68a9 100644 --- a/components/script/dom/htmlbodyelement.rs +++ b/components/script/dom/htmlbodyelement.rs @@ -3,9 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::attr::Attr; -use crate::dom::bindings::codegen::Bindings::HTMLBodyElementBinding::{ - self, HTMLBodyElementMethods, -}; +use crate::dom::bindings::codegen::Bindings::HTMLBodyElementBinding::HTMLBodyElementMethods; use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowMethods; use crate::dom::bindings::inheritance::Castable; use crate::dom::bindings::root::{DomRoot, LayoutDom}; @@ -52,7 +50,6 @@ impl HTMLBodyElement { Node::reflect_node( Box::new(HTMLBodyElement::new_inherited(local_name, prefix, document)), document, - HTMLBodyElementBinding::Wrap, ) } diff --git a/components/script/dom/htmlbrelement.rs b/components/script/dom/htmlbrelement.rs index 0a5a5e16566..d087dfffb02 100644 --- a/components/script/dom/htmlbrelement.rs +++ b/components/script/dom/htmlbrelement.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::HTMLBRElementBinding; use crate::dom::bindings::root::DomRoot; use crate::dom::document::Document; use crate::dom::htmlelement::HTMLElement; @@ -35,7 +34,6 @@ impl HTMLBRElement { Node::reflect_node( Box::new(HTMLBRElement::new_inherited(local_name, prefix, document)), document, - HTMLBRElementBinding::Wrap, ) } } diff --git a/components/script/dom/htmlbuttonelement.rs b/components/script/dom/htmlbuttonelement.rs index db5df824fe9..45d1630e6d4 100755 --- a/components/script/dom/htmlbuttonelement.rs +++ b/components/script/dom/htmlbuttonelement.rs @@ -4,7 +4,6 @@ use crate::dom::activation::Activatable; use crate::dom::attr::Attr; -use crate::dom::bindings::codegen::Bindings::HTMLButtonElementBinding; use crate::dom::bindings::codegen::Bindings::HTMLButtonElementBinding::HTMLButtonElementMethods; use crate::dom::bindings::inheritance::Castable; use crate::dom::bindings::root::{DomRoot, MutNullableDom}; @@ -74,7 +73,6 @@ impl HTMLButtonElement { local_name, prefix, document, )), document, - HTMLButtonElementBinding::Wrap, ) } } diff --git a/components/script/dom/htmlcanvaselement.rs b/components/script/dom/htmlcanvaselement.rs index e56ca4a8266..21a07120b77 100644 --- a/components/script/dom/htmlcanvaselement.rs +++ b/components/script/dom/htmlcanvaselement.rs @@ -4,7 +4,6 @@ use crate::dom::attr::Attr; use crate::dom::bindings::cell::{ref_filter_map, DomRefCell, Ref}; -use crate::dom::bindings::codegen::Bindings::HTMLCanvasElementBinding; use crate::dom::bindings::codegen::Bindings::HTMLCanvasElementBinding::{ HTMLCanvasElementMethods, RenderingContext, }; @@ -86,7 +85,6 @@ impl HTMLCanvasElement { local_name, prefix, document, )), document, - HTMLCanvasElementBinding::Wrap, ) } diff --git a/components/script/dom/htmlcollection.rs b/components/script/dom/htmlcollection.rs index 7196e144add..d5198b94986 100644 --- a/components/script/dom/htmlcollection.rs +++ b/components/script/dom/htmlcollection.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::HTMLCollectionBinding; use crate::dom::bindings::codegen::Bindings::HTMLCollectionBinding::HTMLCollectionMethods; use crate::dom::bindings::inheritance::Castable; use crate::dom::bindings::reflector::{reflect_dom_object, Reflector}; @@ -107,7 +106,6 @@ impl HTMLCollection { reflect_dom_object( Box::new(HTMLCollection::new_inherited(root, filter)), window, - HTMLCollectionBinding::Wrap, ) } diff --git a/components/script/dom/htmldataelement.rs b/components/script/dom/htmldataelement.rs index 2506d6e7fb4..93594ec8816 100644 --- a/components/script/dom/htmldataelement.rs +++ b/components/script/dom/htmldataelement.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::HTMLDataElementBinding; use crate::dom::bindings::codegen::Bindings::HTMLDataElementBinding::HTMLDataElementMethods; use crate::dom::bindings::root::DomRoot; use crate::dom::bindings::str::DOMString; @@ -37,7 +36,6 @@ impl HTMLDataElement { Node::reflect_node( Box::new(HTMLDataElement::new_inherited(local_name, prefix, document)), document, - HTMLDataElementBinding::Wrap, ) } } diff --git a/components/script/dom/htmldatalistelement.rs b/components/script/dom/htmldatalistelement.rs index f5ad519380f..6bddb2800e4 100644 --- a/components/script/dom/htmldatalistelement.rs +++ b/components/script/dom/htmldatalistelement.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::HTMLDataListElementBinding; use crate::dom::bindings::codegen::Bindings::HTMLDataListElementBinding::HTMLDataListElementMethods; use crate::dom::bindings::inheritance::Castable; use crate::dom::bindings::root::DomRoot; @@ -42,7 +41,6 @@ impl HTMLDataListElement { local_name, prefix, document, )), document, - HTMLDataListElementBinding::Wrap, ) } } diff --git a/components/script/dom/htmldetailselement.rs b/components/script/dom/htmldetailselement.rs index 05742dfe777..314611707ea 100644 --- a/components/script/dom/htmldetailselement.rs +++ b/components/script/dom/htmldetailselement.rs @@ -3,7 +3,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::attr::Attr; -use crate::dom::bindings::codegen::Bindings::HTMLDetailsElementBinding; use crate::dom::bindings::codegen::Bindings::HTMLDetailsElementBinding::HTMLDetailsElementMethods; use crate::dom::bindings::inheritance::Castable; use crate::dom::bindings::refcounted::Trusted; @@ -48,7 +47,6 @@ impl HTMLDetailsElement { local_name, prefix, document, )), document, - HTMLDetailsElementBinding::Wrap, ) } } diff --git a/components/script/dom/htmldialogelement.rs b/components/script/dom/htmldialogelement.rs index d26865bc78a..135f7afe035 100644 --- a/components/script/dom/htmldialogelement.rs +++ b/components/script/dom/htmldialogelement.rs @@ -3,7 +3,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::cell::DomRefCell; -use crate::dom::bindings::codegen::Bindings::HTMLDialogElementBinding; use crate::dom::bindings::codegen::Bindings::HTMLDialogElementBinding::HTMLDialogElementMethods; use crate::dom::bindings::inheritance::Castable; use crate::dom::bindings::root::DomRoot; @@ -45,7 +44,6 @@ impl HTMLDialogElement { local_name, prefix, document, )), document, - HTMLDialogElementBinding::Wrap, ) } } diff --git a/components/script/dom/htmldirectoryelement.rs b/components/script/dom/htmldirectoryelement.rs index cc4611b3c40..ce2472be3d3 100644 --- a/components/script/dom/htmldirectoryelement.rs +++ b/components/script/dom/htmldirectoryelement.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::HTMLDirectoryElementBinding; use crate::dom::bindings::root::DomRoot; use crate::dom::document::Document; use crate::dom::htmlelement::HTMLElement; @@ -37,7 +36,6 @@ impl HTMLDirectoryElement { local_name, prefix, document, )), document, - HTMLDirectoryElementBinding::Wrap, ) } } diff --git a/components/script/dom/htmldivelement.rs b/components/script/dom/htmldivelement.rs index 3c8bc187614..0bd558210a0 100644 --- a/components/script/dom/htmldivelement.rs +++ b/components/script/dom/htmldivelement.rs @@ -2,7 +2,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::HTMLDivElementBinding::{self, HTMLDivElementMethods}; +use crate::dom::bindings::codegen::Bindings::HTMLDivElementBinding::HTMLDivElementMethods; use crate::dom::bindings::root::DomRoot; use crate::dom::bindings::str::DOMString; use crate::dom::document::Document; @@ -36,7 +36,6 @@ impl HTMLDivElement { Node::reflect_node( Box::new(HTMLDivElement::new_inherited(local_name, prefix, document)), document, - HTMLDivElementBinding::Wrap, ) } } diff --git a/components/script/dom/htmldlistelement.rs b/components/script/dom/htmldlistelement.rs index 46a5c3e32fd..356c30c8c94 100644 --- a/components/script/dom/htmldlistelement.rs +++ b/components/script/dom/htmldlistelement.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::HTMLDListElementBinding; use crate::dom::bindings::root::DomRoot; use crate::dom::document::Document; use crate::dom::htmlelement::HTMLElement; @@ -37,7 +36,6 @@ impl HTMLDListElement { local_name, prefix, document, )), document, - HTMLDListElementBinding::Wrap, ) } } diff --git a/components/script/dom/htmlelement.rs b/components/script/dom/htmlelement.rs index 00d7a64ed32..695cdbe6a49 100644 --- a/components/script/dom/htmlelement.rs +++ b/components/script/dom/htmlelement.rs @@ -5,7 +5,6 @@ use crate::dom::attr::Attr; use crate::dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull; use crate::dom::bindings::codegen::Bindings::EventHandlerBinding::OnErrorEventHandlerNonNull; -use crate::dom::bindings::codegen::Bindings::HTMLElementBinding; use crate::dom::bindings::codegen::Bindings::HTMLElementBinding::HTMLElementMethods; use crate::dom::bindings::codegen::Bindings::HTMLLabelElementBinding::HTMLLabelElementMethods; use crate::dom::bindings::codegen::Bindings::NodeBinding::NodeBinding::NodeMethods; @@ -85,7 +84,6 @@ impl HTMLElement { Node::reflect_node( Box::new(HTMLElement::new_inherited(local_name, prefix, document)), document, - HTMLElementBinding::Wrap, ) } diff --git a/components/script/dom/htmlembedelement.rs b/components/script/dom/htmlembedelement.rs index 729421057f7..e21b8f5ce35 100644 --- a/components/script/dom/htmlembedelement.rs +++ b/components/script/dom/htmlembedelement.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::HTMLEmbedElementBinding; use crate::dom::bindings::root::DomRoot; use crate::dom::document::Document; use crate::dom::htmlelement::HTMLElement; @@ -37,7 +36,6 @@ impl HTMLEmbedElement { local_name, prefix, document, )), document, - HTMLEmbedElementBinding::Wrap, ) } } diff --git a/components/script/dom/htmlfieldsetelement.rs b/components/script/dom/htmlfieldsetelement.rs index a95d8a8120a..a277cf8e2ec 100644 --- a/components/script/dom/htmlfieldsetelement.rs +++ b/components/script/dom/htmlfieldsetelement.rs @@ -3,7 +3,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::attr::Attr; -use crate::dom::bindings::codegen::Bindings::HTMLFieldSetElementBinding; use crate::dom::bindings::codegen::Bindings::HTMLFieldSetElementBinding::HTMLFieldSetElementMethods; use crate::dom::bindings::inheritance::{Castable, ElementTypeId, HTMLElementTypeId, NodeTypeId}; use crate::dom::bindings::root::{DomRoot, MutNullableDom}; @@ -56,7 +55,6 @@ impl HTMLFieldSetElement { local_name, prefix, document, )), document, - HTMLFieldSetElementBinding::Wrap, ) } } diff --git a/components/script/dom/htmlfontelement.rs b/components/script/dom/htmlfontelement.rs index dfdc6b862fb..fe7b52c1100 100644 --- a/components/script/dom/htmlfontelement.rs +++ b/components/script/dom/htmlfontelement.rs @@ -3,7 +3,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::attr::Attr; -use crate::dom::bindings::codegen::Bindings::HTMLFontElementBinding; use crate::dom::bindings::codegen::Bindings::HTMLFontElementBinding::HTMLFontElementMethods; use crate::dom::bindings::inheritance::Castable; use crate::dom::bindings::root::{DomRoot, LayoutDom}; @@ -45,7 +44,6 @@ impl HTMLFontElement { Node::reflect_node( Box::new(HTMLFontElement::new_inherited(local_name, prefix, document)), document, - HTMLFontElementBinding::Wrap, ) } } diff --git a/components/script/dom/htmlformcontrolscollection.rs b/components/script/dom/htmlformcontrolscollection.rs index 59d6b923616..f687870b058 100644 --- a/components/script/dom/htmlformcontrolscollection.rs +++ b/components/script/dom/htmlformcontrolscollection.rs @@ -3,7 +3,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::codegen::Bindings::HTMLCollectionBinding::HTMLCollectionMethods; -use crate::dom::bindings::codegen::Bindings::HTMLFormControlsCollectionBinding; use crate::dom::bindings::codegen::Bindings::HTMLFormControlsCollectionBinding::HTMLFormControlsCollectionMethods; use crate::dom::bindings::codegen::Bindings::NodeBinding::{GetRootNodeOptions, NodeMethods}; use crate::dom::bindings::codegen::UnionTypes::RadioNodeListOrElement; @@ -48,7 +47,6 @@ impl HTMLFormControlsCollection { reflect_dom_object( Box::new(HTMLFormControlsCollection::new_inherited(form, filter)), window, - HTMLFormControlsCollectionBinding::Wrap, ) } diff --git a/components/script/dom/htmlformelement.rs b/components/script/dom/htmlformelement.rs index 30d1857de9d..08f2cf0499c 100644 --- a/components/script/dom/htmlformelement.rs +++ b/components/script/dom/htmlformelement.rs @@ -9,7 +9,6 @@ use crate::dom::bindings::codegen::Bindings::DocumentBinding::DocumentMethods; use crate::dom::bindings::codegen::Bindings::EventBinding::EventMethods; use crate::dom::bindings::codegen::Bindings::HTMLButtonElementBinding::HTMLButtonElementMethods; use crate::dom::bindings::codegen::Bindings::HTMLFormControlsCollectionBinding::HTMLFormControlsCollectionMethods; -use crate::dom::bindings::codegen::Bindings::HTMLFormElementBinding; use crate::dom::bindings::codegen::Bindings::HTMLFormElementBinding::HTMLFormElementMethods; use crate::dom::bindings::codegen::Bindings::HTMLInputElementBinding::HTMLInputElementMethods; use crate::dom::bindings::codegen::Bindings::HTMLTextAreaElementBinding::HTMLTextAreaElementMethods; @@ -115,7 +114,6 @@ impl HTMLFormElement { Node::reflect_node( Box::new(HTMLFormElement::new_inherited(local_name, prefix, document)), document, - HTMLFormElementBinding::Wrap, ) } diff --git a/components/script/dom/htmlframeelement.rs b/components/script/dom/htmlframeelement.rs index 4afd3bff574..fa3ad51393e 100644 --- a/components/script/dom/htmlframeelement.rs +++ b/components/script/dom/htmlframeelement.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::HTMLFrameElementBinding; use crate::dom::bindings::root::DomRoot; use crate::dom::document::Document; use crate::dom::htmlelement::HTMLElement; @@ -37,7 +36,6 @@ impl HTMLFrameElement { local_name, prefix, document, )), document, - HTMLFrameElementBinding::Wrap, ) } } diff --git a/components/script/dom/htmlframesetelement.rs b/components/script/dom/htmlframesetelement.rs index 66bc28bb4a3..2c7260ee2c1 100644 --- a/components/script/dom/htmlframesetelement.rs +++ b/components/script/dom/htmlframesetelement.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::HTMLFrameSetElementBinding; use crate::dom::bindings::codegen::Bindings::HTMLFrameSetElementBinding::HTMLFrameSetElementMethods; use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowMethods; use crate::dom::bindings::root::DomRoot; @@ -39,7 +38,6 @@ impl HTMLFrameSetElement { local_name, prefix, document, )), document, - HTMLFrameSetElementBinding::Wrap, ) } } diff --git a/components/script/dom/htmlheadelement.rs b/components/script/dom/htmlheadelement.rs index 9bf288639bc..efa0bc7d515 100644 --- a/components/script/dom/htmlheadelement.rs +++ b/components/script/dom/htmlheadelement.rs @@ -3,7 +3,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::codegen::Bindings::DocumentBinding::DocumentMethods; -use crate::dom::bindings::codegen::Bindings::HTMLHeadElementBinding; use crate::dom::bindings::inheritance::Castable; use crate::dom::bindings::root::DomRoot; use crate::dom::document::{determine_policy_for_token, Document}; @@ -41,7 +40,6 @@ impl HTMLHeadElement { Node::reflect_node( Box::new(HTMLHeadElement::new_inherited(local_name, prefix, document)), document, - HTMLHeadElementBinding::Wrap, ) } diff --git a/components/script/dom/htmlheadingelement.rs b/components/script/dom/htmlheadingelement.rs index bf6cdc9caea..659cf14f4d2 100644 --- a/components/script/dom/htmlheadingelement.rs +++ b/components/script/dom/htmlheadingelement.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::HTMLHeadingElementBinding; use crate::dom::bindings::root::DomRoot; use crate::dom::document::Document; use crate::dom::htmlelement::HTMLElement; @@ -51,7 +50,6 @@ impl HTMLHeadingElement { local_name, prefix, document, level, )), document, - HTMLHeadingElementBinding::Wrap, ) } } diff --git a/components/script/dom/htmlhrelement.rs b/components/script/dom/htmlhrelement.rs index 22c58a7e44a..557e4fbcc19 100644 --- a/components/script/dom/htmlhrelement.rs +++ b/components/script/dom/htmlhrelement.rs @@ -2,7 +2,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::HTMLHRElementBinding::{self, HTMLHRElementMethods}; +use crate::dom::bindings::codegen::Bindings::HTMLHRElementBinding::HTMLHRElementMethods; use crate::dom::bindings::inheritance::Castable; use crate::dom::bindings::root::{DomRoot, LayoutDom}; use crate::dom::bindings::str::DOMString; @@ -41,7 +41,6 @@ impl HTMLHRElement { Node::reflect_node( Box::new(HTMLHRElement::new_inherited(local_name, prefix, document)), document, - HTMLHRElementBinding::Wrap, ) } } diff --git a/components/script/dom/htmlhtmlelement.rs b/components/script/dom/htmlhtmlelement.rs index b95f79e5ac0..05b34dec3dc 100644 --- a/components/script/dom/htmlhtmlelement.rs +++ b/components/script/dom/htmlhtmlelement.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::HTMLHtmlElementBinding; use crate::dom::bindings::root::DomRoot; use crate::dom::document::Document; use crate::dom::htmlelement::HTMLElement; @@ -36,7 +35,6 @@ impl HTMLHtmlElement { Node::reflect_node( Box::new(HTMLHtmlElement::new_inherited(localName, prefix, document)), document, - HTMLHtmlElementBinding::Wrap, ) } } diff --git a/components/script/dom/htmliframeelement.rs b/components/script/dom/htmliframeelement.rs index 94835030c08..17e38aec157 100644 --- a/components/script/dom/htmliframeelement.rs +++ b/components/script/dom/htmliframeelement.rs @@ -5,7 +5,6 @@ use crate::document_loader::{LoadBlocker, LoadType}; use crate::dom::attr::Attr; use crate::dom::bindings::cell::DomRefCell; -use crate::dom::bindings::codegen::Bindings::HTMLIFrameElementBinding; use crate::dom::bindings::codegen::Bindings::HTMLIFrameElementBinding::HTMLIFrameElementMethods; use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowBinding::WindowMethods; use crate::dom::bindings::inheritance::Castable; @@ -429,7 +428,6 @@ impl HTMLIFrameElement { local_name, prefix, document, )), document, - HTMLIFrameElementBinding::Wrap, ) } diff --git a/components/script/dom/htmlimageelement.rs b/components/script/dom/htmlimageelement.rs index 95e5c43af66..3b4052e6b73 100644 --- a/components/script/dom/htmlimageelement.rs +++ b/components/script/dom/htmlimageelement.rs @@ -8,7 +8,6 @@ use crate::dom::attr::Attr; use crate::dom::bindings::cell::{DomRefCell, RefMut}; use crate::dom::bindings::codegen::Bindings::DOMRectBinding::DOMRectBinding::DOMRectMethods; use crate::dom::bindings::codegen::Bindings::ElementBinding::ElementBinding::ElementMethods; -use crate::dom::bindings::codegen::Bindings::HTMLImageElementBinding; use crate::dom::bindings::codegen::Bindings::HTMLImageElementBinding::HTMLImageElementMethods; use crate::dom::bindings::codegen::Bindings::MouseEventBinding::MouseEventMethods; use crate::dom::bindings::codegen::Bindings::NodeBinding::NodeBinding::NodeMethods; @@ -1261,7 +1260,6 @@ impl HTMLImageElement { local_name, prefix, document, )), document, - HTMLImageElementBinding::Wrap, ) } diff --git a/components/script/dom/htmlinputelement.rs b/components/script/dom/htmlinputelement.rs index c27d5b2f9b5..083e977a566 100755 --- a/components/script/dom/htmlinputelement.rs +++ b/components/script/dom/htmlinputelement.rs @@ -9,7 +9,6 @@ use crate::dom::bindings::codegen::Bindings::ElementBinding::ElementMethods; use crate::dom::bindings::codegen::Bindings::EventBinding::EventMethods; use crate::dom::bindings::codegen::Bindings::FileListBinding::FileListMethods; use crate::dom::bindings::codegen::Bindings::HTMLFormElementBinding::SelectionMode; -use crate::dom::bindings::codegen::Bindings::HTMLInputElementBinding; use crate::dom::bindings::codegen::Bindings::HTMLInputElementBinding::HTMLInputElementMethods; use crate::dom::bindings::codegen::Bindings::NodeBinding::{GetRootNodeOptions, NodeMethods}; use crate::dom::bindings::error::{Error, ErrorResult}; @@ -324,7 +323,6 @@ impl HTMLInputElement { local_name, prefix, document, )), document, - HTMLInputElementBinding::Wrap, ) } diff --git a/components/script/dom/htmllabelelement.rs b/components/script/dom/htmllabelelement.rs index 3953ed585f7..970f4a97b7a 100644 --- a/components/script/dom/htmllabelelement.rs +++ b/components/script/dom/htmllabelelement.rs @@ -7,7 +7,6 @@ use crate::dom::attr::Attr; use crate::dom::bindings::codegen::Bindings::AttrBinding::AttrMethods; use crate::dom::bindings::codegen::Bindings::ElementBinding::ElementMethods; use crate::dom::bindings::codegen::Bindings::HTMLElementBinding::HTMLElementMethods; -use crate::dom::bindings::codegen::Bindings::HTMLLabelElementBinding; use crate::dom::bindings::codegen::Bindings::HTMLLabelElementBinding::HTMLLabelElementMethods; use crate::dom::bindings::codegen::Bindings::NodeBinding::{GetRootNodeOptions, NodeMethods}; use crate::dom::bindings::inheritance::Castable; @@ -52,7 +51,6 @@ impl HTMLLabelElement { local_name, prefix, document, )), document, - HTMLLabelElementBinding::Wrap, ) } } diff --git a/components/script/dom/htmllegendelement.rs b/components/script/dom/htmllegendelement.rs index 41cf7d3d8ff..bfb0f0701c8 100644 --- a/components/script/dom/htmllegendelement.rs +++ b/components/script/dom/htmllegendelement.rs @@ -2,7 +2,6 @@ // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at https://mozilla.org/MPL/2.0/. -use crate::dom::bindings::codegen::Bindings::HTMLLegendElementBinding; use crate::dom::bindings::codegen::Bindings::HTMLLegendElementBinding::HTMLLegendElementMethods; use crate::dom::bindings::codegen::Bindings::NodeBinding::NodeMethods; use crate::dom::bindings::inheritance::Castable; @@ -46,7 +45,6 @@ impl HTMLLegendElement { local_name, prefix, document, )), document, - HTMLLegendElementBinding::Wrap, ) } } diff --git a/components/script/dom/htmllielement.rs b/components/script/dom/htmllielement.rs index 3468fa9ee80..2697f6643e8 100644 --- a/components/script/dom/htmllielement.rs +++ b/components/script/dom/htmllielement.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::HTMLLIElementBinding; use crate::dom::bindings::codegen::Bindings::HTMLLIElementBinding::HTMLLIElementMethods; use crate::dom::bindings::inheritance::Castable; use crate::dom::bindings::root::DomRoot; @@ -40,7 +39,6 @@ impl HTMLLIElement { Node::reflect_node( Box::new(HTMLLIElement::new_inherited(local_name, prefix, document)), document, - HTMLLIElementBinding::Wrap, ) } } diff --git a/components/script/dom/htmllinkelement.rs b/components/script/dom/htmllinkelement.rs index 8dd50c11441..167420be382 100644 --- a/components/script/dom/htmllinkelement.rs +++ b/components/script/dom/htmllinkelement.rs @@ -5,7 +5,6 @@ use crate::dom::attr::Attr; use crate::dom::bindings::cell::DomRefCell; use crate::dom::bindings::codegen::Bindings::DOMTokenListBinding::DOMTokenListBinding::DOMTokenListMethods; -use crate::dom::bindings::codegen::Bindings::HTMLLinkElementBinding; use crate::dom::bindings::codegen::Bindings::HTMLLinkElementBinding::HTMLLinkElementMethods; use crate::dom::bindings::inheritance::Castable; use crate::dom::bindings::root::{DomRoot, MutNullableDom}; @@ -100,7 +99,6 @@ impl HTMLLinkElement { local_name, prefix, document, creator, )), document, - HTMLLinkElementBinding::Wrap, ) } diff --git a/components/script/dom/htmlmapelement.rs b/components/script/dom/htmlmapelement.rs index 0b6acb3ba31..d3024bb6e95 100644 --- a/components/script/dom/htmlmapelement.rs +++ b/components/script/dom/htmlmapelement.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::HTMLMapElementBinding; use crate::dom::bindings::inheritance::Castable; use crate::dom::bindings::root::DomRoot; use crate::dom::document::Document; @@ -37,7 +36,6 @@ impl HTMLMapElement { Node::reflect_node( Box::new(HTMLMapElement::new_inherited(local_name, prefix, document)), document, - HTMLMapElementBinding::Wrap, ) } diff --git a/components/script/dom/htmlmenuelement.rs b/components/script/dom/htmlmenuelement.rs index b1b9955130c..43e0ff07ed9 100644 --- a/components/script/dom/htmlmenuelement.rs +++ b/components/script/dom/htmlmenuelement.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::HTMLMenuElementBinding; use crate::dom::bindings::codegen::Bindings::HTMLMenuElementBinding::HTMLMenuElementMethods; use crate::dom::bindings::root::DomRoot; use crate::dom::document::Document; @@ -36,7 +35,6 @@ impl HTMLMenuElement { Node::reflect_node( Box::new(HTMLMenuElement::new_inherited(local_name, prefix, document)), document, - HTMLMenuElementBinding::Wrap, ) } } diff --git a/components/script/dom/htmlmetaelement.rs b/components/script/dom/htmlmetaelement.rs index 3f1876c2923..f91e4339f1d 100644 --- a/components/script/dom/htmlmetaelement.rs +++ b/components/script/dom/htmlmetaelement.rs @@ -4,7 +4,6 @@ use crate::dom::attr::Attr; use crate::dom::bindings::cell::DomRefCell; -use crate::dom::bindings::codegen::Bindings::HTMLMetaElementBinding; use crate::dom::bindings::codegen::Bindings::HTMLMetaElementBinding::HTMLMetaElementMethods; use crate::dom::bindings::codegen::Bindings::NodeBinding::NodeMethods; use crate::dom::bindings::inheritance::Castable; @@ -60,7 +59,6 @@ impl HTMLMetaElement { Node::reflect_node( Box::new(HTMLMetaElement::new_inherited(local_name, prefix, document)), document, - HTMLMetaElementBinding::Wrap, ) } diff --git a/components/script/dom/htmlmeterelement.rs b/components/script/dom/htmlmeterelement.rs index 780080a6a65..01f3b0dc94c 100644 --- a/components/script/dom/htmlmeterelement.rs +++ b/components/script/dom/htmlmeterelement.rs @@ -2,9 +2,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::HTMLMeterElementBinding::{ - self, HTMLMeterElementMethods, -}; +use crate::dom::bindings::codegen::Bindings::HTMLMeterElementBinding::HTMLMeterElementMethods; use crate::dom::bindings::inheritance::Castable; use crate::dom::bindings::root::{DomRoot, MutNullableDom}; use crate::dom::document::Document; @@ -43,7 +41,6 @@ impl HTMLMeterElement { local_name, prefix, document, )), document, - HTMLMeterElementBinding::Wrap, ) } } diff --git a/components/script/dom/htmlmodelement.rs b/components/script/dom/htmlmodelement.rs index 0bfbc4ae652..d54156bbbc8 100644 --- a/components/script/dom/htmlmodelement.rs +++ b/components/script/dom/htmlmodelement.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::HTMLModElementBinding; use crate::dom::bindings::root::DomRoot; use crate::dom::document::Document; use crate::dom::htmlelement::HTMLElement; @@ -35,7 +34,6 @@ impl HTMLModElement { Node::reflect_node( Box::new(HTMLModElement::new_inherited(local_name, prefix, document)), document, - HTMLModElementBinding::Wrap, ) } } diff --git a/components/script/dom/htmlobjectelement.rs b/components/script/dom/htmlobjectelement.rs index 002b0aa3913..a218259e8cb 100755 --- a/components/script/dom/htmlobjectelement.rs +++ b/components/script/dom/htmlobjectelement.rs @@ -4,7 +4,6 @@ use crate::dom::attr::Attr; use crate::dom::bindings::cell::DomRefCell; -use crate::dom::bindings::codegen::Bindings::HTMLObjectElementBinding; use crate::dom::bindings::codegen::Bindings::HTMLObjectElementBinding::HTMLObjectElementMethods; use crate::dom::bindings::inheritance::Castable; use crate::dom::bindings::root::{DomRoot, MutNullableDom}; @@ -55,7 +54,6 @@ impl HTMLObjectElement { local_name, prefix, document, )), document, - HTMLObjectElementBinding::Wrap, ) } } diff --git a/components/script/dom/htmlolistelement.rs b/components/script/dom/htmlolistelement.rs index a99120692c1..456625d6447 100644 --- a/components/script/dom/htmlolistelement.rs +++ b/components/script/dom/htmlolistelement.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::HTMLOListElementBinding; use crate::dom::bindings::root::DomRoot; use crate::dom::document::Document; use crate::dom::htmlelement::HTMLElement; @@ -37,7 +36,6 @@ impl HTMLOListElement { local_name, prefix, document, )), document, - HTMLOListElementBinding::Wrap, ) } } diff --git a/components/script/dom/htmloptgroupelement.rs b/components/script/dom/htmloptgroupelement.rs index f8588acc17d..4ee3263c9ac 100644 --- a/components/script/dom/htmloptgroupelement.rs +++ b/components/script/dom/htmloptgroupelement.rs @@ -3,7 +3,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::attr::Attr; -use crate::dom::bindings::codegen::Bindings::HTMLOptGroupElementBinding; use crate::dom::bindings::codegen::Bindings::HTMLOptGroupElementBinding::HTMLOptGroupElementMethods; use crate::dom::bindings::inheritance::Castable; use crate::dom::bindings::root::DomRoot; @@ -49,7 +48,6 @@ impl HTMLOptGroupElement { local_name, prefix, document, )), document, - HTMLOptGroupElementBinding::Wrap, ) } } diff --git a/components/script/dom/htmloptionelement.rs b/components/script/dom/htmloptionelement.rs index ca95400dc80..0ba7eadcf11 100644 --- a/components/script/dom/htmloptionelement.rs +++ b/components/script/dom/htmloptionelement.rs @@ -4,7 +4,6 @@ use crate::dom::attr::Attr; use crate::dom::bindings::codegen::Bindings::CharacterDataBinding::CharacterDataMethods; -use crate::dom::bindings::codegen::Bindings::HTMLOptionElementBinding; use crate::dom::bindings::codegen::Bindings::HTMLOptionElementBinding::HTMLOptionElementMethods; use crate::dom::bindings::codegen::Bindings::HTMLSelectElementBinding::HTMLSelectElementBinding::HTMLSelectElementMethods; use crate::dom::bindings::codegen::Bindings::NodeBinding::NodeMethods; @@ -72,7 +71,6 @@ impl HTMLOptionElement { local_name, prefix, document, )), document, - HTMLOptionElementBinding::Wrap, ) } diff --git a/components/script/dom/htmloptionscollection.rs b/components/script/dom/htmloptionscollection.rs index 8eb0c4e284b..2a79c83d55e 100644 --- a/components/script/dom/htmloptionscollection.rs +++ b/components/script/dom/htmloptionscollection.rs @@ -4,7 +4,6 @@ use crate::dom::bindings::codegen::Bindings::ElementBinding::ElementMethods; use crate::dom::bindings::codegen::Bindings::HTMLCollectionBinding::HTMLCollectionMethods; -use crate::dom::bindings::codegen::Bindings::HTMLOptionsCollectionBinding; use crate::dom::bindings::codegen::Bindings::HTMLOptionsCollectionBinding::HTMLOptionsCollectionMethods; use crate::dom::bindings::codegen::Bindings::HTMLSelectElementBinding::HTMLSelectElementMethods; use crate::dom::bindings::codegen::Bindings::NodeBinding::NodeBinding::NodeMethods; @@ -47,7 +46,6 @@ impl HTMLOptionsCollection { reflect_dom_object( Box::new(HTMLOptionsCollection::new_inherited(select, filter)), window, - HTMLOptionsCollectionBinding::Wrap, ) } diff --git a/components/script/dom/htmloutputelement.rs b/components/script/dom/htmloutputelement.rs index 12d2e415ae1..ac21b2e97a0 100644 --- a/components/script/dom/htmloutputelement.rs +++ b/components/script/dom/htmloutputelement.rs @@ -4,7 +4,6 @@ use crate::dom::attr::Attr; use crate::dom::bindings::cell::DomRefCell; -use crate::dom::bindings::codegen::Bindings::HTMLOutputElementBinding; use crate::dom::bindings::codegen::Bindings::HTMLOutputElementBinding::HTMLOutputElementMethods; use crate::dom::bindings::inheritance::Castable; use crate::dom::bindings::root::{DomRoot, MutNullableDom}; @@ -53,7 +52,6 @@ impl HTMLOutputElement { local_name, prefix, document, )), document, - HTMLOutputElementBinding::Wrap, ) } diff --git a/components/script/dom/htmlparagraphelement.rs b/components/script/dom/htmlparagraphelement.rs index 5a796c29340..101f7058138 100644 --- a/components/script/dom/htmlparagraphelement.rs +++ b/components/script/dom/htmlparagraphelement.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::HTMLParagraphElementBinding; use crate::dom::bindings::root::DomRoot; use crate::dom::document::Document; use crate::dom::htmlelement::HTMLElement; @@ -37,7 +36,6 @@ impl HTMLParagraphElement { local_name, prefix, document, )), document, - HTMLParagraphElementBinding::Wrap, ) } } diff --git a/components/script/dom/htmlparamelement.rs b/components/script/dom/htmlparamelement.rs index de00254124b..fd1a139a84d 100644 --- a/components/script/dom/htmlparamelement.rs +++ b/components/script/dom/htmlparamelement.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::HTMLParamElementBinding; use crate::dom::bindings::root::DomRoot; use crate::dom::document::Document; use crate::dom::htmlelement::HTMLElement; @@ -37,7 +36,6 @@ impl HTMLParamElement { local_name, prefix, document, )), document, - HTMLParamElementBinding::Wrap, ) } } diff --git a/components/script/dom/htmlpictureelement.rs b/components/script/dom/htmlpictureelement.rs index 7d6782a539a..726f7afd5f8 100644 --- a/components/script/dom/htmlpictureelement.rs +++ b/components/script/dom/htmlpictureelement.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::HTMLPictureElementBinding; use crate::dom::bindings::root::DomRoot; use crate::dom::document::Document; use crate::dom::htmlelement::HTMLElement; @@ -37,7 +36,6 @@ impl HTMLPictureElement { local_name, prefix, document, )), document, - HTMLPictureElementBinding::Wrap, ) } } diff --git a/components/script/dom/htmlpreelement.rs b/components/script/dom/htmlpreelement.rs index bd0ca058e22..36e2706e168 100644 --- a/components/script/dom/htmlpreelement.rs +++ b/components/script/dom/htmlpreelement.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::HTMLPreElementBinding; use crate::dom::bindings::root::DomRoot; use crate::dom::document::Document; use crate::dom::htmlelement::HTMLElement; @@ -35,7 +34,6 @@ impl HTMLPreElement { Node::reflect_node( Box::new(HTMLPreElement::new_inherited(local_name, prefix, document)), document, - HTMLPreElementBinding::Wrap, ) } } diff --git a/components/script/dom/htmlprogresselement.rs b/components/script/dom/htmlprogresselement.rs index 0c4789fdc14..dcd2f018734 100644 --- a/components/script/dom/htmlprogresselement.rs +++ b/components/script/dom/htmlprogresselement.rs @@ -2,9 +2,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::HTMLProgressElementBinding::{ - self, HTMLProgressElementMethods, -}; +use crate::dom::bindings::codegen::Bindings::HTMLProgressElementBinding::HTMLProgressElementMethods; use crate::dom::bindings::inheritance::Castable; use crate::dom::bindings::root::{DomRoot, MutNullableDom}; use crate::dom::document::Document; @@ -43,7 +41,6 @@ impl HTMLProgressElement { local_name, prefix, document, )), document, - HTMLProgressElementBinding::Wrap, ) } } diff --git a/components/script/dom/htmlquoteelement.rs b/components/script/dom/htmlquoteelement.rs index 69816ea13e6..4ad38f78338 100644 --- a/components/script/dom/htmlquoteelement.rs +++ b/components/script/dom/htmlquoteelement.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::HTMLQuoteElementBinding; use crate::dom::bindings::root::DomRoot; use crate::dom::document::Document; use crate::dom::htmlelement::HTMLElement; @@ -37,7 +36,6 @@ impl HTMLQuoteElement { local_name, prefix, document, )), document, - HTMLQuoteElementBinding::Wrap, ) } } diff --git a/components/script/dom/htmlscriptelement.rs b/components/script/dom/htmlscriptelement.rs index 66a2cddc777..38279b5222f 100644 --- a/components/script/dom/htmlscriptelement.rs +++ b/components/script/dom/htmlscriptelement.rs @@ -5,7 +5,6 @@ use crate::document_loader::LoadType; use crate::dom::attr::Attr; use crate::dom::bindings::codegen::Bindings::DocumentBinding::DocumentMethods; -use crate::dom::bindings::codegen::Bindings::HTMLScriptElementBinding; use crate::dom::bindings::codegen::Bindings::HTMLScriptElementBinding::HTMLScriptElementMethods; use crate::dom::bindings::codegen::Bindings::NodeBinding::NodeMethods; use crate::dom::bindings::inheritance::Castable; @@ -114,7 +113,6 @@ impl HTMLScriptElement { local_name, prefix, document, creator, )), document, - HTMLScriptElementBinding::Wrap, ) } diff --git a/components/script/dom/htmlselectelement.rs b/components/script/dom/htmlselectelement.rs index 78a26ca4311..97474969ab2 100755 --- a/components/script/dom/htmlselectelement.rs +++ b/components/script/dom/htmlselectelement.rs @@ -7,7 +7,6 @@ use crate::dom::bindings::codegen::Bindings::ElementBinding::ElementMethods; use crate::dom::bindings::codegen::Bindings::HTMLCollectionBinding::HTMLCollectionMethods; use crate::dom::bindings::codegen::Bindings::HTMLOptionElementBinding::HTMLOptionElementMethods; use crate::dom::bindings::codegen::Bindings::HTMLOptionsCollectionBinding::HTMLOptionsCollectionMethods; -use crate::dom::bindings::codegen::Bindings::HTMLSelectElementBinding; use crate::dom::bindings::codegen::Bindings::HTMLSelectElementBinding::HTMLSelectElementMethods; use crate::dom::bindings::codegen::Bindings::NodeBinding::NodeMethods; use crate::dom::bindings::codegen::UnionTypes::HTMLElementOrLong; @@ -97,7 +96,6 @@ impl HTMLSelectElement { local_name, prefix, document, )), document, - HTMLSelectElementBinding::Wrap, ) } diff --git a/components/script/dom/htmlsourceelement.rs b/components/script/dom/htmlsourceelement.rs index f93de93599d..5b581e466b5 100644 --- a/components/script/dom/htmlsourceelement.rs +++ b/components/script/dom/htmlsourceelement.rs @@ -3,7 +3,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::attr::Attr; -use crate::dom::bindings::codegen::Bindings::HTMLSourceElementBinding; use crate::dom::bindings::codegen::Bindings::HTMLSourceElementBinding::HTMLSourceElementMethods; use crate::dom::bindings::codegen::Bindings::NodeBinding::NodeBinding::NodeMethods; use crate::dom::bindings::inheritance::Castable; @@ -47,7 +46,6 @@ impl HTMLSourceElement { local_name, prefix, document, )), document, - HTMLSourceElementBinding::Wrap, ) } diff --git a/components/script/dom/htmlspanelement.rs b/components/script/dom/htmlspanelement.rs index 3cf2846f725..e8a374f5f9b 100644 --- a/components/script/dom/htmlspanelement.rs +++ b/components/script/dom/htmlspanelement.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::HTMLSpanElementBinding; use crate::dom::bindings::root::DomRoot; use crate::dom::document::Document; use crate::dom::htmlelement::HTMLElement; @@ -35,7 +34,6 @@ impl HTMLSpanElement { Node::reflect_node( Box::new(HTMLSpanElement::new_inherited(local_name, prefix, document)), document, - HTMLSpanElementBinding::Wrap, ) } } diff --git a/components/script/dom/htmlstyleelement.rs b/components/script/dom/htmlstyleelement.rs index e483453252a..afa99d8d86b 100644 --- a/components/script/dom/htmlstyleelement.rs +++ b/components/script/dom/htmlstyleelement.rs @@ -3,7 +3,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::cell::DomRefCell; -use crate::dom::bindings::codegen::Bindings::HTMLStyleElementBinding; use crate::dom::bindings::codegen::Bindings::HTMLStyleElementBinding::HTMLStyleElementMethods; use crate::dom::bindings::codegen::Bindings::NodeBinding::NodeMethods; use crate::dom::bindings::inheritance::Castable; @@ -75,7 +74,6 @@ impl HTMLStyleElement { local_name, prefix, document, creator, )), document, - HTMLStyleElementBinding::Wrap, ) } diff --git a/components/script/dom/htmltablecaptionelement.rs b/components/script/dom/htmltablecaptionelement.rs index fe66d4f23d4..e6ff3da673e 100644 --- a/components/script/dom/htmltablecaptionelement.rs +++ b/components/script/dom/htmltablecaptionelement.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::HTMLTableCaptionElementBinding; use crate::dom::bindings::root::DomRoot; use crate::dom::document::Document; use crate::dom::htmlelement::HTMLElement; @@ -37,7 +36,6 @@ impl HTMLTableCaptionElement { local_name, prefix, document, )), document, - HTMLTableCaptionElementBinding::Wrap, ) } } diff --git a/components/script/dom/htmltablecellelement.rs b/components/script/dom/htmltablecellelement.rs index a69565d03f6..95ccde45d81 100644 --- a/components/script/dom/htmltablecellelement.rs +++ b/components/script/dom/htmltablecellelement.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::HTMLTableCellElementBinding; use crate::dom::bindings::codegen::Bindings::HTMLTableCellElementBinding::HTMLTableCellElementMethods; use crate::dom::bindings::codegen::Bindings::NodeBinding::NodeMethods; use crate::dom::bindings::inheritance::Castable; @@ -51,7 +50,6 @@ impl HTMLTableCellElement { local_name, prefix, document, )), document, - HTMLTableCellElementBinding::Wrap, ) } } diff --git a/components/script/dom/htmltablecolelement.rs b/components/script/dom/htmltablecolelement.rs index e4cfa4a5afe..7dcd27d953d 100644 --- a/components/script/dom/htmltablecolelement.rs +++ b/components/script/dom/htmltablecolelement.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::HTMLTableColElementBinding; use crate::dom::bindings::root::DomRoot; use crate::dom::document::Document; use crate::dom::htmlelement::HTMLElement; @@ -37,7 +36,6 @@ impl HTMLTableColElement { local_name, prefix, document, )), document, - HTMLTableColElementBinding::Wrap, ) } } diff --git a/components/script/dom/htmltableelement.rs b/components/script/dom/htmltableelement.rs index bc4724493c4..d25b81cb13f 100644 --- a/components/script/dom/htmltableelement.rs +++ b/components/script/dom/htmltableelement.rs @@ -4,7 +4,6 @@ use crate::dom::attr::Attr; use crate::dom::bindings::codegen::Bindings::HTMLCollectionBinding::HTMLCollectionMethods; -use crate::dom::bindings::codegen::Bindings::HTMLTableElementBinding; use crate::dom::bindings::codegen::Bindings::HTMLTableElementBinding::HTMLTableElementMethods; use crate::dom::bindings::codegen::Bindings::NodeBinding::NodeMethods; use crate::dom::bindings::error::{Error, ErrorResult, Fallible}; @@ -76,7 +75,6 @@ impl HTMLTableElement { local_name, prefix, document, )), document, - HTMLTableElementBinding::Wrap, ) } diff --git a/components/script/dom/htmltablerowelement.rs b/components/script/dom/htmltablerowelement.rs index fbe7ef0cfc8..a99ecea162e 100644 --- a/components/script/dom/htmltablerowelement.rs +++ b/components/script/dom/htmltablerowelement.rs @@ -3,9 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::codegen::Bindings::HTMLTableElementBinding::HTMLTableElementMethods; -use crate::dom::bindings::codegen::Bindings::HTMLTableRowElementBinding::{ - self, HTMLTableRowElementMethods, -}; +use crate::dom::bindings::codegen::Bindings::HTMLTableRowElementBinding::HTMLTableRowElementMethods; use crate::dom::bindings::codegen::Bindings::HTMLTableSectionElementBinding::HTMLTableSectionElementMethods; use crate::dom::bindings::codegen::Bindings::NodeBinding::NodeMethods; use crate::dom::bindings::error::{ErrorResult, Fallible}; @@ -64,7 +62,6 @@ impl HTMLTableRowElement { local_name, prefix, document, )), document, - HTMLTableRowElementBinding::Wrap, ) } diff --git a/components/script/dom/htmltablesectionelement.rs b/components/script/dom/htmltablesectionelement.rs index 6d31e1ad0c6..1410e0ee1a4 100644 --- a/components/script/dom/htmltablesectionelement.rs +++ b/components/script/dom/htmltablesectionelement.rs @@ -2,9 +2,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::HTMLTableSectionElementBinding::{ - self, HTMLTableSectionElementMethods, -}; +use crate::dom::bindings::codegen::Bindings::HTMLTableSectionElementBinding::HTMLTableSectionElementMethods; use crate::dom::bindings::codegen::Bindings::NodeBinding::NodeMethods; use crate::dom::bindings::error::{ErrorResult, Fallible}; use crate::dom::bindings::inheritance::Castable; @@ -49,7 +47,6 @@ impl HTMLTableSectionElement { local_name, prefix, document, )), document, - HTMLTableSectionElementBinding::Wrap, ) } } diff --git a/components/script/dom/htmltemplateelement.rs b/components/script/dom/htmltemplateelement.rs index 8874c94bdb8..87f2063f5e3 100644 --- a/components/script/dom/htmltemplateelement.rs +++ b/components/script/dom/htmltemplateelement.rs @@ -3,7 +3,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::codegen::Bindings::DocumentBinding::DocumentMethods; -use crate::dom::bindings::codegen::Bindings::HTMLTemplateElementBinding; use crate::dom::bindings::codegen::Bindings::HTMLTemplateElementBinding::HTMLTemplateElementMethods; use crate::dom::bindings::codegen::Bindings::NodeBinding::NodeMethods; use crate::dom::bindings::inheritance::Castable; @@ -47,7 +46,6 @@ impl HTMLTemplateElement { local_name, prefix, document, )), document, - HTMLTemplateElementBinding::Wrap, ) } } diff --git a/components/script/dom/htmltextareaelement.rs b/components/script/dom/htmltextareaelement.rs index d077d9eec8f..0708b553442 100755 --- a/components/script/dom/htmltextareaelement.rs +++ b/components/script/dom/htmltextareaelement.rs @@ -6,7 +6,6 @@ use crate::dom::attr::Attr; use crate::dom::bindings::cell::DomRefCell; use crate::dom::bindings::codegen::Bindings::EventBinding::EventMethods; use crate::dom::bindings::codegen::Bindings::HTMLFormElementBinding::SelectionMode; -use crate::dom::bindings::codegen::Bindings::HTMLTextAreaElementBinding; use crate::dom::bindings::codegen::Bindings::HTMLTextAreaElementBinding::HTMLTextAreaElementMethods; use crate::dom::bindings::codegen::Bindings::NodeBinding::NodeMethods; use crate::dom::bindings::error::ErrorResult; @@ -170,7 +169,6 @@ impl HTMLTextAreaElement { local_name, prefix, document, )), document, - HTMLTextAreaElementBinding::Wrap, ) } diff --git a/components/script/dom/htmltimeelement.rs b/components/script/dom/htmltimeelement.rs index 803920c9d5a..2b0974dd76c 100644 --- a/components/script/dom/htmltimeelement.rs +++ b/components/script/dom/htmltimeelement.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::HTMLTimeElementBinding; use crate::dom::bindings::codegen::Bindings::HTMLTimeElementBinding::HTMLTimeElementMethods; use crate::dom::bindings::root::DomRoot; use crate::dom::bindings::str::DOMString; @@ -37,7 +36,6 @@ impl HTMLTimeElement { Node::reflect_node( Box::new(HTMLTimeElement::new_inherited(local_name, prefix, document)), document, - HTMLTimeElementBinding::Wrap, ) } } diff --git a/components/script/dom/htmltitleelement.rs b/components/script/dom/htmltitleelement.rs index a1e543d34e2..7fce947e626 100644 --- a/components/script/dom/htmltitleelement.rs +++ b/components/script/dom/htmltitleelement.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::HTMLTitleElementBinding; use crate::dom::bindings::codegen::Bindings::HTMLTitleElementBinding::HTMLTitleElementMethods; use crate::dom::bindings::codegen::Bindings::NodeBinding::NodeMethods; use crate::dom::bindings::inheritance::Castable; @@ -42,7 +41,6 @@ impl HTMLTitleElement { local_name, prefix, document, )), document, - HTMLTitleElementBinding::Wrap, ) } } diff --git a/components/script/dom/htmltrackelement.rs b/components/script/dom/htmltrackelement.rs index c67701b3894..c068bd88295 100644 --- a/components/script/dom/htmltrackelement.rs +++ b/components/script/dom/htmltrackelement.rs @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::codegen::Bindings::HTMLTrackElementBinding::{ - self, HTMLTrackElementConstants, HTMLTrackElementMethods, + HTMLTrackElementConstants, HTMLTrackElementMethods, }; use crate::dom::bindings::inheritance::Castable; use crate::dom::bindings::root::{Dom, DomRoot}; @@ -66,7 +66,6 @@ impl HTMLTrackElement { local_name, prefix, document, &track, )), document, - HTMLTrackElementBinding::Wrap, ) } } diff --git a/components/script/dom/htmlulistelement.rs b/components/script/dom/htmlulistelement.rs index 891f1a69ceb..aab11124365 100644 --- a/components/script/dom/htmlulistelement.rs +++ b/components/script/dom/htmlulistelement.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::HTMLUListElementBinding; use crate::dom::bindings::root::DomRoot; use crate::dom::document::Document; use crate::dom::htmlelement::HTMLElement; @@ -37,7 +36,6 @@ impl HTMLUListElement { local_name, prefix, document, )), document, - HTMLUListElementBinding::Wrap, ) } } diff --git a/components/script/dom/htmlunknownelement.rs b/components/script/dom/htmlunknownelement.rs index 4213daeceee..27fa932e936 100644 --- a/components/script/dom/htmlunknownelement.rs +++ b/components/script/dom/htmlunknownelement.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::HTMLUnknownElementBinding; use crate::dom::bindings::root::DomRoot; use crate::dom::document::Document; use crate::dom::htmlelement::HTMLElement; @@ -37,7 +36,6 @@ impl HTMLUnknownElement { local_name, prefix, document, )), document, - HTMLUnknownElementBinding::Wrap, ) } } diff --git a/components/script/dom/htmlvideoelement.rs b/components/script/dom/htmlvideoelement.rs index 69f8b9a85e6..f83c05bbe0a 100644 --- a/components/script/dom/htmlvideoelement.rs +++ b/components/script/dom/htmlvideoelement.rs @@ -5,7 +5,6 @@ use crate::document_loader::{LoadBlocker, LoadType}; use crate::dom::attr::Attr; use crate::dom::bindings::cell::DomRefCell; -use crate::dom::bindings::codegen::Bindings::HTMLVideoElementBinding; use crate::dom::bindings::codegen::Bindings::HTMLVideoElementBinding::HTMLVideoElementMethods; use crate::dom::bindings::inheritance::Castable; use crate::dom::bindings::refcounted::Trusted; @@ -90,7 +89,6 @@ impl HTMLVideoElement { local_name, prefix, document, )), document, - HTMLVideoElementBinding::Wrap, ) } diff --git a/components/script/dom/imagedata.rs b/components/script/dom/imagedata.rs index e17c82fffd4..bc605b5f029 100644 --- a/components/script/dom/imagedata.rs +++ b/components/script/dom/imagedata.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::ImageDataBinding; use crate::dom::bindings::codegen::Bindings::ImageDataBinding::ImageDataMethods; use crate::dom::bindings::error::{Error, Fallible}; use crate::dom::bindings::reflector::{reflect_dom_object, Reflector}; @@ -91,11 +90,7 @@ impl ImageData { (*imagedata).data.set(jsobject); - Ok(reflect_dom_object( - imagedata, - global, - ImageDataBinding::Wrap, - )) + Ok(reflect_dom_object(imagedata, global)) } #[allow(unsafe_code)] @@ -121,11 +116,7 @@ impl ImageData { Uint8ClampedArray::create(*cx, CreateWith::Length(len), array.handle_mut()).unwrap(); (*imagedata).data.set(array.get()); - Ok(reflect_dom_object( - imagedata, - global, - ImageDataBinding::Wrap, - )) + Ok(reflect_dom_object(imagedata, global)) } // https://html.spec.whatwg.org/multipage/#pixel-manipulation:dom-imagedata-3 #[allow(unsafe_code, non_snake_case)] diff --git a/components/script/dom/inputevent.rs b/components/script/dom/inputevent.rs index 7ef60327fcb..33a4ed3bbdb 100644 --- a/components/script/dom/inputevent.rs +++ b/components/script/dom/inputevent.rs @@ -37,7 +37,6 @@ impl InputEvent { is_composing: is_composing, }), window, - InputEventBinding::Wrap, ); ev.uievent .InitUIEvent(type_, can_bubble, cancelable, view, detail); diff --git a/components/script/dom/keyboardevent.rs b/components/script/dom/keyboardevent.rs index d2fdda5fcef..12668a6c214 100644 --- a/components/script/dom/keyboardevent.rs +++ b/components/script/dom/keyboardevent.rs @@ -52,11 +52,7 @@ impl KeyboardEvent { } pub fn new_uninitialized(window: &Window) -> DomRoot<KeyboardEvent> { - reflect_dom_object( - Box::new(KeyboardEvent::new_inherited()), - window, - KeyboardEventBinding::Wrap, - ) + reflect_dom_object(Box::new(KeyboardEvent::new_inherited()), window) } pub fn new( diff --git a/components/script/dom/location.rs b/components/script/dom/location.rs index df7f475b2d8..aac4cc30b97 100644 --- a/components/script/dom/location.rs +++ b/components/script/dom/location.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::LocationBinding; use crate::dom::bindings::codegen::Bindings::LocationBinding::LocationMethods; use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowBinding::WindowMethods; use crate::dom::bindings::error::{Error, ErrorResult, Fallible}; @@ -33,11 +32,7 @@ impl Location { } pub fn new(window: &Window) -> DomRoot<Location> { - reflect_dom_object( - Box::new(Location::new_inherited(window)), - window, - LocationBinding::Wrap, - ) + reflect_dom_object(Box::new(Location::new_inherited(window)), window) } /// https://html.spec.whatwg.org/multipage/#location-object-navigate diff --git a/components/script/dom/macros.rs b/components/script/dom/macros.rs index 1abf3056e95..1a2a17d652c 100644 --- a/components/script/dom/macros.rs +++ b/components/script/dom/macros.rs @@ -601,7 +601,6 @@ macro_rules! rooted_vec { /// DOM struct implementation for simple interfaces inheriting from PerformanceEntry. macro_rules! impl_performance_entry_struct( ($binding:ident, $struct:ident, $type:expr) => ( - use crate::dom::bindings::codegen::Bindings::$binding; use crate::dom::bindings::reflector::reflect_dom_object; use crate::dom::bindings::root::DomRoot; use crate::dom::bindings::str::DOMString; @@ -631,7 +630,7 @@ macro_rules! impl_performance_entry_struct( start_time: f64, duration: f64) -> DomRoot<$struct> { let entry = $struct::new_inherited(name, start_time, duration); - reflect_dom_object(Box::new(entry), global, $binding::Wrap) + reflect_dom_object(Box::new(entry), global) } } ); diff --git a/components/script/dom/mediadevices.rs b/components/script/dom/mediadevices.rs index c1d45e36d30..1352cf4b128 100644 --- a/components/script/dom/mediadevices.rs +++ b/components/script/dom/mediadevices.rs @@ -2,8 +2,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ +use crate::dom::bindings::codegen::Bindings::MediaDevicesBinding::MediaDevicesMethods; use crate::dom::bindings::codegen::Bindings::MediaDevicesBinding::MediaStreamConstraints; -use crate::dom::bindings::codegen::Bindings::MediaDevicesBinding::{self, MediaDevicesMethods}; use crate::dom::bindings::codegen::UnionTypes::BooleanOrMediaTrackConstraints; use crate::dom::bindings::codegen::UnionTypes::ClampedUnsignedLongOrConstrainULongRange as ConstrainULong; use crate::dom::bindings::codegen::UnionTypes::DoubleOrConstrainDoubleRange as ConstrainDouble; @@ -35,11 +35,7 @@ impl MediaDevices { } pub fn new(global: &GlobalScope) -> DomRoot<MediaDevices> { - reflect_dom_object( - Box::new(MediaDevices::new_inherited()), - global, - MediaDevicesBinding::Wrap, - ) + reflect_dom_object(Box::new(MediaDevices::new_inherited()), global) } } diff --git a/components/script/dom/mediaelementaudiosourcenode.rs b/components/script/dom/mediaelementaudiosourcenode.rs index f748ac0251d..29737fc3bc0 100644 --- a/components/script/dom/mediaelementaudiosourcenode.rs +++ b/components/script/dom/mediaelementaudiosourcenode.rs @@ -4,7 +4,6 @@ use crate::dom::audiocontext::AudioContext; use crate::dom::audionode::AudioNode; -use crate::dom::bindings::codegen::Bindings::MediaElementAudioSourceNodeBinding; use crate::dom::bindings::codegen::Bindings::MediaElementAudioSourceNodeBinding::MediaElementAudioSourceNodeMethods; use crate::dom::bindings::codegen::Bindings::MediaElementAudioSourceNodeBinding::MediaElementAudioSourceOptions; use crate::dom::bindings::error::Fallible; @@ -56,11 +55,7 @@ impl MediaElementAudioSourceNode { media_element: &HTMLMediaElement, ) -> Fallible<DomRoot<MediaElementAudioSourceNode>> { let node = MediaElementAudioSourceNode::new_inherited(context, media_element)?; - Ok(reflect_dom_object( - Box::new(node), - window, - MediaElementAudioSourceNodeBinding::Wrap, - )) + Ok(reflect_dom_object(Box::new(node), window)) } #[allow(non_snake_case)] diff --git a/components/script/dom/mediaerror.rs b/components/script/dom/mediaerror.rs index 19a87d648da..ace68e43583 100644 --- a/components/script/dom/mediaerror.rs +++ b/components/script/dom/mediaerror.rs @@ -2,7 +2,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::MediaErrorBinding::{self, MediaErrorMethods}; +use crate::dom::bindings::codegen::Bindings::MediaErrorBinding::MediaErrorMethods; use crate::dom::bindings::reflector::{reflect_dom_object, Reflector}; use crate::dom::bindings::root::DomRoot; use crate::dom::bindings::str::DOMString; @@ -24,11 +24,7 @@ impl MediaError { } pub fn new(window: &Window, code: u16) -> DomRoot<MediaError> { - reflect_dom_object( - Box::new(MediaError::new_inherited(code)), - window, - MediaErrorBinding::Wrap, - ) + reflect_dom_object(Box::new(MediaError::new_inherited(code)), window) } } diff --git a/components/script/dom/medialist.rs b/components/script/dom/medialist.rs index e09ed4cdf0a..de0f61d0c00 100644 --- a/components/script/dom/medialist.rs +++ b/components/script/dom/medialist.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::MediaListBinding; use crate::dom::bindings::codegen::Bindings::MediaListBinding::MediaListMethods; use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowBinding::WindowMethods; use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector}; @@ -50,7 +49,6 @@ impl MediaList { reflect_dom_object( Box::new(MediaList::new_inherited(parent_stylesheet, media_queries)), window, - MediaListBinding::Wrap, ) } diff --git a/components/script/dom/mediametadata.rs b/components/script/dom/mediametadata.rs index 53346eba167..3abe0a1a20c 100644 --- a/components/script/dom/mediametadata.rs +++ b/components/script/dom/mediametadata.rs @@ -3,7 +3,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::cell::DomRefCell; -use crate::dom::bindings::codegen::Bindings::MediaMetadataBinding; use crate::dom::bindings::codegen::Bindings::MediaMetadataBinding::MediaMetadataInit; use crate::dom::bindings::codegen::Bindings::MediaMetadataBinding::MediaMetadataMethods; use crate::dom::bindings::error::Fallible; @@ -35,11 +34,7 @@ impl MediaMetadata { } pub fn new(global: &Window, init: &MediaMetadataInit) -> DomRoot<MediaMetadata> { - reflect_dom_object( - Box::new(MediaMetadata::new_inherited(init)), - global, - MediaMetadataBinding::Wrap, - ) + reflect_dom_object(Box::new(MediaMetadata::new_inherited(init)), global) } /// https://w3c.github.io/mediasession/#dom-mediametadata-mediametadata diff --git a/components/script/dom/mediaquerylist.rs b/components/script/dom/mediaquerylist.rs index 45797e0090f..48080f95adf 100644 --- a/components/script/dom/mediaquerylist.rs +++ b/components/script/dom/mediaquerylist.rs @@ -5,7 +5,7 @@ use crate::dom::bindings::codegen::Bindings::EventListenerBinding::EventListener; use crate::dom::bindings::codegen::Bindings::EventTargetBinding::AddEventListenerOptions; use crate::dom::bindings::codegen::Bindings::EventTargetBinding::EventListenerOptions; -use crate::dom::bindings::codegen::Bindings::MediaQueryListBinding::{self, MediaQueryListMethods}; +use crate::dom::bindings::codegen::Bindings::MediaQueryListBinding::MediaQueryListMethods; use crate::dom::bindings::inheritance::Castable; use crate::dom::bindings::reflector::reflect_dom_object; use crate::dom::bindings::root::{Dom, DomRoot}; @@ -45,7 +45,6 @@ impl MediaQueryList { reflect_dom_object( Box::new(MediaQueryList::new_inherited(document, media_query_list)), document.window(), - MediaQueryListBinding::Wrap, ) } } diff --git a/components/script/dom/mediaquerylistevent.rs b/components/script/dom/mediaquerylistevent.rs index 6e05b50998a..c34c3d5116f 100644 --- a/components/script/dom/mediaquerylistevent.rs +++ b/components/script/dom/mediaquerylistevent.rs @@ -3,7 +3,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::codegen::Bindings::EventBinding::EventMethods; -use crate::dom::bindings::codegen::Bindings::MediaQueryListEventBinding; use crate::dom::bindings::codegen::Bindings::MediaQueryListEventBinding::MediaQueryListEventInit; use crate::dom::bindings::codegen::Bindings::MediaQueryListEventBinding::MediaQueryListEventMethods; use crate::dom::bindings::error::Fallible; @@ -37,7 +36,7 @@ impl MediaQueryListEvent { media: media, matches: Cell::new(matches), }); - reflect_dom_object(ev, global, MediaQueryListEventBinding::Wrap) + reflect_dom_object(ev, global) } pub fn new( diff --git a/components/script/dom/mediasession.rs b/components/script/dom/mediasession.rs index 54a6d2d3660..f77efe3f54f 100644 --- a/components/script/dom/mediasession.rs +++ b/components/script/dom/mediasession.rs @@ -7,7 +7,6 @@ use crate::dom::bindings::cell::DomRefCell; use crate::dom::bindings::codegen::Bindings::HTMLMediaElementBinding::HTMLMediaElementMethods; use crate::dom::bindings::codegen::Bindings::MediaMetadataBinding::MediaMetadataInit; use crate::dom::bindings::codegen::Bindings::MediaMetadataBinding::MediaMetadataMethods; -use crate::dom::bindings::codegen::Bindings::MediaSessionBinding; use crate::dom::bindings::codegen::Bindings::MediaSessionBinding::MediaPositionState; use crate::dom::bindings::codegen::Bindings::MediaSessionBinding::MediaSessionAction; use crate::dom::bindings::codegen::Bindings::MediaSessionBinding::MediaSessionActionHandler; @@ -60,11 +59,7 @@ impl MediaSession { } pub fn new(window: &Window) -> DomRoot<MediaSession> { - reflect_dom_object( - Box::new(MediaSession::new_inherited()), - window, - MediaSessionBinding::Wrap, - ) + reflect_dom_object(Box::new(MediaSession::new_inherited()), window) } pub fn register_media_instance(&self, media_instance: &HTMLMediaElement) { diff --git a/components/script/dom/mediastream.rs b/components/script/dom/mediastream.rs index 553177ce964..1c9c7646939 100644 --- a/components/script/dom/mediastream.rs +++ b/components/script/dom/mediastream.rs @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::cell::{DomRefCell, Ref}; -use crate::dom::bindings::codegen::Bindings::MediaStreamBinding::{self, MediaStreamMethods}; +use crate::dom::bindings::codegen::Bindings::MediaStreamBinding::MediaStreamMethods; use crate::dom::bindings::error::Fallible; use crate::dom::bindings::reflector::{reflect_dom_object, DomObject}; use crate::dom::bindings::root::{Dom, DomRoot}; @@ -31,11 +31,7 @@ impl MediaStream { } pub fn new(global: &GlobalScope) -> DomRoot<MediaStream> { - reflect_dom_object( - Box::new(MediaStream::new_inherited()), - global, - MediaStreamBinding::Wrap, - ) + reflect_dom_object(Box::new(MediaStream::new_inherited()), global) } pub fn Constructor(global: &Window) -> Fallible<DomRoot<MediaStream>> { diff --git a/components/script/dom/mediastreamtrack.rs b/components/script/dom/mediastreamtrack.rs index 2cc0bde7442..c5178b3682b 100644 --- a/components/script/dom/mediastreamtrack.rs +++ b/components/script/dom/mediastreamtrack.rs @@ -2,9 +2,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::MediaStreamTrackBinding::{ - self, MediaStreamTrackMethods, -}; +use crate::dom::bindings::codegen::Bindings::MediaStreamTrackBinding::MediaStreamTrackMethods; use crate::dom::bindings::reflector::{reflect_dom_object, DomObject}; use crate::dom::bindings::root::DomRoot; use crate::dom::bindings::str::DOMString; @@ -37,11 +35,7 @@ impl MediaStreamTrack { id: MediaStreamId, ty: MediaStreamType, ) -> DomRoot<MediaStreamTrack> { - reflect_dom_object( - Box::new(MediaStreamTrack::new_inherited(id, ty)), - global, - MediaStreamTrackBinding::Wrap, - ) + reflect_dom_object(Box::new(MediaStreamTrack::new_inherited(id, ty)), global) } pub fn id(&self) -> MediaStreamId { diff --git a/components/script/dom/messagechannel.rs b/components/script/dom/messagechannel.rs index 20a8b19a745..3075dac3088 100644 --- a/components/script/dom/messagechannel.rs +++ b/components/script/dom/messagechannel.rs @@ -2,7 +2,7 @@ * 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/. */ -use crate::dom::bindings::codegen::Bindings::MessageChannelBinding::{MessageChannelMethods, Wrap}; +use crate::dom::bindings::codegen::Bindings::MessageChannelBinding::MessageChannelMethods; use crate::dom::bindings::reflector::{reflect_dom_object, Reflector}; use crate::dom::bindings::root::{Dom, DomRoot}; use crate::dom::globalscope::GlobalScope; @@ -44,7 +44,6 @@ impl MessageChannel { reflect_dom_object( Box::new(MessageChannel::new_inherited(&*port1, &*port2)), incumbent, - Wrap, ) } diff --git a/components/script/dom/messageevent.rs b/components/script/dom/messageevent.rs index 447c2f3ccd1..c00e2bc5dec 100644 --- a/components/script/dom/messageevent.rs +++ b/components/script/dom/messageevent.rs @@ -115,7 +115,7 @@ impl MessageEvent { lastEventId, ports, )); - let ev = reflect_dom_object(ev, global, MessageEventBinding::Wrap); + let ev = reflect_dom_object(ev, global); ev.data.set(data.get()); ev diff --git a/components/script/dom/messageport.rs b/components/script/dom/messageport.rs index ee2f54323a6..fee7c75a9eb 100644 --- a/components/script/dom/messageport.rs +++ b/components/script/dom/messageport.rs @@ -4,7 +4,7 @@ use crate::dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull; use crate::dom::bindings::codegen::Bindings::MessagePortBinding::{ - MessagePortMethods, PostMessageOptions, Wrap, + MessagePortMethods, PostMessageOptions, }; use crate::dom::bindings::conversions::root_from_object; use crate::dom::bindings::error::{Error, ErrorResult}; @@ -51,7 +51,7 @@ impl MessagePort { /// <https://html.spec.whatwg.org/multipage/#create-a-new-messageport-object> pub fn new(owner: &GlobalScope) -> DomRoot<MessagePort> { let port_id = MessagePortId::new(); - reflect_dom_object(Box::new(MessagePort::new_inherited(port_id)), owner, Wrap) + reflect_dom_object(Box::new(MessagePort::new_inherited(port_id)), owner) } /// Create a new port for an incoming transfer-received one. @@ -68,7 +68,6 @@ impl MessagePort { entangled_port: RefCell::new(entangled_port), }), owner, - Wrap, ) } diff --git a/components/script/dom/mimetypearray.rs b/components/script/dom/mimetypearray.rs index 3bfdf4129be..9bbda92e231 100644 --- a/components/script/dom/mimetypearray.rs +++ b/components/script/dom/mimetypearray.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::MimeTypeArrayBinding; use crate::dom::bindings::codegen::Bindings::MimeTypeArrayBinding::MimeTypeArrayMethods; use crate::dom::bindings::reflector::{reflect_dom_object, Reflector}; use crate::dom::bindings::root::DomRoot; @@ -24,11 +23,7 @@ impl MimeTypeArray { } pub fn new(global: &GlobalScope) -> DomRoot<MimeTypeArray> { - reflect_dom_object( - Box::new(MimeTypeArray::new_inherited()), - global, - MimeTypeArrayBinding::Wrap, - ) + reflect_dom_object(Box::new(MimeTypeArray::new_inherited()), global) } } diff --git a/components/script/dom/mouseevent.rs b/components/script/dom/mouseevent.rs index 3975f57ace0..d5fbe6b15e8 100644 --- a/components/script/dom/mouseevent.rs +++ b/components/script/dom/mouseevent.rs @@ -71,11 +71,7 @@ impl MouseEvent { } pub fn new_uninitialized(window: &Window) -> DomRoot<MouseEvent> { - reflect_dom_object( - Box::new(MouseEvent::new_inherited()), - window, - MouseEventBinding::Wrap, - ) + reflect_dom_object(Box::new(MouseEvent::new_inherited()), window) } pub fn new( diff --git a/components/script/dom/mutationobserver.rs b/components/script/dom/mutationobserver.rs index 111fc00f795..e4141af14a6 100644 --- a/components/script/dom/mutationobserver.rs +++ b/components/script/dom/mutationobserver.rs @@ -4,7 +4,6 @@ use crate::dom::bindings::callback::ExceptionHandling; use crate::dom::bindings::cell::DomRefCell; -use crate::dom::bindings::codegen::Bindings::MutationObserverBinding; use crate::dom::bindings::codegen::Bindings::MutationObserverBinding::MutationCallback; use crate::dom::bindings::codegen::Bindings::MutationObserverBinding::MutationObserverBinding::MutationObserverMethods; use crate::dom::bindings::codegen::Bindings::MutationObserverBinding::MutationObserverInit; @@ -67,7 +66,7 @@ pub struct ObserverOptions { impl MutationObserver { fn new(global: &Window, callback: Rc<MutationCallback>) -> DomRoot<MutationObserver> { let boxed_observer = Box::new(MutationObserver::new_inherited(callback)); - reflect_dom_object(boxed_observer, global, MutationObserverBinding::Wrap) + reflect_dom_object(boxed_observer, global) } fn new_inherited(callback: Rc<MutationCallback>) -> MutationObserver { diff --git a/components/script/dom/mutationrecord.rs b/components/script/dom/mutationrecord.rs index 793ef7f52cf..d880f44a8ae 100644 --- a/components/script/dom/mutationrecord.rs +++ b/components/script/dom/mutationrecord.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::MutationRecordBinding::MutationRecordBinding; use crate::dom::bindings::codegen::Bindings::MutationRecordBinding::MutationRecordBinding::MutationRecordMethods; use crate::dom::bindings::reflector::{reflect_dom_object, Reflector}; use crate::dom::bindings::root::{Dom, DomRoot, MutNullableDom}; @@ -45,11 +44,7 @@ impl MutationRecord { None, None, )); - reflect_dom_object( - record, - &*window_from_node(target), - MutationRecordBinding::Wrap, - ) + reflect_dom_object(record, &*window_from_node(target)) } pub fn character_data_mutated( @@ -69,7 +64,6 @@ impl MutationRecord { None, )), &*window_from_node(target), - MutationRecordBinding::Wrap, ) } @@ -98,7 +92,6 @@ impl MutationRecord { prev_sibling, )), &*window, - MutationRecordBinding::Wrap, ) } diff --git a/components/script/dom/namednodemap.rs b/components/script/dom/namednodemap.rs index 3fd9ed3e30c..a7c3e4fef86 100644 --- a/components/script/dom/namednodemap.rs +++ b/components/script/dom/namednodemap.rs @@ -4,7 +4,6 @@ use crate::dom::attr::Attr; use crate::dom::bindings::codegen::Bindings::ElementBinding::ElementMethods; -use crate::dom::bindings::codegen::Bindings::NamedNodeMapBinding; use crate::dom::bindings::codegen::Bindings::NamedNodeMapBinding::NamedNodeMapMethods; use crate::dom::bindings::error::{Error, Fallible}; use crate::dom::bindings::reflector::{reflect_dom_object, Reflector}; @@ -31,11 +30,7 @@ impl NamedNodeMap { } pub fn new(window: &Window, elem: &Element) -> DomRoot<NamedNodeMap> { - reflect_dom_object( - Box::new(NamedNodeMap::new_inherited(elem)), - window, - NamedNodeMapBinding::Wrap, - ) + reflect_dom_object(Box::new(NamedNodeMap::new_inherited(elem)), window) } } diff --git a/components/script/dom/navigationpreloadmanager.rs b/components/script/dom/navigationpreloadmanager.rs index 78104ec7c45..7586f0a040f 100644 --- a/components/script/dom/navigationpreloadmanager.rs +++ b/components/script/dom/navigationpreloadmanager.rs @@ -2,10 +2,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ +use crate::dom::bindings::codegen::Bindings::NavigationPreloadManagerBinding::NavigationPreloadManagerMethods; use crate::dom::bindings::codegen::Bindings::NavigationPreloadManagerBinding::NavigationPreloadState; -use crate::dom::bindings::codegen::Bindings::NavigationPreloadManagerBinding::{ - NavigationPreloadManagerMethods, Wrap, -}; use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector}; use crate::dom::bindings::root::{Dom, DomRoot}; use crate::dom::bindings::str::ByteString; @@ -38,7 +36,7 @@ impl NavigationPreloadManager { registration: &ServiceWorkerRegistration, ) -> DomRoot<NavigationPreloadManager> { let manager = NavigationPreloadManager::new_inherited(&*registration); - reflect_dom_object(Box::new(manager), global, Wrap) + reflect_dom_object(Box::new(manager), global) } } diff --git a/components/script/dom/navigator.rs b/components/script/dom/navigator.rs index b297b02bc69..7d120ba2eba 100644 --- a/components/script/dom/navigator.rs +++ b/components/script/dom/navigator.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::NavigatorBinding; use crate::dom::bindings::codegen::Bindings::NavigatorBinding::NavigatorMethods; use crate::dom::bindings::error::Error; use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector}; @@ -58,11 +57,7 @@ impl Navigator { } pub fn new(window: &Window) -> DomRoot<Navigator> { - reflect_dom_object( - Box::new(Navigator::new_inherited()), - window, - NavigatorBinding::Wrap, - ) + reflect_dom_object(Box::new(Navigator::new_inherited()), window) } } diff --git a/components/script/dom/node.rs b/components/script/dom/node.rs index 05b81a84d5d..2d6b4b581f6 100644 --- a/components/script/dom/node.rs +++ b/components/script/dom/node.rs @@ -26,7 +26,7 @@ use crate::dom::bindings::error::{Error, ErrorResult, Fallible}; use crate::dom::bindings::inheritance::{Castable, CharacterDataTypeId, ElementTypeId}; use crate::dom::bindings::inheritance::{EventTargetTypeId, HTMLElementTypeId, NodeTypeId}; use crate::dom::bindings::inheritance::{SVGElementTypeId, SVGGraphicsElementTypeId, TextTypeId}; -use crate::dom::bindings::reflector::{reflect_dom_object, DomObject}; +use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, DomObjectWrap}; use crate::dom::bindings::root::{Dom, DomRoot, DomSlice, LayoutDom, MutNullableDom}; use crate::dom::bindings::str::{DOMString, USVString}; use crate::dom::bindings::xmlname::namespace_from_domstring; @@ -39,7 +39,6 @@ use crate::dom::documenttype::DocumentType; use crate::dom::element::{CustomElementCreationMode, Element, ElementCreator}; use crate::dom::event::{Event, EventBubbles, EventCancelable}; use crate::dom::eventtarget::EventTarget; -use crate::dom::globalscope::GlobalScope; use crate::dom::htmlbodyelement::HTMLBodyElement; use crate::dom::htmlcanvaselement::{HTMLCanvasElement, LayoutHTMLCanvasElementHelpers}; use crate::dom::htmlcollection::HTMLCollection; @@ -64,7 +63,6 @@ use crate::dom::svgsvgelement::{LayoutSVGSVGElementHelpers, SVGSVGElement}; use crate::dom::text::Text; use crate::dom::virtualmethods::{vtable_for, VirtualMethods}; use crate::dom::window::Window; -use crate::script_runtime::JSContext; use crate::script_thread::ScriptThread; use app_units::Au; use crossbeam_channel::Sender; @@ -1741,16 +1739,12 @@ fn as_uintptr<T>(t: &T) -> uintptr_t { } impl Node { - pub fn reflect_node<N>( - node: Box<N>, - document: &Document, - wrap_fn: unsafe fn(JSContext, &GlobalScope, Box<N>) -> DomRoot<N>, - ) -> DomRoot<N> + pub fn reflect_node<N>(node: Box<N>, document: &Document) -> DomRoot<N> where - N: DerivedFrom<Node> + DomObject, + N: DerivedFrom<Node> + DomObject + DomObjectWrap, { let window = document.window(); - reflect_dom_object(node, window, wrap_fn) + reflect_dom_object(node, window) } pub fn new_inherited(doc: &Document) -> Node { diff --git a/components/script/dom/nodeiterator.rs b/components/script/dom/nodeiterator.rs index 8fb659d6b81..a141785a85d 100644 --- a/components/script/dom/nodeiterator.rs +++ b/components/script/dom/nodeiterator.rs @@ -6,7 +6,6 @@ use crate::dom::bindings::callback::ExceptionHandling::Rethrow; use crate::dom::bindings::codegen::Bindings::NodeBinding::NodeMethods; use crate::dom::bindings::codegen::Bindings::NodeFilterBinding::NodeFilter; use crate::dom::bindings::codegen::Bindings::NodeFilterBinding::NodeFilterConstants; -use crate::dom::bindings::codegen::Bindings::NodeIteratorBinding; use crate::dom::bindings::codegen::Bindings::NodeIteratorBinding::NodeIteratorMethods; use crate::dom::bindings::error::{Error, Fallible}; use crate::dom::bindings::reflector::{reflect_dom_object, Reflector}; @@ -52,7 +51,6 @@ impl NodeIterator { reflect_dom_object( Box::new(NodeIterator::new_inherited(root_node, what_to_show, filter)), document.window(), - NodeIteratorBinding::Wrap, ) } diff --git a/components/script/dom/nodelist.rs b/components/script/dom/nodelist.rs index 5218d1b3026..d7ec1808323 100644 --- a/components/script/dom/nodelist.rs +++ b/components/script/dom/nodelist.rs @@ -3,7 +3,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::codegen::Bindings::NodeBinding::NodeMethods; -use crate::dom::bindings::codegen::Bindings::NodeListBinding; use crate::dom::bindings::codegen::Bindings::NodeListBinding::NodeListMethods; use crate::dom::bindings::reflector::{reflect_dom_object, Reflector}; use crate::dom::bindings::root::{Dom, DomRoot, MutNullableDom}; @@ -45,11 +44,7 @@ impl NodeList { #[allow(unrooted_must_root)] pub fn new(window: &Window, list_type: NodeListType) -> DomRoot<NodeList> { - reflect_dom_object( - Box::new(NodeList::new_inherited(list_type)), - window, - NodeListBinding::Wrap, - ) + reflect_dom_object(Box::new(NodeList::new_inherited(list_type)), window) } pub fn new_simple_list<T>(window: &Window, iter: T) -> DomRoot<NodeList> diff --git a/components/script/dom/offlineaudiocompletionevent.rs b/components/script/dom/offlineaudiocompletionevent.rs index f093f583608..5162f4e9671 100644 --- a/components/script/dom/offlineaudiocompletionevent.rs +++ b/components/script/dom/offlineaudiocompletionevent.rs @@ -4,7 +4,6 @@ use crate::dom::audiobuffer::AudioBuffer; use crate::dom::bindings::codegen::Bindings::EventBinding::EventMethods; -use crate::dom::bindings::codegen::Bindings::OfflineAudioCompletionEventBinding; use crate::dom::bindings::codegen::Bindings::OfflineAudioCompletionEventBinding::OfflineAudioCompletionEventInit; use crate::dom::bindings::codegen::Bindings::OfflineAudioCompletionEventBinding::OfflineAudioCompletionEventMethods; use crate::dom::bindings::error::Fallible; @@ -39,7 +38,7 @@ impl OfflineAudioCompletionEvent { rendered_buffer: &AudioBuffer, ) -> DomRoot<OfflineAudioCompletionEvent> { let event = Box::new(OfflineAudioCompletionEvent::new_inherited(rendered_buffer)); - let ev = reflect_dom_object(event, window, OfflineAudioCompletionEventBinding::Wrap); + let ev = reflect_dom_object(event, window); { let event = ev.upcast::<Event>(); event.init_event(type_, bool::from(bubbles), bool::from(cancelable)); diff --git a/components/script/dom/offlineaudiocontext.rs b/components/script/dom/offlineaudiocontext.rs index 7b8d3f52111..bbdf9e1a79f 100644 --- a/components/script/dom/offlineaudiocontext.rs +++ b/components/script/dom/offlineaudiocontext.rs @@ -7,7 +7,6 @@ use crate::dom::audionode::MAX_CHANNEL_COUNT; use crate::dom::baseaudiocontext::{BaseAudioContext, BaseAudioContextOptions}; use crate::dom::bindings::cell::DomRefCell; use crate::dom::bindings::codegen::Bindings::BaseAudioContextBinding::BaseAudioContextBinding::BaseAudioContextMethods; -use crate::dom::bindings::codegen::Bindings::OfflineAudioContextBinding; use crate::dom::bindings::codegen::Bindings::OfflineAudioContextBinding::OfflineAudioContextMethods; use crate::dom::bindings::codegen::Bindings::OfflineAudioContextBinding::OfflineAudioContextOptions; use crate::dom::bindings::error::{Error, Fallible}; @@ -86,11 +85,7 @@ impl OfflineAudioContext { let pipeline_id = window.pipeline_id(); let context = OfflineAudioContext::new_inherited(channel_count, length, sample_rate, pipeline_id); - Ok(reflect_dom_object( - Box::new(context), - window, - OfflineAudioContextBinding::Wrap, - )) + Ok(reflect_dom_object(Box::new(context), window)) } pub fn Constructor( diff --git a/components/script/dom/offscreencanvas.rs b/components/script/dom/offscreencanvas.rs index 130d2b7c49a..b381c245cfa 100644 --- a/components/script/dom/offscreencanvas.rs +++ b/components/script/dom/offscreencanvas.rs @@ -4,7 +4,7 @@ use crate::dom::bindings::cell::{ref_filter_map, DomRefCell, Ref}; use crate::dom::bindings::codegen::Bindings::OffscreenCanvasBinding::{ - OffscreenCanvasMethods, OffscreenRenderingContext, Wrap as OffscreenCanvasWrap, + OffscreenCanvasMethods, OffscreenRenderingContext, }; use crate::dom::bindings::error::Fallible; use crate::dom::bindings::reflector::reflect_dom_object; @@ -65,7 +65,6 @@ impl OffscreenCanvas { reflect_dom_object( Box::new(OffscreenCanvas::new_inherited(width, height, placeholder)), global, - OffscreenCanvasWrap, ) } diff --git a/components/script/dom/offscreencanvasrenderingcontext2d.rs b/components/script/dom/offscreencanvasrenderingcontext2d.rs index 228a4dd44d7..5646cf112d9 100644 --- a/components/script/dom/offscreencanvasrenderingcontext2d.rs +++ b/components/script/dom/offscreencanvasrenderingcontext2d.rs @@ -8,7 +8,6 @@ use crate::dom::bindings::codegen::Bindings::CanvasRenderingContext2DBinding::Ca use crate::dom::bindings::codegen::Bindings::CanvasRenderingContext2DBinding::CanvasImageSource; use crate::dom::bindings::codegen::Bindings::CanvasRenderingContext2DBinding::CanvasLineCap; use crate::dom::bindings::codegen::Bindings::CanvasRenderingContext2DBinding::CanvasLineJoin; -use crate::dom::bindings::codegen::Bindings::OffscreenCanvasRenderingContext2DBinding; use crate::dom::bindings::codegen::Bindings::OffscreenCanvasRenderingContext2DBinding::OffscreenCanvasRenderingContext2DMethods; use crate::dom::bindings::codegen::UnionTypes::StringOrCanvasGradientOrCanvasPattern; use crate::dom::bindings::error::ErrorResult; @@ -60,11 +59,7 @@ impl OffscreenCanvasRenderingContext2D { let boxed = Box::new(OffscreenCanvasRenderingContext2D::new_inherited( global, canvas, htmlcanvas, )); - reflect_dom_object( - boxed, - global, - OffscreenCanvasRenderingContext2DBinding::Wrap, - ) + reflect_dom_object(boxed, global) } /* pub fn get_canvas_state(&self) -> Ref<CanvasState> { diff --git a/components/script/dom/oscillatornode.rs b/components/script/dom/oscillatornode.rs index 2a5f6615db6..948603ca6e2 100644 --- a/components/script/dom/oscillatornode.rs +++ b/components/script/dom/oscillatornode.rs @@ -11,7 +11,7 @@ use crate::dom::bindings::codegen::Bindings::AudioNodeBinding::{ use crate::dom::bindings::codegen::Bindings::AudioParamBinding::AutomationRate; use crate::dom::bindings::codegen::Bindings::OscillatorNodeBinding::OscillatorNodeMethods; use crate::dom::bindings::codegen::Bindings::OscillatorNodeBinding::{ - self, OscillatorOptions, OscillatorType, + OscillatorOptions, OscillatorType, }; use crate::dom::bindings::error::{Error, ErrorResult, Fallible}; use crate::dom::bindings::reflector::reflect_dom_object; @@ -88,11 +88,7 @@ impl OscillatorNode { options: &OscillatorOptions, ) -> Fallible<DomRoot<OscillatorNode>> { let node = OscillatorNode::new_inherited(window, context, options)?; - Ok(reflect_dom_object( - Box::new(node), - window, - OscillatorNodeBinding::Wrap, - )) + Ok(reflect_dom_object(Box::new(node), window)) } #[allow(non_snake_case)] diff --git a/components/script/dom/pagetransitionevent.rs b/components/script/dom/pagetransitionevent.rs index 41be9fd2488..5d11fb62540 100644 --- a/components/script/dom/pagetransitionevent.rs +++ b/components/script/dom/pagetransitionevent.rs @@ -32,11 +32,7 @@ impl PageTransitionEvent { } pub fn new_uninitialized(window: &Window) -> DomRoot<PageTransitionEvent> { - reflect_dom_object( - Box::new(PageTransitionEvent::new_inherited()), - window, - PageTransitionEventBinding::Wrap, - ) + reflect_dom_object(Box::new(PageTransitionEvent::new_inherited()), window) } pub fn new( diff --git a/components/script/dom/paintrenderingcontext2d.rs b/components/script/dom/paintrenderingcontext2d.rs index 7b44bbc4a71..3bcda664280 100644 --- a/components/script/dom/paintrenderingcontext2d.rs +++ b/components/script/dom/paintrenderingcontext2d.rs @@ -7,7 +7,6 @@ use crate::dom::bindings::codegen::Bindings::CanvasRenderingContext2DBinding::Ca use crate::dom::bindings::codegen::Bindings::CanvasRenderingContext2DBinding::CanvasLineCap; use crate::dom::bindings::codegen::Bindings::CanvasRenderingContext2DBinding::CanvasLineJoin; use crate::dom::bindings::codegen::Bindings::CanvasRenderingContext2DBinding::CanvasRenderingContext2DMethods; -use crate::dom::bindings::codegen::Bindings::PaintRenderingContext2DBinding; use crate::dom::bindings::codegen::Bindings::PaintRenderingContext2DBinding::PaintRenderingContext2DMethods; use crate::dom::bindings::codegen::UnionTypes::StringOrCanvasGradientOrCanvasPattern; use crate::dom::bindings::error::ErrorResult; @@ -53,7 +52,6 @@ impl PaintRenderingContext2D { reflect_dom_object( Box::new(PaintRenderingContext2D::new_inherited(global)), global, - PaintRenderingContext2DBinding::Wrap, ) } diff --git a/components/script/dom/paintsize.rs b/components/script/dom/paintsize.rs index 7f7fa61346b..5f6d0260096 100644 --- a/components/script/dom/paintsize.rs +++ b/components/script/dom/paintsize.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::PaintSizeBinding; use crate::dom::bindings::codegen::Bindings::PaintSizeBinding::PaintSizeMethods; use crate::dom::bindings::num::Finite; use crate::dom::bindings::reflector::reflect_dom_object; @@ -33,11 +32,7 @@ impl PaintSize { global: &PaintWorkletGlobalScope, size: Size2D<f32, CSSPixel>, ) -> DomRoot<PaintSize> { - reflect_dom_object( - Box::new(PaintSize::new_inherited(size)), - global, - PaintSizeBinding::Wrap, - ) + reflect_dom_object(Box::new(PaintSize::new_inherited(size)), global) } } diff --git a/components/script/dom/pannernode.rs b/components/script/dom/pannernode.rs index ae36a9cc701..98b9226287b 100644 --- a/components/script/dom/pannernode.rs +++ b/components/script/dom/pannernode.rs @@ -12,10 +12,10 @@ use crate::dom::bindings::codegen::Bindings::AudioParamBinding::{ AudioParamMethods, AutomationRate, }; use crate::dom::bindings::codegen::Bindings::PannerNodeBinding::{ - self, PannerNodeMethods, PannerOptions, + DistanceModelType, PanningModelType, }; use crate::dom::bindings::codegen::Bindings::PannerNodeBinding::{ - DistanceModelType, PanningModelType, + PannerNodeMethods, PannerOptions, }; use crate::dom::bindings::error::{Error, Fallible}; use crate::dom::bindings::inheritance::Castable; @@ -177,11 +177,7 @@ impl PannerNode { options: &PannerOptions, ) -> Fallible<DomRoot<PannerNode>> { let node = PannerNode::new_inherited(window, context, options)?; - Ok(reflect_dom_object( - Box::new(node), - window, - PannerNodeBinding::Wrap, - )) + Ok(reflect_dom_object(Box::new(node), window)) } #[allow(non_snake_case)] diff --git a/components/script/dom/performance.rs b/components/script/dom/performance.rs index 9de98852df7..c707160f66a 100644 --- a/components/script/dom/performance.rs +++ b/components/script/dom/performance.rs @@ -3,7 +3,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::cell::DomRefCell; -use crate::dom::bindings::codegen::Bindings::PerformanceBinding; use crate::dom::bindings::codegen::Bindings::PerformanceBinding::PerformanceEntryList as DOMPerformanceEntryList; use crate::dom::bindings::codegen::Bindings::PerformanceBinding::{ DOMHighResTimeStamp, PerformanceMethods, @@ -170,7 +169,6 @@ impl Performance { reflect_dom_object( Box::new(Performance::new_inherited(navigation_start_precise)), global, - PerformanceBinding::Wrap, ) } diff --git a/components/script/dom/performanceentry.rs b/components/script/dom/performanceentry.rs index e41cbc81667..8197deb8976 100644 --- a/components/script/dom/performanceentry.rs +++ b/components/script/dom/performanceentry.rs @@ -3,7 +3,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::codegen::Bindings::PerformanceBinding::DOMHighResTimeStamp; -use crate::dom::bindings::codegen::Bindings::PerformanceEntryBinding; use crate::dom::bindings::codegen::Bindings::PerformanceEntryBinding::PerformanceEntryMethods; use crate::dom::bindings::reflector::{reflect_dom_object, Reflector}; use crate::dom::bindings::root::DomRoot; @@ -46,7 +45,7 @@ impl PerformanceEntry { duration: f64, ) -> DomRoot<PerformanceEntry> { let entry = PerformanceEntry::new_inherited(name, entry_type, start_time, duration); - reflect_dom_object(Box::new(entry), global, PerformanceEntryBinding::Wrap) + reflect_dom_object(Box::new(entry), global) } pub fn entry_type(&self) -> &DOMString { diff --git a/components/script/dom/performancenavigation.rs b/components/script/dom/performancenavigation.rs index db93441480f..f52250b815c 100644 --- a/components/script/dom/performancenavigation.rs +++ b/components/script/dom/performancenavigation.rs @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::codegen::Bindings::PerformanceNavigationBinding::{ - self, PerformanceNavigationConstants, PerformanceNavigationMethods, + PerformanceNavigationConstants, PerformanceNavigationMethods, }; use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowBinding::WindowMethods; use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector}; @@ -24,11 +24,7 @@ impl PerformanceNavigation { } pub fn new(global: &GlobalScope) -> DomRoot<PerformanceNavigation> { - reflect_dom_object( - Box::new(PerformanceNavigation::new_inherited()), - global, - PerformanceNavigationBinding::Wrap, - ) + reflect_dom_object(Box::new(PerformanceNavigation::new_inherited()), global) } } diff --git a/components/script/dom/performancenavigationtiming.rs b/components/script/dom/performancenavigationtiming.rs index e10fa831070..5562427f1c9 100644 --- a/components/script/dom/performancenavigationtiming.rs +++ b/components/script/dom/performancenavigationtiming.rs @@ -3,10 +3,8 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::codegen::Bindings::PerformanceBinding::DOMHighResTimeStamp; +use crate::dom::bindings::codegen::Bindings::PerformanceNavigationTimingBinding::NavigationType; use crate::dom::bindings::codegen::Bindings::PerformanceNavigationTimingBinding::PerformanceNavigationTimingMethods; -use crate::dom::bindings::codegen::Bindings::PerformanceNavigationTimingBinding::{ - self, NavigationType, -}; use crate::dom::bindings::num::Finite; use crate::dom::bindings::reflector::reflect_dom_object; use crate::dom::bindings::root::{Dom, DomRoot}; @@ -61,7 +59,6 @@ impl PerformanceNavigationTiming { document, )), global, - PerformanceNavigationTimingBinding::Wrap, ) } } diff --git a/components/script/dom/performanceobserver.rs b/components/script/dom/performanceobserver.rs index 2b52c86e4f2..8d689a35785 100644 --- a/components/script/dom/performanceobserver.rs +++ b/components/script/dom/performanceobserver.rs @@ -5,7 +5,6 @@ use crate::dom::bindings::callback::ExceptionHandling; use crate::dom::bindings::cell::DomRefCell; use crate::dom::bindings::codegen::Bindings::PerformanceBinding::PerformanceEntryList as DOMPerformanceEntryList; -use crate::dom::bindings::codegen::Bindings::PerformanceObserverBinding; use crate::dom::bindings::codegen::Bindings::PerformanceObserverBinding::PerformanceObserverCallback; use crate::dom::bindings::codegen::Bindings::PerformanceObserverBinding::PerformanceObserverInit; use crate::dom::bindings::codegen::Bindings::PerformanceObserverBinding::PerformanceObserverMethods; @@ -71,7 +70,7 @@ impl PerformanceObserver { entries: DOMPerformanceEntryList, ) -> DomRoot<PerformanceObserver> { let observer = PerformanceObserver::new_inherited(callback, DomRefCell::new(entries)); - reflect_dom_object(Box::new(observer), global, PerformanceObserverBinding::Wrap) + reflect_dom_object(Box::new(observer), global) } #[allow(non_snake_case)] diff --git a/components/script/dom/performanceobserverentrylist.rs b/components/script/dom/performanceobserverentrylist.rs index e33b6b1b26e..f96e063153e 100644 --- a/components/script/dom/performanceobserverentrylist.rs +++ b/components/script/dom/performanceobserverentrylist.rs @@ -3,7 +3,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::cell::DomRefCell; -use crate::dom::bindings::codegen::Bindings::PerformanceObserverEntryListBinding; use crate::dom::bindings::codegen::Bindings::PerformanceObserverEntryListBinding::PerformanceObserverEntryListMethods; use crate::dom::bindings::reflector::{reflect_dom_object, Reflector}; use crate::dom::bindings::root::DomRoot; @@ -33,11 +32,7 @@ impl PerformanceObserverEntryList { entries: PerformanceEntryList, ) -> DomRoot<PerformanceObserverEntryList> { let observer_entry_list = PerformanceObserverEntryList::new_inherited(entries); - reflect_dom_object( - Box::new(observer_entry_list), - global, - PerformanceObserverEntryListBinding::Wrap, - ) + reflect_dom_object(Box::new(observer_entry_list), global) } } diff --git a/components/script/dom/performancepainttiming.rs b/components/script/dom/performancepainttiming.rs index 7ee496917ae..2dd3c27f1f1 100644 --- a/components/script/dom/performancepainttiming.rs +++ b/components/script/dom/performancepainttiming.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::PerformancePaintTimingBinding; use crate::dom::bindings::reflector::reflect_dom_object; use crate::dom::bindings::root::DomRoot; use crate::dom::bindings::str::DOMString; @@ -46,6 +45,6 @@ impl PerformancePaintTiming { start_time: u64, ) -> DomRoot<PerformancePaintTiming> { let entry = PerformancePaintTiming::new_inherited(metric_type, start_time); - reflect_dom_object(Box::new(entry), global, PerformancePaintTimingBinding::Wrap) + reflect_dom_object(Box::new(entry), global) } } diff --git a/components/script/dom/performanceresourcetiming.rs b/components/script/dom/performanceresourcetiming.rs index 574016adc88..c98b5140f60 100644 --- a/components/script/dom/performanceresourcetiming.rs +++ b/components/script/dom/performanceresourcetiming.rs @@ -3,9 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::codegen::Bindings::PerformanceBinding::DOMHighResTimeStamp; -use crate::dom::bindings::codegen::Bindings::PerformanceResourceTimingBinding::{ - self, PerformanceResourceTimingMethods, -}; +use crate::dom::bindings::codegen::Bindings::PerformanceResourceTimingBinding::PerformanceResourceTimingMethods; use crate::dom::bindings::reflector::reflect_dom_object; use crate::dom::bindings::root::DomRoot; use crate::dom::bindings::str::DOMString; @@ -152,7 +150,6 @@ impl PerformanceResourceTiming { resource_timing, )), global, - PerformanceResourceTimingBinding::Wrap, ) } } diff --git a/components/script/dom/performancetiming.rs b/components/script/dom/performancetiming.rs index 1ee366d8a98..9f8a3a8b5f2 100644 --- a/components/script/dom/performancetiming.rs +++ b/components/script/dom/performancetiming.rs @@ -44,7 +44,7 @@ impl PerformanceTiming { navigation_start_precise, &window.Document(), ); - reflect_dom_object(Box::new(timing), window, PerformanceTimingBinding::Wrap) + reflect_dom_object(Box::new(timing), window) } } diff --git a/components/script/dom/permissions.rs b/components/script/dom/permissions.rs index 37887f60773..b4e6bf8f5de 100644 --- a/components/script/dom/permissions.rs +++ b/components/script/dom/permissions.rs @@ -7,7 +7,7 @@ use crate::dom::bindings::codegen::Bindings::PermissionStatusBinding::Permission use crate::dom::bindings::codegen::Bindings::PermissionStatusBinding::{ PermissionName, PermissionState, }; -use crate::dom::bindings::codegen::Bindings::PermissionsBinding::{self, PermissionsMethods}; +use crate::dom::bindings::codegen::Bindings::PermissionsBinding::PermissionsMethods; use crate::dom::bindings::error::Error; use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector}; use crate::dom::bindings::root::DomRoot; @@ -69,11 +69,7 @@ impl Permissions { } pub fn new(global: &GlobalScope) -> DomRoot<Permissions> { - reflect_dom_object( - Box::new(Permissions::new_inherited()), - global, - PermissionsBinding::Wrap, - ) + reflect_dom_object(Box::new(Permissions::new_inherited()), global) } // https://w3c.github.io/permissions/#dom-permissions-query diff --git a/components/script/dom/permissionstatus.rs b/components/script/dom/permissionstatus.rs index 80a6e347bd2..8f8b96f23de 100644 --- a/components/script/dom/permissionstatus.rs +++ b/components/script/dom/permissionstatus.rs @@ -5,7 +5,7 @@ use crate::dom::bindings::codegen::Bindings::PermissionStatusBinding::PermissionState; use crate::dom::bindings::codegen::Bindings::PermissionStatusBinding::PermissionStatusMethods; use crate::dom::bindings::codegen::Bindings::PermissionStatusBinding::{ - self, PermissionDescriptor, PermissionName, + PermissionDescriptor, PermissionName, }; use crate::dom::bindings::reflector::reflect_dom_object; use crate::dom::bindings::root::DomRoot; @@ -36,7 +36,6 @@ impl PermissionStatus { reflect_dom_object( Box::new(PermissionStatus::new_inherited(query.name)), global, - PermissionStatusBinding::Wrap, ) } diff --git a/components/script/dom/pluginarray.rs b/components/script/dom/pluginarray.rs index 46605b09d04..b063d55fb02 100644 --- a/components/script/dom/pluginarray.rs +++ b/components/script/dom/pluginarray.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::PluginArrayBinding; use crate::dom::bindings::codegen::Bindings::PluginArrayBinding::PluginArrayMethods; use crate::dom::bindings::reflector::{reflect_dom_object, Reflector}; use crate::dom::bindings::root::DomRoot; @@ -24,11 +23,7 @@ impl PluginArray { } pub fn new(global: &GlobalScope) -> DomRoot<PluginArray> { - reflect_dom_object( - Box::new(PluginArray::new_inherited()), - global, - PluginArrayBinding::Wrap, - ) + reflect_dom_object(Box::new(PluginArray::new_inherited()), global) } } diff --git a/components/script/dom/popstateevent.rs b/components/script/dom/popstateevent.rs index 9c4ba63cb93..851064df389 100644 --- a/components/script/dom/popstateevent.rs +++ b/components/script/dom/popstateevent.rs @@ -38,11 +38,7 @@ impl PopStateEvent { } pub fn new_uninitialized(window: &Window) -> DomRoot<PopStateEvent> { - reflect_dom_object( - Box::new(PopStateEvent::new_inherited()), - window, - PopStateEventBinding::Wrap, - ) + reflect_dom_object(Box::new(PopStateEvent::new_inherited()), window) } pub fn new( diff --git a/components/script/dom/processinginstruction.rs b/components/script/dom/processinginstruction.rs index 3b01f71c0e0..9edbf1a0a29 100644 --- a/components/script/dom/processinginstruction.rs +++ b/components/script/dom/processinginstruction.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::ProcessingInstructionBinding; use crate::dom::bindings::codegen::Bindings::ProcessingInstructionBinding::ProcessingInstructionMethods; use crate::dom::bindings::root::DomRoot; use crate::dom::bindings::str::DOMString; @@ -38,7 +37,6 @@ impl ProcessingInstruction { Node::reflect_node( Box::new(ProcessingInstruction::new_inherited(target, data, document)), document, - ProcessingInstructionBinding::Wrap, ) } } diff --git a/components/script/dom/progressevent.rs b/components/script/dom/progressevent.rs index 325e247bc52..32e6917a15d 100644 --- a/components/script/dom/progressevent.rs +++ b/components/script/dom/progressevent.rs @@ -48,7 +48,6 @@ impl ProgressEvent { total, )), global, - ProgressEventBinding::Wrap, ); { let event = ev.upcast::<Event>(); diff --git a/components/script/dom/promisenativehandler.rs b/components/script/dom/promisenativehandler.rs index 147aad57fd5..c7e0ded5b4d 100644 --- a/components/script/dom/promisenativehandler.rs +++ b/components/script/dom/promisenativehandler.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::PromiseNativeHandlerBinding; use crate::dom::bindings::reflector::{reflect_dom_object, Reflector}; use crate::dom::bindings::root::DomRoot; use crate::dom::bindings::trace::JSTraceable; @@ -36,7 +35,6 @@ impl PromiseNativeHandler { reject: reject, }), global, - PromiseNativeHandlerBinding::Wrap, ) } diff --git a/components/script/dom/promiserejectionevent.rs b/components/script/dom/promiserejectionevent.rs index 8e1e62bc18d..92d67725ca0 100644 --- a/components/script/dom/promiserejectionevent.rs +++ b/components/script/dom/promiserejectionevent.rs @@ -53,7 +53,6 @@ impl PromiseRejectionEvent { let ev = reflect_dom_object( Box::new(PromiseRejectionEvent::new_inherited(promise)), global, - PromiseRejectionEventBinding::Wrap, ); { diff --git a/components/script/dom/radionodelist.rs b/components/script/dom/radionodelist.rs index 56069375b27..958652da9f7 100644 --- a/components/script/dom/radionodelist.rs +++ b/components/script/dom/radionodelist.rs @@ -4,7 +4,6 @@ use crate::dom::bindings::codegen::Bindings::HTMLInputElementBinding::HTMLInputElementMethods; use crate::dom::bindings::codegen::Bindings::NodeListBinding::NodeListMethods; -use crate::dom::bindings::codegen::Bindings::RadioNodeListBinding; use crate::dom::bindings::codegen::Bindings::RadioNodeListBinding::RadioNodeListMethods; use crate::dom::bindings::inheritance::Castable; use crate::dom::bindings::reflector::reflect_dom_object; @@ -33,11 +32,7 @@ impl RadioNodeList { #[allow(unrooted_must_root)] pub fn new(window: &Window, list_type: NodeListType) -> DomRoot<RadioNodeList> { - reflect_dom_object( - Box::new(RadioNodeList::new_inherited(list_type)), - window, - RadioNodeListBinding::Wrap, - ) + reflect_dom_object(Box::new(RadioNodeList::new_inherited(list_type)), window) } pub fn new_controls_except_image_inputs( diff --git a/components/script/dom/range.rs b/components/script/dom/range.rs index 1aabc0fc540..0b1c8f16de1 100644 --- a/components/script/dom/range.rs +++ b/components/script/dom/range.rs @@ -7,8 +7,8 @@ use crate::dom::bindings::codegen::Bindings::CharacterDataBinding::CharacterData use crate::dom::bindings::codegen::Bindings::NodeBinding::NodeConstants; use crate::dom::bindings::codegen::Bindings::NodeBinding::NodeMethods; use crate::dom::bindings::codegen::Bindings::NodeListBinding::NodeListMethods; +use crate::dom::bindings::codegen::Bindings::RangeBinding::RangeConstants; use crate::dom::bindings::codegen::Bindings::RangeBinding::RangeMethods; -use crate::dom::bindings::codegen::Bindings::RangeBinding::{self, RangeConstants}; use crate::dom::bindings::codegen::Bindings::TextBinding::TextMethods; use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowMethods; use crate::dom::bindings::error::{Error, ErrorResult, Fallible}; @@ -86,7 +86,6 @@ impl Range { end_offset, )), document.window(), - RangeBinding::Wrap, ); start_container.ranges().push(WeakRef::new(&range)); if start_container != end_container { diff --git a/components/script/dom/request.rs b/components/script/dom/request.rs index 55e26ba1e67..6dbe810b81a 100644 --- a/components/script/dom/request.rs +++ b/components/script/dom/request.rs @@ -5,7 +5,6 @@ use crate::body::{consume_body, BodyOperations, BodyType}; use crate::dom::bindings::cell::{DomRefCell, Ref}; use crate::dom::bindings::codegen::Bindings::HeadersBinding::{HeadersInit, HeadersMethods}; -use crate::dom::bindings::codegen::Bindings::RequestBinding; use crate::dom::bindings::codegen::Bindings::RequestBinding::ReferrerPolicy; use crate::dom::bindings::codegen::Bindings::RequestBinding::RequestCache; use crate::dom::bindings::codegen::Bindings::RequestBinding::RequestCredentials; @@ -66,11 +65,7 @@ impl Request { } pub fn new(global: &GlobalScope, url: ServoUrl) -> DomRoot<Request> { - reflect_dom_object( - Box::new(Request::new_inherited(global, url)), - global, - RequestBinding::Wrap, - ) + reflect_dom_object(Box::new(Request::new_inherited(global, url)), global) } // https://fetch.spec.whatwg.org/#dom-request diff --git a/components/script/dom/response.rs b/components/script/dom/response.rs index f329b16c3c5..636acc05ff5 100644 --- a/components/script/dom/response.rs +++ b/components/script/dom/response.rs @@ -74,11 +74,7 @@ impl Response { // https://fetch.spec.whatwg.org/#dom-response pub fn new(global: &GlobalScope) -> DomRoot<Response> { - reflect_dom_object( - Box::new(Response::new_inherited()), - global, - ResponseBinding::Wrap, - ) + reflect_dom_object(Box::new(Response::new_inherited()), global) } pub fn Constructor( diff --git a/components/script/dom/rtcicecandidate.rs b/components/script/dom/rtcicecandidate.rs index a432010b858..371f3d7693a 100644 --- a/components/script/dom/rtcicecandidate.rs +++ b/components/script/dom/rtcicecandidate.rs @@ -3,9 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::codegen::Bindings::RTCIceCandidateBinding::RTCIceCandidateInit; -use crate::dom::bindings::codegen::Bindings::RTCIceCandidateBinding::{ - self, RTCIceCandidateMethods, -}; +use crate::dom::bindings::codegen::Bindings::RTCIceCandidateBinding::RTCIceCandidateMethods; use crate::dom::bindings::error::{Error, Fallible}; use crate::dom::bindings::reflector::reflect_dom_object; use crate::dom::bindings::reflector::{DomObject, Reflector}; @@ -55,7 +53,6 @@ impl RTCIceCandidate { username_fragment, )), global, - RTCIceCandidateBinding::Wrap, ) } diff --git a/components/script/dom/rtcpeerconnection.rs b/components/script/dom/rtcpeerconnection.rs index e6b45d93676..fa8c5dda800 100644 --- a/components/script/dom/rtcpeerconnection.rs +++ b/components/script/dom/rtcpeerconnection.rs @@ -4,7 +4,6 @@ use crate::dom::bindings::cell::DomRefCell; use crate::dom::bindings::codegen::Bindings::RTCIceCandidateBinding::RTCIceCandidateInit; -use crate::dom::bindings::codegen::Bindings::RTCPeerConnectionBinding; use crate::dom::bindings::codegen::Bindings::RTCPeerConnectionBinding::RTCPeerConnectionMethods; use crate::dom::bindings::codegen::Bindings::RTCPeerConnectionBinding::{ RTCAnswerOptions, RTCBundlePolicy, RTCConfiguration, RTCIceConnectionState, @@ -166,11 +165,7 @@ impl RTCPeerConnection { } pub fn new(global: &GlobalScope, config: &RTCConfiguration) -> DomRoot<RTCPeerConnection> { - let this = reflect_dom_object( - Box::new(RTCPeerConnection::new_inherited()), - global, - RTCPeerConnectionBinding::Wrap, - ); + let this = reflect_dom_object(Box::new(RTCPeerConnection::new_inherited()), global); let signaller = this.make_signaller(); *this.controller.borrow_mut() = Some(ServoMedia::get().unwrap().create_webrtc(signaller)); if let Some(ref servers) = config.iceServers { diff --git a/components/script/dom/rtcpeerconnectioniceevent.rs b/components/script/dom/rtcpeerconnectioniceevent.rs index 795cb330829..e88222e34ad 100644 --- a/components/script/dom/rtcpeerconnectioniceevent.rs +++ b/components/script/dom/rtcpeerconnectioniceevent.rs @@ -3,7 +3,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::codegen::Bindings::EventBinding::EventMethods; -use crate::dom::bindings::codegen::Bindings::RTCPeerConnectionIceEventBinding; use crate::dom::bindings::codegen::Bindings::RTCPeerConnectionIceEventBinding::RTCPeerConnectionIceEventInit; use crate::dom::bindings::codegen::Bindings::RTCPeerConnectionIceEventBinding::RTCPeerConnectionIceEventMethods; use crate::dom::bindings::error::Fallible; @@ -48,7 +47,6 @@ impl RTCPeerConnectionIceEvent { let e = reflect_dom_object( Box::new(RTCPeerConnectionIceEvent::new_inherited(candidate, url)), global, - RTCPeerConnectionIceEventBinding::Wrap, ); let evt = e.upcast::<Event>(); evt.init_event(ty, false, false); // XXXManishearth bubbles/cancelable? diff --git a/components/script/dom/rtcsessiondescription.rs b/components/script/dom/rtcsessiondescription.rs index 68be62e577b..2ff7157e5d4 100644 --- a/components/script/dom/rtcsessiondescription.rs +++ b/components/script/dom/rtcsessiondescription.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::RTCSessionDescriptionBinding; use crate::dom::bindings::codegen::Bindings::RTCSessionDescriptionBinding::RTCSessionDescriptionMethods; use crate::dom::bindings::codegen::Bindings::RTCSessionDescriptionBinding::{ RTCSdpType, RTCSessionDescriptionInit, @@ -40,7 +39,6 @@ impl RTCSessionDescription { reflect_dom_object( Box::new(RTCSessionDescription::new_inherited(ty, sdp)), global, - RTCSessionDescriptionBinding::Wrap, ) } diff --git a/components/script/dom/rtctrackevent.rs b/components/script/dom/rtctrackevent.rs index 386349bcaa1..0cf8605170b 100644 --- a/components/script/dom/rtctrackevent.rs +++ b/components/script/dom/rtctrackevent.rs @@ -38,11 +38,7 @@ impl RTCTrackEvent { cancelable: bool, track: &MediaStreamTrack, ) -> DomRoot<RTCTrackEvent> { - let trackevent = reflect_dom_object( - Box::new(RTCTrackEvent::new_inherited(&track)), - global, - RTCTrackEventBinding::Wrap, - ); + let trackevent = reflect_dom_object(Box::new(RTCTrackEvent::new_inherited(&track)), global); { let event = trackevent.upcast::<Event>(); event.init_event(type_, bubbles, cancelable); diff --git a/components/script/dom/screen.rs b/components/script/dom/screen.rs index cf5d6785405..18e137346e5 100644 --- a/components/script/dom/screen.rs +++ b/components/script/dom/screen.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::ScreenBinding; use crate::dom::bindings::codegen::Bindings::ScreenBinding::ScreenMethods; use crate::dom::bindings::inheritance::Castable; use crate::dom::bindings::num::Finite; @@ -33,11 +32,7 @@ impl Screen { } pub fn new(window: &Window) -> DomRoot<Screen> { - reflect_dom_object( - Box::new(Screen::new_inherited(window)), - window, - ScreenBinding::Wrap, - ) + reflect_dom_object(Box::new(Screen::new_inherited(window)), window) } fn screen_size(&self) -> Size2D<u32, CSSPixel> { diff --git a/components/script/dom/selection.rs b/components/script/dom/selection.rs index e86c366d49c..75348556ba0 100644 --- a/components/script/dom/selection.rs +++ b/components/script/dom/selection.rs @@ -4,7 +4,7 @@ use crate::dom::bindings::codegen::Bindings::NodeBinding::{GetRootNodeOptions, NodeMethods}; use crate::dom::bindings::codegen::Bindings::RangeBinding::RangeMethods; -use crate::dom::bindings::codegen::Bindings::SelectionBinding::{SelectionMethods, Wrap}; +use crate::dom::bindings::codegen::Bindings::SelectionBinding::SelectionMethods; use crate::dom::bindings::error::{Error, ErrorResult, Fallible}; use crate::dom::bindings::inheritance::Castable; use crate::dom::bindings::refcounted::Trusted; @@ -50,7 +50,6 @@ impl Selection { reflect_dom_object( Box::new(Selection::new_inherited(document)), &*document.global(), - Wrap, ) } diff --git a/components/script/dom/serviceworker.rs b/components/script/dom/serviceworker.rs index 43e7245f3c5..fce07ab0809 100644 --- a/components/script/dom/serviceworker.rs +++ b/components/script/dom/serviceworker.rs @@ -6,7 +6,7 @@ use crate::dom::abstractworker::SimpleWorkerErrorHandler; use crate::dom::bindings::cell::DomRefCell; use crate::dom::bindings::codegen::Bindings::MessagePortBinding::PostMessageOptions; use crate::dom::bindings::codegen::Bindings::ServiceWorkerBinding::{ - ServiceWorkerMethods, ServiceWorkerState, Wrap, + ServiceWorkerMethods, ServiceWorkerState, }; use crate::dom::bindings::error::{Error, ErrorResult}; use crate::dom::bindings::inheritance::Castable; @@ -62,7 +62,6 @@ impl ServiceWorker { scope_url, )), global, - Wrap, ) } diff --git a/components/script/dom/serviceworkercontainer.rs b/components/script/dom/serviceworkercontainer.rs index 66ff8e738f7..8145729d857 100644 --- a/components/script/dom/serviceworkercontainer.rs +++ b/components/script/dom/serviceworkercontainer.rs @@ -3,9 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::codegen::Bindings::ServiceWorkerContainerBinding::RegistrationOptions; -use crate::dom::bindings::codegen::Bindings::ServiceWorkerContainerBinding::{ - ServiceWorkerContainerMethods, Wrap, -}; +use crate::dom::bindings::codegen::Bindings::ServiceWorkerContainerBinding::ServiceWorkerContainerMethods; use crate::dom::bindings::error::Error; use crate::dom::bindings::reflector::{reflect_dom_object, DomObject}; use crate::dom::bindings::root::{Dom, DomRoot, MutNullableDom}; @@ -42,7 +40,7 @@ impl ServiceWorkerContainer { pub fn new(global: &GlobalScope) -> DomRoot<ServiceWorkerContainer> { let client = Client::new(&global.as_window()); let container = ServiceWorkerContainer::new_inherited(&*client); - reflect_dom_object(Box::new(container), global, Wrap) + reflect_dom_object(Box::new(container), global) } } diff --git a/components/script/dom/serviceworkerregistration.rs b/components/script/dom/serviceworkerregistration.rs index 647fb9518c5..f242da12404 100644 --- a/components/script/dom/serviceworkerregistration.rs +++ b/components/script/dom/serviceworkerregistration.rs @@ -4,10 +4,8 @@ use crate::dom::bindings::cell::DomRefCell; use crate::dom::bindings::codegen::Bindings::ServiceWorkerBinding::ServiceWorkerState; +use crate::dom::bindings::codegen::Bindings::ServiceWorkerRegistrationBinding::ServiceWorkerRegistrationMethods; use crate::dom::bindings::codegen::Bindings::ServiceWorkerRegistrationBinding::ServiceWorkerUpdateViaCache; -use crate::dom::bindings::codegen::Bindings::ServiceWorkerRegistrationBinding::{ - ServiceWorkerRegistrationMethods, Wrap, -}; use crate::dom::bindings::reflector::{reflect_dom_object, DomObject}; use crate::dom::bindings::root::{Dom, DomRoot, MutNullableDom}; use crate::dom::bindings::str::{ByteString, USVString}; @@ -69,7 +67,6 @@ impl ServiceWorkerRegistration { scope, )), global, - Wrap, ) } diff --git a/components/script/dom/servoparser/mod.rs b/components/script/dom/servoparser/mod.rs index 505c699cb6c..d1a4a18df18 100644 --- a/components/script/dom/servoparser/mod.rs +++ b/components/script/dom/servoparser/mod.rs @@ -10,7 +10,6 @@ use crate::dom::bindings::codegen::Bindings::DocumentBinding::{ use crate::dom::bindings::codegen::Bindings::HTMLImageElementBinding::HTMLImageElementMethods; use crate::dom::bindings::codegen::Bindings::HTMLTemplateElementBinding::HTMLTemplateElementMethods; use crate::dom::bindings::codegen::Bindings::NodeBinding::NodeMethods; -use crate::dom::bindings::codegen::Bindings::ServoParserBinding; use crate::dom::bindings::inheritance::Castable; use crate::dom::bindings::refcounted::Trusted; use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector}; @@ -432,7 +431,6 @@ impl ServoParser { kind, )), document.window(), - ServoParserBinding::Wrap, ) } diff --git a/components/script/dom/shadowroot.rs b/components/script/dom/shadowroot.rs index 0b791476f7c..2324a685042 100644 --- a/components/script/dom/shadowroot.rs +++ b/components/script/dom/shadowroot.rs @@ -4,7 +4,7 @@ use crate::dom::bindings::cell::DomRefCell; use crate::dom::bindings::codegen::Bindings::ShadowRootBinding::ShadowRootBinding::ShadowRootMethods; -use crate::dom::bindings::codegen::Bindings::ShadowRootBinding::{self, ShadowRootMode}; +use crate::dom::bindings::codegen::Bindings::ShadowRootBinding::ShadowRootMode; use crate::dom::bindings::inheritance::Castable; use crate::dom::bindings::num::Finite; use crate::dom::bindings::reflector::reflect_dom_object; @@ -73,7 +73,6 @@ impl ShadowRoot { reflect_dom_object( Box::new(ShadowRoot::new_inherited(host, document)), document.window(), - ShadowRootBinding::Wrap, ) } diff --git a/components/script/dom/stereopannernode.rs b/components/script/dom/stereopannernode.rs index 66383352086..cc71c69593b 100644 --- a/components/script/dom/stereopannernode.rs +++ b/components/script/dom/stereopannernode.rs @@ -10,7 +10,7 @@ use crate::dom::bindings::codegen::Bindings::AudioNodeBinding::{ }; use crate::dom::bindings::codegen::Bindings::AudioParamBinding::AutomationRate; use crate::dom::bindings::codegen::Bindings::StereoPannerNodeBinding::StereoPannerNodeMethods; -use crate::dom::bindings::codegen::Bindings::StereoPannerNodeBinding::{self, StereoPannerOptions}; +use crate::dom::bindings::codegen::Bindings::StereoPannerNodeBinding::StereoPannerOptions; use crate::dom::bindings::error::{Error, Fallible}; use crate::dom::bindings::reflector::reflect_dom_object; use crate::dom::bindings::root::{Dom, DomRoot}; @@ -76,11 +76,7 @@ impl StereoPannerNode { options: &StereoPannerOptions, ) -> Fallible<DomRoot<StereoPannerNode>> { let node = StereoPannerNode::new_inherited(window, context, options)?; - Ok(reflect_dom_object( - Box::new(node), - window, - StereoPannerNodeBinding::Wrap, - )) + Ok(reflect_dom_object(Box::new(node), window)) } #[allow(non_snake_case)] diff --git a/components/script/dom/storage.rs b/components/script/dom/storage.rs index 74624ba45b4..8d8ad0dc7ba 100644 --- a/components/script/dom/storage.rs +++ b/components/script/dom/storage.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::StorageBinding; use crate::dom::bindings::codegen::Bindings::StorageBinding::StorageMethods; use crate::dom::bindings::error::{Error, ErrorResult}; use crate::dom::bindings::inheritance::Castable; @@ -37,11 +36,7 @@ impl Storage { } pub fn new(global: &Window, storage_type: StorageType) -> DomRoot<Storage> { - reflect_dom_object( - Box::new(Storage::new_inherited(storage_type)), - global, - StorageBinding::Wrap, - ) + reflect_dom_object(Box::new(Storage::new_inherited(storage_type)), global) } fn get_url(&self) -> ServoUrl { diff --git a/components/script/dom/storageevent.rs b/components/script/dom/storageevent.rs index c2ecaf59611..a50c1267585 100644 --- a/components/script/dom/storageevent.rs +++ b/components/script/dom/storageevent.rs @@ -50,7 +50,6 @@ impl StorageEvent { reflect_dom_object( Box::new(StorageEvent::new_inherited(None, None, None, url, None)), window, - StorageEventBinding::Wrap, ) } @@ -74,7 +73,6 @@ impl StorageEvent { storageArea, )), global, - StorageEventBinding::Wrap, ); { let event = ev.upcast::<Event>(); diff --git a/components/script/dom/stylepropertymapreadonly.rs b/components/script/dom/stylepropertymapreadonly.rs index 7ef177eb71a..3881bfcdd87 100644 --- a/components/script/dom/stylepropertymapreadonly.rs +++ b/components/script/dom/stylepropertymapreadonly.rs @@ -3,7 +3,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::codegen::Bindings::StylePropertyMapReadOnlyBinding::StylePropertyMapReadOnlyMethods; -use crate::dom::bindings::codegen::Bindings::StylePropertyMapReadOnlyBinding::Wrap; use crate::dom::bindings::reflector::reflect_dom_object; use crate::dom::bindings::reflector::Reflector; use crate::dom::bindings::root::{Dom, DomRoot}; @@ -56,7 +55,6 @@ impl StylePropertyMapReadOnly { reflect_dom_object( Box::new(StylePropertyMapReadOnly::new_inherited(iter)), global, - Wrap, ) } } diff --git a/components/script/dom/stylesheetlist.rs b/components/script/dom/stylesheetlist.rs index 391ac55ed91..7bd115f5084 100644 --- a/components/script/dom/stylesheetlist.rs +++ b/components/script/dom/stylesheetlist.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::StyleSheetListBinding; use crate::dom::bindings::codegen::Bindings::StyleSheetListBinding::StyleSheetListMethods; use crate::dom::bindings::reflector::{reflect_dom_object, Reflector}; use crate::dom::bindings::root::{Dom, DomRoot}; @@ -83,11 +82,7 @@ impl StyleSheetList { #[allow(unrooted_must_root)] pub fn new(window: &Window, doc_or_sr: StyleSheetListOwner) -> DomRoot<StyleSheetList> { - reflect_dom_object( - Box::new(StyleSheetList::new_inherited(doc_or_sr)), - window, - StyleSheetListBinding::Wrap, - ) + reflect_dom_object(Box::new(StyleSheetList::new_inherited(doc_or_sr)), window) } } diff --git a/components/script/dom/submitevent.rs b/components/script/dom/submitevent.rs index 17f8e7fd003..c9965b762b1 100644 --- a/components/script/dom/submitevent.rs +++ b/components/script/dom/submitevent.rs @@ -38,11 +38,7 @@ impl SubmitEvent { cancelable: bool, submitter: Option<DomRoot<HTMLElement>>, ) -> DomRoot<SubmitEvent> { - let ev = reflect_dom_object( - Box::new(SubmitEvent::new_inherited(submitter)), - global, - SubmitEventBinding::Wrap, - ); + let ev = reflect_dom_object(Box::new(SubmitEvent::new_inherited(submitter)), global); { let event = ev.upcast::<Event>(); event.init_event(type_, bubbles, cancelable); diff --git a/components/script/dom/svgsvgelement.rs b/components/script/dom/svgsvgelement.rs index 57f88db6f5b..8671f8a9027 100644 --- a/components/script/dom/svgsvgelement.rs +++ b/components/script/dom/svgsvgelement.rs @@ -3,7 +3,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::attr::Attr; -use crate::dom::bindings::codegen::Bindings::SVGSVGElementBinding; use crate::dom::bindings::inheritance::Castable; use crate::dom::bindings::root::{DomRoot, LayoutDom}; use crate::dom::bindings::str::DOMString; @@ -45,7 +44,6 @@ impl SVGSVGElement { Node::reflect_node( Box::new(SVGSVGElement::new_inherited(local_name, prefix, document)), document, - SVGSVGElementBinding::Wrap, ) } } diff --git a/components/script/dom/testbinding.rs b/components/script/dom/testbinding.rs index f0dcd1b26c7..b14fb16fe4f 100644 --- a/components/script/dom/testbinding.rs +++ b/components/script/dom/testbinding.rs @@ -7,7 +7,7 @@ use crate::dom::bindings::callback::ExceptionHandling; use crate::dom::bindings::codegen::Bindings::EventListenerBinding::EventListener; use crate::dom::bindings::codegen::Bindings::FunctionBinding::Function; -use crate::dom::bindings::codegen::Bindings::TestBindingBinding::{self, SimpleCallback}; +use crate::dom::bindings::codegen::Bindings::TestBindingBinding::SimpleCallback; use crate::dom::bindings::codegen::Bindings::TestBindingBinding::{ TestBindingMethods, TestDictionary, }; @@ -82,11 +82,7 @@ impl TestBinding { } pub fn new(global: &GlobalScope) -> DomRoot<TestBinding> { - reflect_dom_object( - Box::new(TestBinding::new_inherited()), - global, - TestBindingBinding::Wrap, - ) + reflect_dom_object(Box::new(TestBinding::new_inherited()), global) } pub fn Constructor(global: &GlobalScope) -> Fallible<DomRoot<TestBinding>> { diff --git a/components/script/dom/testbindingiterable.rs b/components/script/dom/testbindingiterable.rs index d2ee66521ff..5befaaa2c59 100644 --- a/components/script/dom/testbindingiterable.rs +++ b/components/script/dom/testbindingiterable.rs @@ -5,9 +5,7 @@ // check-tidy: no specs after this line use crate::dom::bindings::cell::DomRefCell; -use crate::dom::bindings::codegen::Bindings::TestBindingIterableBinding::{ - self, TestBindingIterableMethods, -}; +use crate::dom::bindings::codegen::Bindings::TestBindingIterableBinding::TestBindingIterableMethods; use crate::dom::bindings::error::Fallible; use crate::dom::bindings::reflector::{reflect_dom_object, Reflector}; use crate::dom::bindings::root::DomRoot; @@ -29,7 +27,6 @@ impl TestBindingIterable { vals: DomRefCell::new(vec![]), }), global, - TestBindingIterableBinding::Wrap, ) } diff --git a/components/script/dom/testbindingpairiterable.rs b/components/script/dom/testbindingpairiterable.rs index 8c85de40f0c..e8775af5ce7 100644 --- a/components/script/dom/testbindingpairiterable.rs +++ b/components/script/dom/testbindingpairiterable.rs @@ -5,7 +5,6 @@ // check-tidy: no specs after this line use crate::dom::bindings::cell::DomRefCell; -use crate::dom::bindings::codegen::Bindings::TestBindingPairIterableBinding; use crate::dom::bindings::codegen::Bindings::TestBindingPairIterableBinding::TestBindingPairIterableMethods; use crate::dom::bindings::error::Fallible; use crate::dom::bindings::iterable::Iterable; @@ -55,7 +54,6 @@ impl TestBindingPairIterable { map: DomRefCell::new(vec![]), }), global, - TestBindingPairIterableBinding::TestBindingPairIterableWrap, ) } diff --git a/components/script/dom/testrunner.rs b/components/script/dom/testrunner.rs index 5adc77e0d0c..ac354905d25 100644 --- a/components/script/dom/testrunner.rs +++ b/components/script/dom/testrunner.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::TestRunnerBinding; use crate::dom::bindings::codegen::Bindings::TestRunnerBinding::TestRunnerMethods; use crate::dom::bindings::error::{Error, ErrorResult}; use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector}; @@ -28,11 +27,7 @@ impl TestRunner { } pub fn new(global: &GlobalScope) -> DomRoot<TestRunner> { - reflect_dom_object( - Box::new(TestRunner::new_inherited()), - global, - TestRunnerBinding::Wrap, - ) + reflect_dom_object(Box::new(TestRunner::new_inherited()), global) } fn get_bluetooth_thread(&self) -> IpcSender<BluetoothRequest> { diff --git a/components/script/dom/testworklet.rs b/components/script/dom/testworklet.rs index 74c4a0fb156..16e49b55493 100644 --- a/components/script/dom/testworklet.rs +++ b/components/script/dom/testworklet.rs @@ -4,7 +4,6 @@ // check-tidy: no specs after this line use crate::dom::bindings::codegen::Bindings::TestWorkletBinding::TestWorkletMethods; -use crate::dom::bindings::codegen::Bindings::TestWorkletBinding::Wrap; use crate::dom::bindings::codegen::Bindings::WorkletBinding::WorkletBinding::WorkletMethods; use crate::dom::bindings::codegen::Bindings::WorkletBinding::WorkletOptions; use crate::dom::bindings::error::Fallible; @@ -38,11 +37,7 @@ impl TestWorklet { fn new(window: &Window) -> DomRoot<TestWorklet> { let worklet = Worklet::new(window, WorkletGlobalScopeType::Test); - reflect_dom_object( - Box::new(TestWorklet::new_inherited(&*worklet)), - window, - Wrap, - ) + reflect_dom_object(Box::new(TestWorklet::new_inherited(&*worklet)), window) } #[allow(non_snake_case)] diff --git a/components/script/dom/text.rs b/components/script/dom/text.rs index 36273f933a2..64fae977556 100644 --- a/components/script/dom/text.rs +++ b/components/script/dom/text.rs @@ -5,7 +5,7 @@ use crate::dom::bindings::codegen::Bindings::CharacterDataBinding::CharacterDataMethods; use crate::dom::bindings::codegen::Bindings::DocumentBinding::DocumentMethods; use crate::dom::bindings::codegen::Bindings::NodeBinding::NodeMethods; -use crate::dom::bindings::codegen::Bindings::TextBinding::{self, TextMethods}; +use crate::dom::bindings::codegen::Bindings::TextBinding::TextMethods; use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowMethods; use crate::dom::bindings::error::{Error, Fallible}; use crate::dom::bindings::inheritance::Castable; @@ -31,11 +31,7 @@ impl Text { } pub fn new(text: DOMString, document: &Document) -> DomRoot<Text> { - Node::reflect_node( - Box::new(Text::new_inherited(text, document)), - document, - TextBinding::Wrap, - ) + Node::reflect_node(Box::new(Text::new_inherited(text, document)), document) } #[allow(non_snake_case)] diff --git a/components/script/dom/textdecoder.rs b/components/script/dom/textdecoder.rs index 484ac269ec6..7d664242467 100644 --- a/components/script/dom/textdecoder.rs +++ b/components/script/dom/textdecoder.rs @@ -63,7 +63,6 @@ impl TextDecoder { reflect_dom_object( Box::new(TextDecoder::new_inherited(encoding, fatal, ignoreBOM)), global, - TextDecoderBinding::Wrap, ) } diff --git a/components/script/dom/textencoder.rs b/components/script/dom/textencoder.rs index 65d41c1c88e..4df1143531f 100644 --- a/components/script/dom/textencoder.rs +++ b/components/script/dom/textencoder.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::TextEncoderBinding; use crate::dom::bindings::codegen::Bindings::TextEncoderBinding::TextEncoderMethods; use crate::dom::bindings::error::Fallible; use crate::dom::bindings::reflector::{reflect_dom_object, Reflector}; @@ -29,11 +28,7 @@ impl TextEncoder { } pub fn new(global: &GlobalScope) -> DomRoot<TextEncoder> { - reflect_dom_object( - Box::new(TextEncoder::new_inherited()), - global, - TextEncoderBinding::Wrap, - ) + reflect_dom_object(Box::new(TextEncoder::new_inherited()), global) } // https://encoding.spec.whatwg.org/#dom-textencoder diff --git a/components/script/dom/textmetrics.rs b/components/script/dom/textmetrics.rs index eca24e19452..675fcf1aa1d 100644 --- a/components/script/dom/textmetrics.rs +++ b/components/script/dom/textmetrics.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::TextMetricsBinding; use crate::dom::bindings::codegen::Bindings::TextMetricsBinding::TextMetricsMethods; use crate::dom::bindings::num::Finite; use crate::dom::bindings::reflector::{reflect_dom_object, Reflector}; @@ -92,7 +91,6 @@ impl TextMetrics { ideographicBaseline, )), global, - TextMetricsBinding::Wrap, ) } } diff --git a/components/script/dom/texttrack.rs b/components/script/dom/texttrack.rs index 7c2b54adcd9..0e6cd2e48c7 100644 --- a/components/script/dom/texttrack.rs +++ b/components/script/dom/texttrack.rs @@ -4,7 +4,7 @@ use crate::dom::bindings::cell::DomRefCell; use crate::dom::bindings::codegen::Bindings::TextTrackBinding::{ - self, TextTrackKind, TextTrackMethods, TextTrackMode, + TextTrackKind, TextTrackMethods, TextTrackMode, }; use crate::dom::bindings::error::{Error, ErrorResult}; use crate::dom::bindings::reflector::{reflect_dom_object, DomObject}; @@ -65,7 +65,6 @@ impl TextTrack { id, kind, label, language, mode, track_list, )), window, - TextTrackBinding::Wrap, ) } diff --git a/components/script/dom/texttrackcue.rs b/components/script/dom/texttrackcue.rs index 61a07d2cb3c..7a219f0f417 100644 --- a/components/script/dom/texttrackcue.rs +++ b/components/script/dom/texttrackcue.rs @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::cell::DomRefCell; -use crate::dom::bindings::codegen::Bindings::TextTrackCueBinding::{self, TextTrackCueMethods}; +use crate::dom::bindings::codegen::Bindings::TextTrackCueBinding::TextTrackCueMethods; use crate::dom::bindings::num::Finite; use crate::dom::bindings::reflector::reflect_dom_object; use crate::dom::bindings::root::{Dom, DomRoot}; @@ -52,7 +52,6 @@ impl TextTrackCue { reflect_dom_object( Box::new(TextTrackCue::new_inherited(id, start_time, end_time, track)), window, - TextTrackCueBinding::Wrap, ) } diff --git a/components/script/dom/texttrackcuelist.rs b/components/script/dom/texttrackcuelist.rs index bd66027bb07..a51b95a965f 100644 --- a/components/script/dom/texttrackcuelist.rs +++ b/components/script/dom/texttrackcuelist.rs @@ -3,9 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::cell::DomRefCell; -use crate::dom::bindings::codegen::Bindings::TextTrackCueListBinding::{ - self, TextTrackCueListMethods, -}; +use crate::dom::bindings::codegen::Bindings::TextTrackCueListBinding::TextTrackCueListMethods; use crate::dom::bindings::reflector::{reflect_dom_object, Reflector}; use crate::dom::bindings::root::{Dom, DomRoot}; use crate::dom::bindings::str::DOMString; @@ -28,11 +26,7 @@ impl TextTrackCueList { } pub fn new(window: &Window, cues: &[&TextTrackCue]) -> DomRoot<TextTrackCueList> { - reflect_dom_object( - Box::new(TextTrackCueList::new_inherited(cues)), - window, - TextTrackCueListBinding::Wrap, - ) + reflect_dom_object(Box::new(TextTrackCueList::new_inherited(cues)), window) } pub fn item(&self, idx: usize) -> Option<DomRoot<TextTrackCue>> { diff --git a/components/script/dom/texttracklist.rs b/components/script/dom/texttracklist.rs index 0e978972d69..faeb9f0cd6d 100644 --- a/components/script/dom/texttracklist.rs +++ b/components/script/dom/texttracklist.rs @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::cell::DomRefCell; -use crate::dom::bindings::codegen::Bindings::TextTrackListBinding::{self, TextTrackListMethods}; +use crate::dom::bindings::codegen::Bindings::TextTrackListBinding::TextTrackListMethods; use crate::dom::bindings::codegen::UnionTypes::VideoTrackOrAudioTrackOrTextTrack; use crate::dom::bindings::inheritance::Castable; use crate::dom::bindings::refcounted::Trusted; @@ -33,11 +33,7 @@ impl TextTrackList { } pub fn new(window: &Window, tracks: &[&TextTrack]) -> DomRoot<TextTrackList> { - reflect_dom_object( - Box::new(TextTrackList::new_inherited(tracks)), - window, - TextTrackListBinding::Wrap, - ) + reflect_dom_object(Box::new(TextTrackList::new_inherited(tracks)), window) } pub fn item(&self, idx: usize) -> Option<DomRoot<TextTrack>> { diff --git a/components/script/dom/timeranges.rs b/components/script/dom/timeranges.rs index 7b4d1978a60..7a60210b0e0 100644 --- a/components/script/dom/timeranges.rs +++ b/components/script/dom/timeranges.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::TimeRangesBinding; use crate::dom::bindings::codegen::Bindings::TimeRangesBinding::TimeRangesMethods; use crate::dom::bindings::error::{Error, Fallible}; use crate::dom::bindings::num::Finite; @@ -138,11 +137,7 @@ impl TimeRanges { } pub fn new(window: &Window, ranges: TimeRangesContainer) -> DomRoot<TimeRanges> { - reflect_dom_object( - Box::new(TimeRanges::new_inherited(ranges)), - window, - TimeRangesBinding::Wrap, - ) + reflect_dom_object(Box::new(TimeRanges::new_inherited(ranges)), window) } } diff --git a/components/script/dom/touch.rs b/components/script/dom/touch.rs index 139f1206a04..60e69a48ca3 100644 --- a/components/script/dom/touch.rs +++ b/components/script/dom/touch.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::TouchBinding; use crate::dom::bindings::codegen::Bindings::TouchBinding::TouchMethods; use crate::dom::bindings::num::Finite; use crate::dom::bindings::reflector::{reflect_dom_object, Reflector}; @@ -64,7 +63,6 @@ impl Touch { identifier, target, screen_x, screen_y, client_x, client_y, page_x, page_y, )), window, - TouchBinding::Wrap, ) } } diff --git a/components/script/dom/touchevent.rs b/components/script/dom/touchevent.rs index b903386ea72..4dfbed55147 100644 --- a/components/script/dom/touchevent.rs +++ b/components/script/dom/touchevent.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::TouchEventBinding; use crate::dom::bindings::codegen::Bindings::TouchEventBinding::TouchEventMethods; use crate::dom::bindings::codegen::Bindings::UIEventBinding::UIEventMethods; use crate::dom::bindings::inheritance::Castable; @@ -59,7 +58,6 @@ impl TouchEvent { target_touches, )), window, - TouchEventBinding::Wrap, ) } diff --git a/components/script/dom/touchlist.rs b/components/script/dom/touchlist.rs index d0bc0bd32e4..46400df8ca1 100644 --- a/components/script/dom/touchlist.rs +++ b/components/script/dom/touchlist.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::TouchListBinding; use crate::dom::bindings::codegen::Bindings::TouchListBinding::TouchListMethods; use crate::dom::bindings::reflector::{reflect_dom_object, Reflector}; use crate::dom::bindings::root::{Dom, DomRoot}; @@ -25,11 +24,7 @@ impl TouchList { } pub fn new(window: &Window, touches: &[&Touch]) -> DomRoot<TouchList> { - reflect_dom_object( - Box::new(TouchList::new_inherited(touches)), - window, - TouchListBinding::Wrap, - ) + reflect_dom_object(Box::new(TouchList::new_inherited(touches)), window) } } diff --git a/components/script/dom/trackevent.rs b/components/script/dom/trackevent.rs index 634548eb351..34148f26527 100644 --- a/components/script/dom/trackevent.rs +++ b/components/script/dom/trackevent.rs @@ -64,11 +64,7 @@ impl TrackEvent { cancelable: bool, track: &Option<VideoTrackOrAudioTrackOrTextTrack>, ) -> DomRoot<TrackEvent> { - let te = reflect_dom_object( - Box::new(TrackEvent::new_inherited(&track)), - global, - TrackEventBinding::Wrap, - ); + let te = reflect_dom_object(Box::new(TrackEvent::new_inherited(&track)), global); { let event = te.upcast::<Event>(); event.init_event(type_, bubbles, cancelable); diff --git a/components/script/dom/transitionevent.rs b/components/script/dom/transitionevent.rs index 5f4d5aa7088..2305a9489ff 100644 --- a/components/script/dom/transitionevent.rs +++ b/components/script/dom/transitionevent.rs @@ -3,7 +3,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::codegen::Bindings::EventBinding::EventMethods; -use crate::dom::bindings::codegen::Bindings::TransitionEventBinding; use crate::dom::bindings::codegen::Bindings::TransitionEventBinding::{ TransitionEventInit, TransitionEventMethods, }; @@ -41,11 +40,7 @@ impl TransitionEvent { type_: Atom, init: &TransitionEventInit, ) -> DomRoot<TransitionEvent> { - let ev = reflect_dom_object( - Box::new(TransitionEvent::new_inherited(init)), - window, - TransitionEventBinding::Wrap, - ); + let ev = reflect_dom_object(Box::new(TransitionEvent::new_inherited(init)), window); { let event = ev.upcast::<Event>(); event.init_event(type_, init.parent.bubbles, init.parent.cancelable); diff --git a/components/script/dom/treewalker.rs b/components/script/dom/treewalker.rs index 6b11c410bf8..7d23d81bcf0 100644 --- a/components/script/dom/treewalker.rs +++ b/components/script/dom/treewalker.rs @@ -6,7 +6,6 @@ use crate::dom::bindings::callback::ExceptionHandling::Rethrow; use crate::dom::bindings::codegen::Bindings::NodeBinding::NodeMethods; use crate::dom::bindings::codegen::Bindings::NodeFilterBinding::NodeFilter; use crate::dom::bindings::codegen::Bindings::NodeFilterBinding::NodeFilterConstants; -use crate::dom::bindings::codegen::Bindings::TreeWalkerBinding; use crate::dom::bindings::codegen::Bindings::TreeWalkerBinding::TreeWalkerMethods; use crate::dom::bindings::error::{Error, Fallible}; use crate::dom::bindings::reflector::{reflect_dom_object, Reflector}; @@ -50,7 +49,6 @@ impl TreeWalker { reflect_dom_object( Box::new(TreeWalker::new_inherited(root_node, what_to_show, filter)), document.window(), - TreeWalkerBinding::Wrap, ) } diff --git a/components/script/dom/uievent.rs b/components/script/dom/uievent.rs index 45bdda0ccc6..c54265f4fb5 100644 --- a/components/script/dom/uievent.rs +++ b/components/script/dom/uievent.rs @@ -35,11 +35,7 @@ impl UIEvent { } pub fn new_uninitialized(window: &Window) -> DomRoot<UIEvent> { - reflect_dom_object( - Box::new(UIEvent::new_inherited()), - window, - UIEventBinding::Wrap, - ) + reflect_dom_object(Box::new(UIEvent::new_inherited()), window) } pub fn new( diff --git a/components/script/dom/url.rs b/components/script/dom/url.rs index 715d1ededd7..b1ceef7cfa3 100644 --- a/components/script/dom/url.rs +++ b/components/script/dom/url.rs @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::cell::DomRefCell; -use crate::dom::bindings::codegen::Bindings::URLBinding::{self, URLMethods}; +use crate::dom::bindings::codegen::Bindings::URLBinding::URLMethods; use crate::dom::bindings::error::{Error, ErrorResult, Fallible}; use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector}; use crate::dom::bindings::root::{DomRoot, MutNullableDom}; @@ -43,7 +43,7 @@ impl URL { } pub fn new(global: &GlobalScope, url: ServoUrl) -> DomRoot<URL> { - reflect_dom_object(Box::new(URL::new_inherited(url)), global, URLBinding::Wrap) + reflect_dom_object(Box::new(URL::new_inherited(url)), global) } pub fn query_pairs(&self) -> Vec<(String, String)> { diff --git a/components/script/dom/urlsearchparams.rs b/components/script/dom/urlsearchparams.rs index 670304a75a1..ef27b969990 100644 --- a/components/script/dom/urlsearchparams.rs +++ b/components/script/dom/urlsearchparams.rs @@ -4,7 +4,6 @@ use crate::dom::bindings::cell::DomRefCell; use crate::dom::bindings::codegen::Bindings::URLSearchParamsBinding::URLSearchParamsMethods; -use crate::dom::bindings::codegen::Bindings::URLSearchParamsBinding::URLSearchParamsWrap; use crate::dom::bindings::codegen::UnionTypes::USVStringSequenceSequenceOrUSVStringUSVStringRecordOrUSVString; use crate::dom::bindings::error::{Error, Fallible}; use crate::dom::bindings::iterable::Iterable; @@ -37,11 +36,7 @@ impl URLSearchParams { } pub fn new(global: &GlobalScope, url: Option<&URL>) -> DomRoot<URLSearchParams> { - reflect_dom_object( - Box::new(URLSearchParams::new_inherited(url)), - global, - URLSearchParamsWrap, - ) + reflect_dom_object(Box::new(URLSearchParams::new_inherited(url)), global) } // https://url.spec.whatwg.org/#dom-urlsearchparams-urlsearchparams diff --git a/components/script/dom/validitystate.rs b/components/script/dom/validitystate.rs index f41dee046be..7237ca391e0 100755 --- a/components/script/dom/validitystate.rs +++ b/components/script/dom/validitystate.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::ValidityStateBinding; use crate::dom::bindings::codegen::Bindings::ValidityStateBinding::ValidityStateMethods; use crate::dom::bindings::reflector::{reflect_dom_object, Reflector}; use crate::dom::bindings::root::{Dom, DomRoot}; @@ -60,11 +59,7 @@ impl ValidityState { } pub fn new(window: &Window, element: &Element) -> DomRoot<ValidityState> { - reflect_dom_object( - Box::new(ValidityState::new_inherited(element)), - window, - ValidityStateBinding::Wrap, - ) + reflect_dom_object(Box::new(ValidityState::new_inherited(element)), window) } } diff --git a/components/script/dom/videotrack.rs b/components/script/dom/videotrack.rs index 18a383ab816..8f904284fd9 100644 --- a/components/script/dom/videotrack.rs +++ b/components/script/dom/videotrack.rs @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::cell::DomRefCell; -use crate::dom::bindings::codegen::Bindings::VideoTrackBinding::{self, VideoTrackMethods}; +use crate::dom::bindings::codegen::Bindings::VideoTrackBinding::VideoTrackMethods; use crate::dom::bindings::reflector::{reflect_dom_object, Reflector}; use crate::dom::bindings::root::{Dom, DomRoot}; use crate::dom::bindings::str::DOMString; @@ -55,7 +55,6 @@ impl VideoTrack { id, kind, label, language, track_list, )), window, - VideoTrackBinding::Wrap, ) } diff --git a/components/script/dom/videotracklist.rs b/components/script/dom/videotracklist.rs index 98fa495bfdd..a56e29d1470 100644 --- a/components/script/dom/videotracklist.rs +++ b/components/script/dom/videotracklist.rs @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::cell::DomRefCell; -use crate::dom::bindings::codegen::Bindings::VideoTrackListBinding::{self, VideoTrackListMethods}; +use crate::dom::bindings::codegen::Bindings::VideoTrackListBinding::VideoTrackListMethods; use crate::dom::bindings::inheritance::Castable; use crate::dom::bindings::refcounted::Trusted; use crate::dom::bindings::reflector::{reflect_dom_object, DomObject}; @@ -44,7 +44,6 @@ impl VideoTrackList { reflect_dom_object( Box::new(VideoTrackList::new_inherited(tracks, media_element)), window, - VideoTrackListBinding::Wrap, ) } diff --git a/components/script/dom/vrdisplay.rs b/components/script/dom/vrdisplay.rs index 4b3f7426dda..2d59aa6a844 100644 --- a/components/script/dom/vrdisplay.rs +++ b/components/script/dom/vrdisplay.rs @@ -6,7 +6,6 @@ use crate::dom::bindings::callback::ExceptionHandling; use crate::dom::bindings::cell::DomRefCell; use crate::dom::bindings::codegen::Bindings::NavigatorBinding::NavigatorMethods; use crate::dom::bindings::codegen::Bindings::PerformanceBinding::PerformanceMethods; -use crate::dom::bindings::codegen::Bindings::VRDisplayBinding; use crate::dom::bindings::codegen::Bindings::VRDisplayBinding::VRDisplayMethods; use crate::dom::bindings::codegen::Bindings::VRDisplayBinding::VREye; use crate::dom::bindings::codegen::Bindings::VRLayerBinding::VRLayer; @@ -162,11 +161,7 @@ impl VRDisplay { } pub fn new(global: &Window, display: WebVRDisplayData) -> DomRoot<VRDisplay> { - reflect_dom_object( - Box::new(VRDisplay::new_inherited(&global, display)), - global, - VRDisplayBinding::Wrap, - ) + reflect_dom_object(Box::new(VRDisplay::new_inherited(&global, display)), global) } } diff --git a/components/script/dom/vrdisplaycapabilities.rs b/components/script/dom/vrdisplaycapabilities.rs index 214ee617e1c..d4908b88eb1 100644 --- a/components/script/dom/vrdisplaycapabilities.rs +++ b/components/script/dom/vrdisplaycapabilities.rs @@ -3,7 +3,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::cell::DomRefCell; -use crate::dom::bindings::codegen::Bindings::VRDisplayCapabilitiesBinding; use crate::dom::bindings::codegen::Bindings::VRDisplayCapabilitiesBinding::VRDisplayCapabilitiesMethods; use crate::dom::bindings::reflector::{reflect_dom_object, Reflector}; use crate::dom::bindings::root::DomRoot; @@ -35,7 +34,6 @@ impl VRDisplayCapabilities { reflect_dom_object( Box::new(VRDisplayCapabilities::new_inherited(capabilities)), global, - VRDisplayCapabilitiesBinding::Wrap, ) } } diff --git a/components/script/dom/vrdisplayevent.rs b/components/script/dom/vrdisplayevent.rs index 711349b4496..00a7ab4012e 100644 --- a/components/script/dom/vrdisplayevent.rs +++ b/components/script/dom/vrdisplayevent.rs @@ -46,7 +46,6 @@ impl VRDisplayEvent { let ev = reflect_dom_object( Box::new(VRDisplayEvent::new_inherited(&display, reason)), global, - VRDisplayEventBinding::Wrap, ); { let event = ev.upcast::<Event>(); diff --git a/components/script/dom/vreyeparameters.rs b/components/script/dom/vreyeparameters.rs index c908b23540d..ae18fbb5416 100644 --- a/components/script/dom/vreyeparameters.rs +++ b/components/script/dom/vreyeparameters.rs @@ -3,7 +3,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::cell::DomRefCell; -use crate::dom::bindings::codegen::Bindings::VREyeParametersBinding; use crate::dom::bindings::codegen::Bindings::VREyeParametersBinding::VREyeParametersMethods; use crate::dom::bindings::reflector::{reflect_dom_object, Reflector}; use crate::dom::bindings::root::{Dom, DomRoot}; @@ -57,7 +56,6 @@ impl VREyeParameters { let eye_parameters = reflect_dom_object( Box::new(VREyeParameters::new_inherited(parameters, &fov)), global, - VREyeParametersBinding::Wrap, ); eye_parameters.offset.set(array.get()); diff --git a/components/script/dom/vrfieldofview.rs b/components/script/dom/vrfieldofview.rs index 8009f6a2461..5a82c2aedf2 100644 --- a/components/script/dom/vrfieldofview.rs +++ b/components/script/dom/vrfieldofview.rs @@ -3,7 +3,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::cell::DomRefCell; -use crate::dom::bindings::codegen::Bindings::VRFieldOfViewBinding; use crate::dom::bindings::codegen::Bindings::VRFieldOfViewBinding::VRFieldOfViewMethods; use crate::dom::bindings::num::Finite; use crate::dom::bindings::reflector::{reflect_dom_object, Reflector}; @@ -30,11 +29,7 @@ impl VRFieldOfView { } pub fn new(global: &Window, fov: WebVRFieldOfView) -> DomRoot<VRFieldOfView> { - reflect_dom_object( - Box::new(VRFieldOfView::new_inherited(fov)), - global, - VRFieldOfViewBinding::Wrap, - ) + reflect_dom_object(Box::new(VRFieldOfView::new_inherited(fov)), global) } } diff --git a/components/script/dom/vrframedata.rs b/components/script/dom/vrframedata.rs index 32af3b394ef..bd81d0a41bf 100644 --- a/components/script/dom/vrframedata.rs +++ b/components/script/dom/vrframedata.rs @@ -3,7 +3,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::codegen::Bindings::PerformanceBinding::DOMHighResTimeStamp; -use crate::dom::bindings::codegen::Bindings::VRFrameDataBinding; use crate::dom::bindings::codegen::Bindings::VRFrameDataBinding::VRFrameDataMethods; use crate::dom::bindings::error::Fallible; use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector}; @@ -58,11 +57,7 @@ impl VRFrameData { ]; let pose = VRPose::new(&global, &Default::default()); - let root = reflect_dom_object( - Box::new(VRFrameData::new_inherited(&pose)), - global, - VRFrameDataBinding::Wrap, - ); + let root = reflect_dom_object(Box::new(VRFrameData::new_inherited(&pose)), global); let cx = global.get_cx(); create_typed_array(cx, &matrix, &root.left_proj); create_typed_array(cx, &matrix, &root.left_view); diff --git a/components/script/dom/vrpose.rs b/components/script/dom/vrpose.rs index 2303641d6eb..209e02fde81 100644 --- a/components/script/dom/vrpose.rs +++ b/components/script/dom/vrpose.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::VRPoseBinding; use crate::dom::bindings::codegen::Bindings::VRPoseBinding::VRPoseMethods; use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector}; use crate::dom::bindings::root::DomRoot; @@ -82,11 +81,7 @@ impl VRPose { } pub fn new(global: &GlobalScope, pose: &webvr::VRPose) -> DomRoot<VRPose> { - let root = reflect_dom_object( - Box::new(VRPose::new_inherited()), - global, - VRPoseBinding::Wrap, - ); + let root = reflect_dom_object(Box::new(VRPose::new_inherited()), global); root.update(&pose); root } diff --git a/components/script/dom/vrstageparameters.rs b/components/script/dom/vrstageparameters.rs index e9df89364c4..4cc3ac4ed7c 100644 --- a/components/script/dom/vrstageparameters.rs +++ b/components/script/dom/vrstageparameters.rs @@ -3,7 +3,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::cell::DomRefCell; -use crate::dom::bindings::codegen::Bindings::VRStageParametersBinding; use crate::dom::bindings::codegen::Bindings::VRStageParametersBinding::VRStageParametersMethods; use crate::dom::bindings::num::Finite; use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector}; @@ -52,7 +51,6 @@ impl VRStageParameters { let stage_parameters = reflect_dom_object( Box::new(VRStageParameters::new_inherited(parameters)), global, - VRStageParametersBinding::Wrap, ); stage_parameters.transform.set(array.get()); diff --git a/components/script/dom/vttcue.rs b/components/script/dom/vttcue.rs index 82ffb36c473..28c9cd22e33 100644 --- a/components/script/dom/vttcue.rs +++ b/components/script/dom/vttcue.rs @@ -66,7 +66,6 @@ impl VTTCue { reflect_dom_object( Box::new(Self::new_inherited(start_time, end_time, text)), global, - VTTCueBinding::Wrap, ) } diff --git a/components/script/dom/vttregion.rs b/components/script/dom/vttregion.rs index 167e9fa37bf..987af730f14 100644 --- a/components/script/dom/vttregion.rs +++ b/components/script/dom/vttregion.rs @@ -3,9 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::cell::DomRefCell; -use crate::dom::bindings::codegen::Bindings::VTTRegionBinding::{ - self, ScrollSetting, VTTRegionMethods, -}; +use crate::dom::bindings::codegen::Bindings::VTTRegionBinding::{ScrollSetting, VTTRegionMethods}; use crate::dom::bindings::error::{Error, ErrorResult, Fallible}; use crate::dom::bindings::num::Finite; use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector}; @@ -45,11 +43,7 @@ impl VTTRegion { } pub fn new(global: &GlobalScope) -> DomRoot<Self> { - reflect_dom_object( - Box::new(Self::new_inherited()), - global, - VTTRegionBinding::Wrap, - ) + reflect_dom_object(Box::new(Self::new_inherited()), global) } #[allow(non_snake_case)] diff --git a/components/script/dom/webgl2renderingcontext.rs b/components/script/dom/webgl2renderingcontext.rs index 7b1a68b475a..fef9b062123 100644 --- a/components/script/dom/webgl2renderingcontext.rs +++ b/components/script/dom/webgl2renderingcontext.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::WebGL2RenderingContextBinding; use crate::dom::bindings::codegen::Bindings::WebGL2RenderingContextBinding::WebGL2RenderingContextConstants as constants; use crate::dom::bindings::codegen::Bindings::WebGL2RenderingContextBinding::WebGL2RenderingContextMethods; use crate::dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLContextAttributes; @@ -176,9 +175,8 @@ impl WebGL2RenderingContext { size: Size2D<u32>, attrs: GLContextAttributes, ) -> Option<DomRoot<WebGL2RenderingContext>> { - WebGL2RenderingContext::new_inherited(window, canvas, size, attrs).map(|ctx| { - reflect_dom_object(Box::new(ctx), window, WebGL2RenderingContextBinding::Wrap) - }) + WebGL2RenderingContext::new_inherited(window, canvas, size, attrs) + .map(|ctx| reflect_dom_object(Box::new(ctx), window)) } } diff --git a/components/script/dom/webgl_extensions/ext/angleinstancedarrays.rs b/components/script/dom/webgl_extensions/ext/angleinstancedarrays.rs index ddea5daa043..4d03f25781b 100644 --- a/components/script/dom/webgl_extensions/ext/angleinstancedarrays.rs +++ b/components/script/dom/webgl_extensions/ext/angleinstancedarrays.rs @@ -3,7 +3,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use super::{WebGLExtension, WebGLExtensionSpec, WebGLExtensions}; -use crate::dom::bindings::codegen::Bindings::ANGLEInstancedArraysBinding; use crate::dom::bindings::codegen::Bindings::ANGLEInstancedArraysBinding::ANGLEInstancedArraysConstants; use crate::dom::bindings::codegen::Bindings::ANGLEInstancedArraysBinding::ANGLEInstancedArraysMethods; use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector}; @@ -34,7 +33,6 @@ impl WebGLExtension for ANGLEInstancedArrays { reflect_dom_object( Box::new(ANGLEInstancedArrays::new_inherited(ctx)), &*ctx.global(), - ANGLEInstancedArraysBinding::Wrap, ) } diff --git a/components/script/dom/webgl_extensions/ext/extblendminmax.rs b/components/script/dom/webgl_extensions/ext/extblendminmax.rs index 149ef10b2dc..122aac6c861 100644 --- a/components/script/dom/webgl_extensions/ext/extblendminmax.rs +++ b/components/script/dom/webgl_extensions/ext/extblendminmax.rs @@ -3,7 +3,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use super::{WebGLExtension, WebGLExtensionSpec, WebGLExtensions}; -use crate::dom::bindings::codegen::Bindings::EXTBlendMinmaxBinding; use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector}; use crate::dom::bindings::root::DomRoot; use crate::dom::webglrenderingcontext::WebGLRenderingContext; @@ -27,11 +26,7 @@ impl WebGLExtension for EXTBlendMinmax { type Extension = Self; fn new(ctx: &WebGLRenderingContext) -> DomRoot<Self> { - reflect_dom_object( - Box::new(Self::new_inherited()), - &*ctx.global(), - EXTBlendMinmaxBinding::Wrap, - ) + reflect_dom_object(Box::new(Self::new_inherited()), &*ctx.global()) } fn spec() -> WebGLExtensionSpec { diff --git a/components/script/dom/webgl_extensions/ext/extcolorbufferhalffloat.rs b/components/script/dom/webgl_extensions/ext/extcolorbufferhalffloat.rs index 2785fcac2d1..bb4a630d537 100644 --- a/components/script/dom/webgl_extensions/ext/extcolorbufferhalffloat.rs +++ b/components/script/dom/webgl_extensions/ext/extcolorbufferhalffloat.rs @@ -3,7 +3,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use super::{WebGLExtension, WebGLExtensionSpec, WebGLExtensions}; -use crate::dom::bindings::codegen::Bindings::EXTColorBufferHalfFloatBinding; use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector}; use crate::dom::bindings::root::DomRoot; use crate::dom::webgl_extensions::ext::oestexturehalffloat::OESTextureHalfFloat; @@ -30,7 +29,6 @@ impl WebGLExtension for EXTColorBufferHalfFloat { reflect_dom_object( Box::new(EXTColorBufferHalfFloat::new_inherited()), &*ctx.global(), - EXTColorBufferHalfFloatBinding::Wrap, ) } diff --git a/components/script/dom/webgl_extensions/ext/extshadertexturelod.rs b/components/script/dom/webgl_extensions/ext/extshadertexturelod.rs index 3ace3673499..ea68b518dac 100644 --- a/components/script/dom/webgl_extensions/ext/extshadertexturelod.rs +++ b/components/script/dom/webgl_extensions/ext/extshadertexturelod.rs @@ -3,7 +3,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use super::{WebGLExtension, WebGLExtensionSpec, WebGLExtensions}; -use crate::dom::bindings::codegen::Bindings::EXTShaderTextureLodBinding; use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector}; use crate::dom::bindings::root::DomRoot; use crate::dom::webglrenderingcontext::WebGLRenderingContext; @@ -27,11 +26,7 @@ impl WebGLExtension for EXTShaderTextureLod { type Extension = Self; fn new(ctx: &WebGLRenderingContext) -> DomRoot<Self> { - reflect_dom_object( - Box::new(Self::new_inherited()), - &*ctx.global(), - EXTShaderTextureLodBinding::Wrap, - ) + reflect_dom_object(Box::new(Self::new_inherited()), &*ctx.global()) } fn spec() -> WebGLExtensionSpec { diff --git a/components/script/dom/webgl_extensions/ext/exttexturefilteranisotropic.rs b/components/script/dom/webgl_extensions/ext/exttexturefilteranisotropic.rs index b8d987c2839..89a4d3ed6a4 100644 --- a/components/script/dom/webgl_extensions/ext/exttexturefilteranisotropic.rs +++ b/components/script/dom/webgl_extensions/ext/exttexturefilteranisotropic.rs @@ -3,7 +3,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use super::{WebGLExtension, WebGLExtensionSpec, WebGLExtensions}; -use crate::dom::bindings::codegen::Bindings::EXTTextureFilterAnisotropicBinding; use crate::dom::bindings::codegen::Bindings::EXTTextureFilterAnisotropicBinding::EXTTextureFilterAnisotropicConstants; use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector}; use crate::dom::bindings::root::DomRoot; @@ -28,11 +27,7 @@ impl WebGLExtension for EXTTextureFilterAnisotropic { type Extension = EXTTextureFilterAnisotropic; fn new(ctx: &WebGLRenderingContext) -> DomRoot<Self> { - reflect_dom_object( - Box::new(Self::new_inherited()), - &*ctx.global(), - EXTTextureFilterAnisotropicBinding::Wrap, - ) + reflect_dom_object(Box::new(Self::new_inherited()), &*ctx.global()) } fn spec() -> WebGLExtensionSpec { diff --git a/components/script/dom/webgl_extensions/ext/oeselementindexuint.rs b/components/script/dom/webgl_extensions/ext/oeselementindexuint.rs index 6d6112529b9..096c22d3dc5 100644 --- a/components/script/dom/webgl_extensions/ext/oeselementindexuint.rs +++ b/components/script/dom/webgl_extensions/ext/oeselementindexuint.rs @@ -3,7 +3,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use super::{WebGLExtension, WebGLExtensionSpec, WebGLExtensions}; -use crate::dom::bindings::codegen::Bindings::OESElementIndexUintBinding; use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector}; use crate::dom::bindings::root::DomRoot; use crate::dom::webglrenderingcontext::WebGLRenderingContext; @@ -30,7 +29,6 @@ impl WebGLExtension for OESElementIndexUint { reflect_dom_object( Box::new(OESElementIndexUint::new_inherited()), &*ctx.global(), - OESElementIndexUintBinding::Wrap, ) } diff --git a/components/script/dom/webgl_extensions/ext/oesstandardderivatives.rs b/components/script/dom/webgl_extensions/ext/oesstandardderivatives.rs index b6945123a12..dfafa7051a5 100644 --- a/components/script/dom/webgl_extensions/ext/oesstandardderivatives.rs +++ b/components/script/dom/webgl_extensions/ext/oesstandardderivatives.rs @@ -3,7 +3,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use super::{WebGLExtension, WebGLExtensionSpec, WebGLExtensions}; -use crate::dom::bindings::codegen::Bindings::OESStandardDerivativesBinding; use crate::dom::bindings::codegen::Bindings::OESStandardDerivativesBinding::OESStandardDerivativesConstants; use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector}; use crate::dom::bindings::root::DomRoot; @@ -30,7 +29,6 @@ impl WebGLExtension for OESStandardDerivatives { reflect_dom_object( Box::new(OESStandardDerivatives::new_inherited()), &*ctx.global(), - OESStandardDerivativesBinding::Wrap, ) } diff --git a/components/script/dom/webgl_extensions/ext/oestexturefloat.rs b/components/script/dom/webgl_extensions/ext/oestexturefloat.rs index b3461f9876c..fbcfcdeafeb 100644 --- a/components/script/dom/webgl_extensions/ext/oestexturefloat.rs +++ b/components/script/dom/webgl_extensions/ext/oestexturefloat.rs @@ -5,7 +5,6 @@ use super::{ constants as webgl, ext_constants as gl, WebGLExtension, WebGLExtensionSpec, WebGLExtensions, }; -use crate::dom::bindings::codegen::Bindings::OESTextureFloatBinding; use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector}; use crate::dom::bindings::root::DomRoot; use crate::dom::webglrenderingcontext::WebGLRenderingContext; @@ -28,11 +27,7 @@ impl OESTextureFloat { impl WebGLExtension for OESTextureFloat { type Extension = OESTextureFloat; fn new(ctx: &WebGLRenderingContext) -> DomRoot<OESTextureFloat> { - reflect_dom_object( - Box::new(OESTextureFloat::new_inherited()), - &*ctx.global(), - OESTextureFloatBinding::Wrap, - ) + reflect_dom_object(Box::new(OESTextureFloat::new_inherited()), &*ctx.global()) } fn spec() -> WebGLExtensionSpec { diff --git a/components/script/dom/webgl_extensions/ext/oestexturefloatlinear.rs b/components/script/dom/webgl_extensions/ext/oestexturefloatlinear.rs index 47b538eb8e0..9e5c021f0ef 100644 --- a/components/script/dom/webgl_extensions/ext/oestexturefloatlinear.rs +++ b/components/script/dom/webgl_extensions/ext/oestexturefloatlinear.rs @@ -3,7 +3,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use super::{constants as webgl, WebGLExtension, WebGLExtensionSpec, WebGLExtensions}; -use crate::dom::bindings::codegen::Bindings::OESTextureFloatLinearBinding; use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector}; use crate::dom::bindings::root::DomRoot; use crate::dom::webglrenderingcontext::WebGLRenderingContext; @@ -28,7 +27,6 @@ impl WebGLExtension for OESTextureFloatLinear { reflect_dom_object( Box::new(OESTextureFloatLinear::new_inherited()), &*ctx.global(), - OESTextureFloatLinearBinding::Wrap, ) } diff --git a/components/script/dom/webgl_extensions/ext/oestexturehalffloat.rs b/components/script/dom/webgl_extensions/ext/oestexturehalffloat.rs index bff4f76294d..734aedf535c 100644 --- a/components/script/dom/webgl_extensions/ext/oestexturehalffloat.rs +++ b/components/script/dom/webgl_extensions/ext/oestexturehalffloat.rs @@ -5,9 +5,7 @@ use super::{ constants as webgl, ext_constants as gl, WebGLExtension, WebGLExtensionSpec, WebGLExtensions, }; -use crate::dom::bindings::codegen::Bindings::OESTextureHalfFloatBinding::{ - self, OESTextureHalfFloatConstants, -}; +use crate::dom::bindings::codegen::Bindings::OESTextureHalfFloatBinding::OESTextureHalfFloatConstants; use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector}; use crate::dom::bindings::root::DomRoot; use crate::dom::webglrenderingcontext::WebGLRenderingContext; @@ -33,7 +31,6 @@ impl WebGLExtension for OESTextureHalfFloat { reflect_dom_object( Box::new(OESTextureHalfFloat::new_inherited()), &*ctx.global(), - OESTextureHalfFloatBinding::Wrap, ) } diff --git a/components/script/dom/webgl_extensions/ext/oestexturehalffloatlinear.rs b/components/script/dom/webgl_extensions/ext/oestexturehalffloatlinear.rs index 80e03381950..a1e5f3bf15d 100644 --- a/components/script/dom/webgl_extensions/ext/oestexturehalffloatlinear.rs +++ b/components/script/dom/webgl_extensions/ext/oestexturehalffloatlinear.rs @@ -4,7 +4,6 @@ use super::{WebGLExtension, WebGLExtensionSpec, WebGLExtensions}; use crate::dom::bindings::codegen::Bindings::OESTextureHalfFloatBinding::OESTextureHalfFloatConstants; -use crate::dom::bindings::codegen::Bindings::OESTextureHalfFloatLinearBinding; use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector}; use crate::dom::bindings::root::DomRoot; use crate::dom::webglrenderingcontext::WebGLRenderingContext; @@ -29,7 +28,6 @@ impl WebGLExtension for OESTextureHalfFloatLinear { reflect_dom_object( Box::new(OESTextureHalfFloatLinear::new_inherited()), &*ctx.global(), - OESTextureHalfFloatLinearBinding::Wrap, ) } diff --git a/components/script/dom/webgl_extensions/ext/oesvertexarrayobject.rs b/components/script/dom/webgl_extensions/ext/oesvertexarrayobject.rs index d4f2dda95cb..57a68142609 100644 --- a/components/script/dom/webgl_extensions/ext/oesvertexarrayobject.rs +++ b/components/script/dom/webgl_extensions/ext/oesvertexarrayobject.rs @@ -4,9 +4,7 @@ use super::{WebGLExtension, WebGLExtensionSpec, WebGLExtensions}; use crate::dom::bindings::codegen::Bindings::OESVertexArrayObjectBinding::OESVertexArrayObjectConstants; -use crate::dom::bindings::codegen::Bindings::OESVertexArrayObjectBinding::{ - self, OESVertexArrayObjectMethods, -}; +use crate::dom::bindings::codegen::Bindings::OESVertexArrayObjectBinding::OESVertexArrayObjectMethods; use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector}; use crate::dom::bindings::root::{Dom, DomRoot}; use crate::dom::webglrenderingcontext::WebGLRenderingContext; @@ -57,7 +55,6 @@ impl WebGLExtension for OESVertexArrayObject { reflect_dom_object( Box::new(OESVertexArrayObject::new_inherited(ctx)), &*ctx.global(), - OESVertexArrayObjectBinding::Wrap, ) } diff --git a/components/script/dom/webgl_extensions/ext/webglcolorbufferfloat.rs b/components/script/dom/webgl_extensions/ext/webglcolorbufferfloat.rs index 0ac480e9344..c0d8dc13776 100644 --- a/components/script/dom/webgl_extensions/ext/webglcolorbufferfloat.rs +++ b/components/script/dom/webgl_extensions/ext/webglcolorbufferfloat.rs @@ -3,7 +3,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use super::{WebGLExtension, WebGLExtensionSpec, WebGLExtensions}; -use crate::dom::bindings::codegen::Bindings::WEBGLColorBufferFloatBinding; use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector}; use crate::dom::bindings::root::DomRoot; use crate::dom::webgl_extensions::ext::oestexturefloat::OESTextureFloat; @@ -30,7 +29,6 @@ impl WebGLExtension for WEBGLColorBufferFloat { reflect_dom_object( Box::new(WEBGLColorBufferFloat::new_inherited()), &*ctx.global(), - WEBGLColorBufferFloatBinding::Wrap, ) } diff --git a/components/script/dom/webgl_extensions/ext/webglcompressedtextureetc1.rs b/components/script/dom/webgl_extensions/ext/webglcompressedtextureetc1.rs index 29805fd4bdd..749c38abd82 100644 --- a/components/script/dom/webgl_extensions/ext/webglcompressedtextureetc1.rs +++ b/components/script/dom/webgl_extensions/ext/webglcompressedtextureetc1.rs @@ -3,7 +3,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use super::{WebGLExtension, WebGLExtensionSpec, WebGLExtensions}; -use crate::dom::bindings::codegen::Bindings::WEBGLCompressedTextureETC1Binding; use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector}; use crate::dom::bindings::root::DomRoot; use crate::dom::webglrenderingcontext::WebGLRenderingContext; @@ -30,7 +29,6 @@ impl WebGLExtension for WEBGLCompressedTextureETC1 { reflect_dom_object( Box::new(WEBGLCompressedTextureETC1::new_inherited()), &*ctx.global(), - WEBGLCompressedTextureETC1Binding::Wrap, ) } diff --git a/components/script/dom/webgl_extensions/ext/webglcompressedtextures3tc.rs b/components/script/dom/webgl_extensions/ext/webglcompressedtextures3tc.rs index 0e4385abd6b..362dbe67117 100644 --- a/components/script/dom/webgl_extensions/ext/webglcompressedtextures3tc.rs +++ b/components/script/dom/webgl_extensions/ext/webglcompressedtextures3tc.rs @@ -3,7 +3,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use super::{WebGLExtension, WebGLExtensionSpec, WebGLExtensions}; -use crate::dom::bindings::codegen::Bindings::WEBGLCompressedTextureS3TCBinding; use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector}; use crate::dom::bindings::root::DomRoot; use crate::dom::webglrenderingcontext::WebGLRenderingContext; @@ -30,7 +29,6 @@ impl WebGLExtension for WEBGLCompressedTextureS3TC { reflect_dom_object( Box::new(WEBGLCompressedTextureS3TC::new_inherited()), &*ctx.global(), - WEBGLCompressedTextureS3TCBinding::Wrap, ) } diff --git a/components/script/dom/webglactiveinfo.rs b/components/script/dom/webglactiveinfo.rs index 79fec919971..93cc0274f35 100644 --- a/components/script/dom/webglactiveinfo.rs +++ b/components/script/dom/webglactiveinfo.rs @@ -3,7 +3,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://www.khronos.org/registry/webgl/specs/latest/1.0/webgl.idl -use crate::dom::bindings::codegen::Bindings::WebGLActiveInfoBinding; use crate::dom::bindings::codegen::Bindings::WebGLActiveInfoBinding::WebGLActiveInfoMethods; use crate::dom::bindings::reflector::{reflect_dom_object, Reflector}; use crate::dom::bindings::root::DomRoot; @@ -34,7 +33,6 @@ impl WebGLActiveInfo { reflect_dom_object( Box::new(WebGLActiveInfo::new_inherited(size, ty, name)), window, - WebGLActiveInfoBinding::Wrap, ) } } diff --git a/components/script/dom/webglbuffer.rs b/components/script/dom/webglbuffer.rs index 6e951f3f53e..d794171ad10 100644 --- a/components/script/dom/webglbuffer.rs +++ b/components/script/dom/webglbuffer.rs @@ -4,7 +4,6 @@ // https://www.khronos.org/registry/webgl/specs/latest/1.0/webgl.idl use crate::dom::bindings::codegen::Bindings::WebGL2RenderingContextBinding::WebGL2RenderingContextConstants; -use crate::dom::bindings::codegen::Bindings::WebGLBufferBinding; use crate::dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextConstants; use crate::dom::bindings::inheritance::Castable; use crate::dom::bindings::reflector::{reflect_dom_object, DomObject}; @@ -61,7 +60,6 @@ impl WebGLBuffer { reflect_dom_object( Box::new(WebGLBuffer::new_inherited(context, id)), &*context.global(), - WebGLBufferBinding::Wrap, ) } } diff --git a/components/script/dom/webglcontextevent.rs b/components/script/dom/webglcontextevent.rs index f9714fc37e9..95e83cbf3a5 100644 --- a/components/script/dom/webglcontextevent.rs +++ b/components/script/dom/webglcontextevent.rs @@ -3,7 +3,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::codegen::Bindings::EventBinding::EventMethods; -use crate::dom::bindings::codegen::Bindings::WebGLContextEventBinding; use crate::dom::bindings::codegen::Bindings::WebGLContextEventBinding::WebGLContextEventInit; use crate::dom::bindings::codegen::Bindings::WebGLContextEventBinding::WebGLContextEventMethods; use crate::dom::bindings::error::Fallible; @@ -52,7 +51,6 @@ impl WebGLContextEvent { let event = reflect_dom_object( Box::new(WebGLContextEvent::new_inherited(status_message)), window, - WebGLContextEventBinding::Wrap, ); { diff --git a/components/script/dom/webglframebuffer.rs b/components/script/dom/webglframebuffer.rs index f3f6e939f4f..1e4b75ac86d 100644 --- a/components/script/dom/webglframebuffer.rs +++ b/components/script/dom/webglframebuffer.rs @@ -5,7 +5,6 @@ // https://www.khronos.org/registry/webgl/specs/latest/1.0/webgl.idl use crate::dom::bindings::cell::DomRefCell; use crate::dom::bindings::codegen::Bindings::WebGL2RenderingContextBinding::WebGL2RenderingContextConstants as constants; -use crate::dom::bindings::codegen::Bindings::WebGLFramebufferBinding; use crate::dom::bindings::inheritance::Castable; use crate::dom::bindings::reflector::{reflect_dom_object, DomObject}; use crate::dom::bindings::root::{Dom, DomRoot, MutNullableDom}; @@ -165,7 +164,6 @@ impl WebGLFramebuffer { reflect_dom_object( Box::new(WebGLFramebuffer::new_inherited(context, id)), &*context.global(), - WebGLFramebufferBinding::Wrap, ) } } diff --git a/components/script/dom/webglprogram.rs b/components/script/dom/webglprogram.rs index 4bb59fb1428..d3a726c1e11 100644 --- a/components/script/dom/webglprogram.rs +++ b/components/script/dom/webglprogram.rs @@ -5,7 +5,6 @@ // https://www.khronos.org/registry/webgl/specs/latest/1.0/webgl.idl use crate::dom::bindings::cell::{DomRefCell, Ref}; use crate::dom::bindings::codegen::Bindings::WebGL2RenderingContextBinding::WebGL2RenderingContextConstants as constants2; -use crate::dom::bindings::codegen::Bindings::WebGLProgramBinding; use crate::dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextConstants as constants; use crate::dom::bindings::inheritance::Castable; use crate::dom::bindings::reflector::{reflect_dom_object, DomObject}; @@ -75,7 +74,6 @@ impl WebGLProgram { reflect_dom_object( Box::new(WebGLProgram::new_inherited(context, id)), &*context.global(), - WebGLProgramBinding::Wrap, ) } } diff --git a/components/script/dom/webglquery.rs b/components/script/dom/webglquery.rs index c3cd4e9e08c..d7418471936 100644 --- a/components/script/dom/webglquery.rs +++ b/components/script/dom/webglquery.rs @@ -3,7 +3,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::codegen::Bindings::WebGL2RenderingContextBinding::WebGL2RenderingContextConstants as constants; -use crate::dom::bindings::codegen::Bindings::WebGLQueryBinding; use crate::dom::bindings::inheritance::Castable; use crate::dom::bindings::refcounted::Trusted; use crate::dom::bindings::reflector::{reflect_dom_object, DomObject}; @@ -46,7 +45,6 @@ impl WebGLQuery { reflect_dom_object( Box::new(Self::new_inherited(context, id)), &*context.global(), - WebGLQueryBinding::Wrap, ) } diff --git a/components/script/dom/webglrenderbuffer.rs b/components/script/dom/webglrenderbuffer.rs index 71e56bac1d3..51f1bdbad4e 100644 --- a/components/script/dom/webglrenderbuffer.rs +++ b/components/script/dom/webglrenderbuffer.rs @@ -6,7 +6,6 @@ use crate::dom::bindings::codegen::Bindings::EXTColorBufferHalfFloatBinding::EXTColorBufferHalfFloatConstants; use crate::dom::bindings::codegen::Bindings::WEBGLColorBufferFloatBinding::WEBGLColorBufferFloatConstants; use crate::dom::bindings::codegen::Bindings::WebGL2RenderingContextBinding::WebGL2RenderingContextConstants as constants; -use crate::dom::bindings::codegen::Bindings::WebGLRenderbufferBinding; use crate::dom::bindings::inheritance::Castable; use crate::dom::bindings::reflector::{reflect_dom_object, DomObject}; use crate::dom::bindings::root::{DomRoot, MutNullableDom}; @@ -59,7 +58,6 @@ impl WebGLRenderbuffer { reflect_dom_object( Box::new(WebGLRenderbuffer::new_inherited(context, id)), &*context.global(), - WebGLRenderbufferBinding::Wrap, ) } } diff --git a/components/script/dom/webglrenderingcontext.rs b/components/script/dom/webglrenderingcontext.rs index 25e5bf4baa1..dab9cf6dcf1 100644 --- a/components/script/dom/webglrenderingcontext.rs +++ b/components/script/dom/webglrenderingcontext.rs @@ -6,7 +6,6 @@ use crate::dom::bindings::cell::Ref; use crate::dom::bindings::codegen::Bindings::ANGLEInstancedArraysBinding::ANGLEInstancedArraysConstants; use crate::dom::bindings::codegen::Bindings::EXTBlendMinmaxBinding::EXTBlendMinmaxConstants; use crate::dom::bindings::codegen::Bindings::OESVertexArrayObjectBinding::OESVertexArrayObjectConstants; -use crate::dom::bindings::codegen::Bindings::WebGLRenderingContextBinding; use crate::dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::TexImageSource; use crate::dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLContextAttributes; use crate::dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextConstants as constants; @@ -264,11 +263,7 @@ impl WebGLRenderingContext { attrs: GLContextAttributes, ) -> Option<DomRoot<WebGLRenderingContext>> { match WebGLRenderingContext::new_inherited(window, canvas, webgl_version, size, attrs) { - Ok(ctx) => Some(reflect_dom_object( - Box::new(ctx), - window, - WebGLRenderingContextBinding::Wrap, - )), + Ok(ctx) => Some(reflect_dom_object(Box::new(ctx), window)), Err(msg) => { error!("Couldn't create WebGLRenderingContext: {}", msg); let event = WebGLContextEvent::new( diff --git a/components/script/dom/webglsampler.rs b/components/script/dom/webglsampler.rs index 4689677c9bd..c80e2a6a508 100644 --- a/components/script/dom/webglsampler.rs +++ b/components/script/dom/webglsampler.rs @@ -3,7 +3,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::codegen::Bindings::WebGL2RenderingContextBinding::WebGL2RenderingContextConstants as constants; -use crate::dom::bindings::codegen::Bindings::WebGLSamplerBinding; use crate::dom::bindings::inheritance::Castable; use crate::dom::bindings::reflector::{reflect_dom_object, DomObject}; use crate::dom::bindings::root::DomRoot; @@ -88,7 +87,6 @@ impl WebGLSampler { reflect_dom_object( Box::new(Self::new_inherited(context, id)), &*context.global(), - WebGLSamplerBinding::Wrap, ) } diff --git a/components/script/dom/webglshader.rs b/components/script/dom/webglshader.rs index d8278b1ee5a..5302c6c78ad 100644 --- a/components/script/dom/webglshader.rs +++ b/components/script/dom/webglshader.rs @@ -4,7 +4,6 @@ // https://www.khronos.org/registry/webgl/specs/latest/1.0/webgl.idl use crate::dom::bindings::cell::DomRefCell; -use crate::dom::bindings::codegen::Bindings::WebGLShaderBinding; use crate::dom::bindings::inheritance::Castable; use crate::dom::bindings::reflector::{reflect_dom_object, DomObject}; use crate::dom::bindings::root::DomRoot; @@ -76,7 +75,6 @@ impl WebGLShader { reflect_dom_object( Box::new(WebGLShader::new_inherited(context, id, shader_type)), &*context.global(), - WebGLShaderBinding::Wrap, ) } } diff --git a/components/script/dom/webglshaderprecisionformat.rs b/components/script/dom/webglshaderprecisionformat.rs index f40e6edfeb9..e1a7202ff8d 100644 --- a/components/script/dom/webglshaderprecisionformat.rs +++ b/components/script/dom/webglshaderprecisionformat.rs @@ -5,7 +5,6 @@ #![allow(dead_code)] // https://www.khronos.org/registry/webgl/specs/latest/1.0/webgl.idl -use crate::dom::bindings::codegen::Bindings::WebGLShaderPrecisionFormatBinding; use crate::dom::bindings::codegen::Bindings::WebGLShaderPrecisionFormatBinding::WebGLShaderPrecisionFormatMethods; use crate::dom::bindings::reflector::{reflect_dom_object, Reflector}; use crate::dom::bindings::root::DomRoot; @@ -41,7 +40,6 @@ impl WebGLShaderPrecisionFormat { range_min, range_max, precision, )), window, - WebGLShaderPrecisionFormatBinding::Wrap, ) } } diff --git a/components/script/dom/webglsync.rs b/components/script/dom/webglsync.rs index 7f1fec355f9..dd6acb5be9a 100644 --- a/components/script/dom/webglsync.rs +++ b/components/script/dom/webglsync.rs @@ -3,7 +3,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::codegen::Bindings::WebGL2RenderingContextBinding::WebGL2RenderingContextConstants as constants; -use crate::dom::bindings::codegen::Bindings::WebGLSyncBinding; use crate::dom::bindings::inheritance::Castable; use crate::dom::bindings::refcounted::Trusted; use crate::dom::bindings::reflector::{reflect_dom_object, DomObject}; @@ -43,7 +42,6 @@ impl WebGLSync { reflect_dom_object( Box::new(WebGLSync::new_inherited(context, sync_id)), &*context.global(), - WebGLSyncBinding::Wrap, ) } } diff --git a/components/script/dom/webgltexture.rs b/components/script/dom/webgltexture.rs index 682f04f0bd8..682920df96e 100644 --- a/components/script/dom/webgltexture.rs +++ b/components/script/dom/webgltexture.rs @@ -7,7 +7,6 @@ use crate::dom::bindings::cell::DomRefCell; use crate::dom::bindings::codegen::Bindings::EXTTextureFilterAnisotropicBinding::EXTTextureFilterAnisotropicConstants; use crate::dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextConstants as constants; -use crate::dom::bindings::codegen::Bindings::WebGLTextureBinding; use crate::dom::bindings::inheritance::Castable; use crate::dom::bindings::reflector::{reflect_dom_object, DomObject}; use crate::dom::bindings::root::{DomRoot, MutNullableDom}; @@ -83,7 +82,6 @@ impl WebGLTexture { reflect_dom_object( Box::new(WebGLTexture::new_inherited(context, id)), &*context.global(), - WebGLTextureBinding::Wrap, ) } } diff --git a/components/script/dom/webgltransformfeedback.rs b/components/script/dom/webgltransformfeedback.rs index a58a8e43577..fe4b0753843 100644 --- a/components/script/dom/webgltransformfeedback.rs +++ b/components/script/dom/webgltransformfeedback.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::WebGLTransformFeedbackBinding; use crate::dom::bindings::inheritance::Castable; use crate::dom::bindings::reflector::{reflect_dom_object, DomObject}; use crate::dom::bindings::root::DomRoot; @@ -42,7 +41,6 @@ impl WebGLTransformFeedback { reflect_dom_object( Box::new(WebGLTransformFeedback::new_inherited(context, id)), &*context.global(), - WebGLTransformFeedbackBinding::Wrap, ) } } diff --git a/components/script/dom/webgluniformlocation.rs b/components/script/dom/webgluniformlocation.rs index 5bdc661f17a..153b2e651ba 100644 --- a/components/script/dom/webgluniformlocation.rs +++ b/components/script/dom/webgluniformlocation.rs @@ -3,7 +3,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://www.khronos.org/registry/webgl/specs/latest/1.0/webgl.idl -use crate::dom::bindings::codegen::Bindings::WebGLUniformLocationBinding; use crate::dom::bindings::reflector::{reflect_dom_object, Reflector}; use crate::dom::bindings::root::DomRoot; use crate::dom::window::Window; @@ -61,7 +60,6 @@ impl WebGLUniformLocation { type_, )), window, - WebGLUniformLocationBinding::Wrap, ) } diff --git a/components/script/dom/webglvertexarrayobject.rs b/components/script/dom/webglvertexarrayobject.rs index 48355d05557..098423d860a 100644 --- a/components/script/dom/webglvertexarrayobject.rs +++ b/components/script/dom/webglvertexarrayobject.rs @@ -3,7 +3,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::cell::Ref; -use crate::dom::bindings::codegen::Bindings::WebGLVertexArrayObjectBinding; use crate::dom::bindings::reflector::{reflect_dom_object, DomObject}; use crate::dom::bindings::root::{DomRoot, MutNullableDom}; use crate::dom::vertexarrayobject::{VertexArrayObject, VertexAttribData}; @@ -31,7 +30,6 @@ impl WebGLVertexArrayObject { reflect_dom_object( Box::new(WebGLVertexArrayObject::new_inherited(context, id)), &*context.global(), - WebGLVertexArrayObjectBinding::Wrap, ) } diff --git a/components/script/dom/webglvertexarrayobjectoes.rs b/components/script/dom/webglvertexarrayobjectoes.rs index 2c03f084031..a3861c50110 100644 --- a/components/script/dom/webglvertexarrayobjectoes.rs +++ b/components/script/dom/webglvertexarrayobjectoes.rs @@ -3,7 +3,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::cell::Ref; -use crate::dom::bindings::codegen::Bindings::WebGLVertexArrayObjectOESBinding; use crate::dom::bindings::reflector::{reflect_dom_object, DomObject}; use crate::dom::bindings::root::{DomRoot, MutNullableDom}; use crate::dom::vertexarrayobject::{VertexArrayObject, VertexAttribData}; @@ -31,7 +30,6 @@ impl WebGLVertexArrayObjectOES { reflect_dom_object( Box::new(WebGLVertexArrayObjectOES::new_inherited(context, id)), &*context.global(), - WebGLVertexArrayObjectOESBinding::Wrap, ) } diff --git a/components/script/dom/websocket.rs b/components/script/dom/websocket.rs index 2354bdef91f..89aeda77ebd 100644 --- a/components/script/dom/websocket.rs +++ b/components/script/dom/websocket.rs @@ -4,7 +4,6 @@ use crate::dom::bindings::cell::DomRefCell; use crate::dom::bindings::codegen::Bindings::BlobBinding::BlobMethods; -use crate::dom::bindings::codegen::Bindings::WebSocketBinding; use crate::dom::bindings::codegen::Bindings::WebSocketBinding::{BinaryType, WebSocketMethods}; use crate::dom::bindings::codegen::UnionTypes::StringOrStringSequence; use crate::dom::bindings::conversions::ToJSValConvertible; @@ -135,11 +134,7 @@ impl WebSocket { url: ServoUrl, sender: IpcSender<WebSocketDomAction>, ) -> DomRoot<WebSocket> { - reflect_dom_object( - Box::new(WebSocket::new_inherited(url, sender)), - global, - WebSocketBinding::Wrap, - ) + reflect_dom_object(Box::new(WebSocket::new_inherited(url, sender)), global) } /// <https://html.spec.whatwg.org/multipage/#dom-websocket> diff --git a/components/script/dom/wheelevent.rs b/components/script/dom/wheelevent.rs index 8b8ef288282..d7e33b84633 100644 --- a/components/script/dom/wheelevent.rs +++ b/components/script/dom/wheelevent.rs @@ -38,11 +38,7 @@ impl WheelEvent { } pub fn new_unintialized(window: &Window) -> DomRoot<WheelEvent> { - reflect_dom_object( - Box::new(WheelEvent::new_inherited()), - window, - WheelEventBinding::Wrap, - ) + reflect_dom_object(Box::new(WheelEvent::new_inherited()), window) } pub fn new( diff --git a/components/script/dom/worker.rs b/components/script/dom/worker.rs index 86fb9e57b40..d040d7d7468 100644 --- a/components/script/dom/worker.rs +++ b/components/script/dom/worker.rs @@ -5,7 +5,6 @@ use crate::dom::abstractworker::SimpleWorkerErrorHandler; use crate::dom::abstractworker::WorkerScriptMsg; use crate::dom::bindings::codegen::Bindings::MessagePortBinding::PostMessageOptions; -use crate::dom::bindings::codegen::Bindings::WorkerBinding; use crate::dom::bindings::codegen::Bindings::WorkerBinding::{WorkerMethods, WorkerOptions}; use crate::dom::bindings::error::{Error, ErrorResult, Fallible}; use crate::dom::bindings::inheritance::Castable; @@ -68,11 +67,7 @@ impl Worker { sender: Sender<DedicatedWorkerScriptMsg>, closing: Arc<AtomicBool>, ) -> DomRoot<Worker> { - reflect_dom_object( - Box::new(Worker::new_inherited(sender, closing)), - global, - WorkerBinding::Wrap, - ) + reflect_dom_object(Box::new(Worker::new_inherited(sender, closing)), global) } // https://html.spec.whatwg.org/multipage/#dom-worker diff --git a/components/script/dom/workerlocation.rs b/components/script/dom/workerlocation.rs index d96aea8011c..c3974e3e1ce 100644 --- a/components/script/dom/workerlocation.rs +++ b/components/script/dom/workerlocation.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::WorkerLocationBinding; use crate::dom::bindings::codegen::Bindings::WorkerLocationBinding::WorkerLocationMethods; use crate::dom::bindings::reflector::{reflect_dom_object, Reflector}; use crate::dom::bindings::root::DomRoot; @@ -28,11 +27,7 @@ impl WorkerLocation { } pub fn new(global: &WorkerGlobalScope, url: ServoUrl) -> DomRoot<WorkerLocation> { - reflect_dom_object( - Box::new(WorkerLocation::new_inherited(url)), - global, - WorkerLocationBinding::Wrap, - ) + reflect_dom_object(Box::new(WorkerLocation::new_inherited(url)), global) } // https://html.spec.whatwg.org/multipage/#dom-workerlocation-origin diff --git a/components/script/dom/workernavigator.rs b/components/script/dom/workernavigator.rs index cc1dfee13bd..2ff09c48807 100644 --- a/components/script/dom/workernavigator.rs +++ b/components/script/dom/workernavigator.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::WorkerNavigatorBinding; use crate::dom::bindings::codegen::Bindings::WorkerNavigatorBinding::WorkerNavigatorMethods; use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector}; use crate::dom::bindings::root::{DomRoot, MutNullableDom}; @@ -31,11 +30,7 @@ impl WorkerNavigator { } pub fn new(global: &WorkerGlobalScope) -> DomRoot<WorkerNavigator> { - reflect_dom_object( - Box::new(WorkerNavigator::new_inherited()), - global, - WorkerNavigatorBinding::Wrap, - ) + reflect_dom_object(Box::new(WorkerNavigator::new_inherited()), global) } } diff --git a/components/script/dom/worklet.rs b/components/script/dom/worklet.rs index 227d9d97c81..3e92e09257d 100644 --- a/components/script/dom/worklet.rs +++ b/components/script/dom/worklet.rs @@ -14,7 +14,6 @@ use crate::dom::bindings::codegen::Bindings::RequestBinding::RequestCredentials; use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowBinding::WindowMethods; use crate::dom::bindings::codegen::Bindings::WorkletBinding::WorkletMethods; use crate::dom::bindings::codegen::Bindings::WorkletBinding::WorkletOptions; -use crate::dom::bindings::codegen::Bindings::WorkletBinding::Wrap; use crate::dom::bindings::error::Error; use crate::dom::bindings::inheritance::Castable; use crate::dom::bindings::refcounted::TrustedPromise; @@ -95,7 +94,6 @@ impl Worklet { reflect_dom_object( Box::new(Worklet::new_inherited(window, global_type)), window, - Wrap, ) } diff --git a/components/script/dom/xmldocument.rs b/components/script/dom/xmldocument.rs index 73d7eee89c5..f4908922ec3 100644 --- a/components/script/dom/xmldocument.rs +++ b/components/script/dom/xmldocument.rs @@ -4,7 +4,7 @@ use crate::document_loader::DocumentLoader; use crate::dom::bindings::codegen::Bindings::DocumentBinding::DocumentMethods; -use crate::dom::bindings::codegen::Bindings::XMLDocumentBinding::{self, XMLDocumentMethods}; +use crate::dom::bindings::codegen::Bindings::XMLDocumentBinding::XMLDocumentMethods; use crate::dom::bindings::inheritance::Castable; use crate::dom::bindings::reflector::reflect_dom_object; use crate::dom::bindings::root::DomRoot; @@ -85,7 +85,6 @@ impl XMLDocument { doc_loader, )), window, - XMLDocumentBinding::Wrap, ); { let node = doc.upcast::<Node>(); diff --git a/components/script/dom/xmlhttprequest.rs b/components/script/dom/xmlhttprequest.rs index 6c531e5b4d6..5ab370feca8 100644 --- a/components/script/dom/xmlhttprequest.rs +++ b/components/script/dom/xmlhttprequest.rs @@ -6,7 +6,6 @@ use crate::document_loader::DocumentLoader; use crate::dom::bindings::cell::DomRefCell; use crate::dom::bindings::codegen::Bindings::BlobBinding::BlobBinding::BlobMethods; use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowMethods; -use crate::dom::bindings::codegen::Bindings::XMLHttpRequestBinding; use crate::dom::bindings::codegen::Bindings::XMLHttpRequestBinding::BodyInit; use crate::dom::bindings::codegen::Bindings::XMLHttpRequestBinding::XMLHttpRequestMethods; use crate::dom::bindings::codegen::Bindings::XMLHttpRequestBinding::XMLHttpRequestResponseType; @@ -216,11 +215,7 @@ impl XMLHttpRequest { } } pub fn new(global: &GlobalScope) -> DomRoot<XMLHttpRequest> { - reflect_dom_object( - Box::new(XMLHttpRequest::new_inherited(global)), - global, - XMLHttpRequestBinding::Wrap, - ) + reflect_dom_object(Box::new(XMLHttpRequest::new_inherited(global)), global) } // https://xhr.spec.whatwg.org/#constructors diff --git a/components/script/dom/xmlhttprequestupload.rs b/components/script/dom/xmlhttprequestupload.rs index dba70490d21..7e7b5893395 100644 --- a/components/script/dom/xmlhttprequestupload.rs +++ b/components/script/dom/xmlhttprequestupload.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::XMLHttpRequestUploadBinding; use crate::dom::bindings::reflector::reflect_dom_object; use crate::dom::bindings::root::DomRoot; use crate::dom::globalscope::GlobalScope; @@ -21,10 +20,6 @@ impl XMLHttpRequestUpload { } } pub fn new(global: &GlobalScope) -> DomRoot<XMLHttpRequestUpload> { - reflect_dom_object( - Box::new(XMLHttpRequestUpload::new_inherited()), - global, - XMLHttpRequestUploadBinding::Wrap, - ) + reflect_dom_object(Box::new(XMLHttpRequestUpload::new_inherited()), global) } } diff --git a/components/script/dom/xmlserializer.rs b/components/script/dom/xmlserializer.rs index bb5085b1738..2b65d061fa6 100644 --- a/components/script/dom/xmlserializer.rs +++ b/components/script/dom/xmlserializer.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::XMLSerializerBinding; use crate::dom::bindings::codegen::Bindings::XMLSerializerBinding::XMLSerializerMethods; use crate::dom::bindings::error::{Error, Fallible}; use crate::dom::bindings::reflector::{reflect_dom_object, Reflector}; @@ -28,11 +27,7 @@ impl XMLSerializer { } pub fn new(window: &Window) -> DomRoot<XMLSerializer> { - reflect_dom_object( - Box::new(XMLSerializer::new_inherited(window)), - window, - XMLSerializerBinding::Wrap, - ) + reflect_dom_object(Box::new(XMLSerializer::new_inherited(window)), window) } #[allow(non_snake_case)] diff --git a/components/script/dom/xrframe.rs b/components/script/dom/xrframe.rs index 9a752abf759..6de10312ec3 100644 --- a/components/script/dom/xrframe.rs +++ b/components/script/dom/xrframe.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::XRFrameBinding; use crate::dom::bindings::codegen::Bindings::XRFrameBinding::XRFrameMethods; use crate::dom::bindings::error::Error; use crate::dom::bindings::inheritance::Castable; @@ -40,11 +39,7 @@ impl XRFrame { } pub fn new(global: &GlobalScope, session: &XRSession, data: Frame) -> DomRoot<XRFrame> { - reflect_dom_object( - Box::new(XRFrame::new_inherited(session, data)), - global, - XRFrameBinding::Wrap, - ) + reflect_dom_object(Box::new(XRFrame::new_inherited(session, data)), global) } /// https://immersive-web.github.io/webxr/#xrframe-active diff --git a/components/script/dom/xrinputsource.rs b/components/script/dom/xrinputsource.rs index d67945040b1..ed8a3e6f1a5 100644 --- a/components/script/dom/xrinputsource.rs +++ b/components/script/dom/xrinputsource.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::XRInputSourceBinding; use crate::dom::bindings::codegen::Bindings::XRInputSourceBinding::{ XRHandedness, XRInputSourceMethods, XRTargetRayMode, }; @@ -54,7 +53,6 @@ impl XRInputSource { let source = reflect_dom_object( Box::new(XRInputSource::new_inherited(session, info)), global, - XRInputSourceBinding::Wrap, ); let _ac = enter_realm(&*global); diff --git a/components/script/dom/xrinputsourcearray.rs b/components/script/dom/xrinputsourcearray.rs index 99db386050b..b26f7bd3da7 100644 --- a/components/script/dom/xrinputsourcearray.rs +++ b/components/script/dom/xrinputsourcearray.rs @@ -3,7 +3,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::cell::DomRefCell; -use crate::dom::bindings::codegen::Bindings::XRInputSourceArrayBinding; use crate::dom::bindings::codegen::Bindings::XRInputSourceArrayBinding::XRInputSourceArrayMethods; use crate::dom::bindings::inheritance::Castable; use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector}; @@ -31,11 +30,7 @@ impl XRInputSourceArray { } pub fn new(global: &GlobalScope) -> DomRoot<XRInputSourceArray> { - reflect_dom_object( - Box::new(XRInputSourceArray::new_inherited()), - global, - XRInputSourceArrayBinding::Wrap, - ) + reflect_dom_object(Box::new(XRInputSourceArray::new_inherited()), global) } pub fn add_input_sources(&self, session: &XRSession, inputs: &[InputSource]) { diff --git a/components/script/dom/xrinputsourceevent.rs b/components/script/dom/xrinputsourceevent.rs index 445ad84f59a..47ed6d90626 100644 --- a/components/script/dom/xrinputsourceevent.rs +++ b/components/script/dom/xrinputsourceevent.rs @@ -47,7 +47,6 @@ impl XRInputSourceEvent { let trackevent = reflect_dom_object( Box::new(XRInputSourceEvent::new_inherited(frame, source)), global, - XRInputSourceEventBinding::Wrap, ); { let event = trackevent.upcast::<Event>(); diff --git a/components/script/dom/xrinputsourceschangeevent.rs b/components/script/dom/xrinputsourceschangeevent.rs index d05f359dc4d..d23c5ea4157 100644 --- a/components/script/dom/xrinputsourceschangeevent.rs +++ b/components/script/dom/xrinputsourceschangeevent.rs @@ -57,7 +57,6 @@ impl XRInputSourcesChangeEvent { let changeevent = reflect_dom_object( Box::new(XRInputSourcesChangeEvent::new_inherited(session)), global, - XRInputSourcesChangeEventBinding::Wrap, ); { let event = changeevent.upcast::<Event>(); diff --git a/components/script/dom/xrpose.rs b/components/script/dom/xrpose.rs index a9d24f5a0d3..bc9fb3a4be5 100644 --- a/components/script/dom/xrpose.rs +++ b/components/script/dom/xrpose.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::XRPoseBinding; use crate::dom::bindings::codegen::Bindings::XRPoseBinding::XRPoseMethods; use crate::dom::bindings::reflector::{reflect_dom_object, Reflector}; use crate::dom::bindings::root::{Dom, DomRoot}; @@ -28,11 +27,7 @@ impl XRPose { #[allow(unused)] pub fn new(global: &GlobalScope, transform: ApiRigidTransform) -> DomRoot<XRPose> { let transform = XRRigidTransform::new(global, transform); - reflect_dom_object( - Box::new(XRPose::new_inherited(&transform)), - global, - XRPoseBinding::Wrap, - ) + reflect_dom_object(Box::new(XRPose::new_inherited(&transform)), global) } } diff --git a/components/script/dom/xrreferencespace.rs b/components/script/dom/xrreferencespace.rs index 1116407cf46..4565b7681f0 100644 --- a/components/script/dom/xrreferencespace.rs +++ b/components/script/dom/xrreferencespace.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::XRReferenceSpaceBinding; use crate::dom::bindings::codegen::Bindings::XRReferenceSpaceBinding::XRReferenceSpaceMethods; use crate::dom::bindings::codegen::Bindings::XRReferenceSpaceBinding::XRReferenceSpaceType; use crate::dom::bindings::inheritance::Castable; @@ -56,7 +55,6 @@ impl XRReferenceSpace { reflect_dom_object( Box::new(XRReferenceSpace::new_inherited(session, &offset, ty)), global, - XRReferenceSpaceBinding::Wrap, ) } } diff --git a/components/script/dom/xrrenderstate.rs b/components/script/dom/xrrenderstate.rs index bebcfd7de61..199e029ee7d 100644 --- a/components/script/dom/xrrenderstate.rs +++ b/components/script/dom/xrrenderstate.rs @@ -2,7 +2,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::XRRenderStateBinding::{self, XRRenderStateMethods}; +use crate::dom::bindings::codegen::Bindings::XRRenderStateBinding::XRRenderStateMethods; use crate::dom::bindings::num::Finite; use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector}; use crate::dom::bindings::root::{DomRoot, MutNullableDom}; @@ -52,7 +52,6 @@ impl XRRenderState { layer, )), global, - XRRenderStateBinding::Wrap, ) } diff --git a/components/script/dom/xrrigidtransform.rs b/components/script/dom/xrrigidtransform.rs index 86593ae6b97..fad59c0aa11 100644 --- a/components/script/dom/xrrigidtransform.rs +++ b/components/script/dom/xrrigidtransform.rs @@ -3,7 +3,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::codegen::Bindings::DOMPointBinding::DOMPointInit; -use crate::dom::bindings::codegen::Bindings::XRRigidTransformBinding; use crate::dom::bindings::codegen::Bindings::XRRigidTransformBinding::XRRigidTransformMethods; use crate::dom::bindings::error::Error; use crate::dom::bindings::error::Fallible; @@ -46,11 +45,7 @@ impl XRRigidTransform { } pub fn new(global: &GlobalScope, transform: ApiRigidTransform) -> DomRoot<XRRigidTransform> { - reflect_dom_object( - Box::new(XRRigidTransform::new_inherited(transform)), - global, - XRRigidTransformBinding::Wrap, - ) + reflect_dom_object(Box::new(XRRigidTransform::new_inherited(transform)), global) } pub fn identity(window: &GlobalScope) -> DomRoot<XRRigidTransform> { diff --git a/components/script/dom/xrsession.rs b/components/script/dom/xrsession.rs index ed111fb3c02..3396ca669c1 100644 --- a/components/script/dom/xrsession.rs +++ b/components/script/dom/xrsession.rs @@ -9,7 +9,6 @@ use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowBinding::Windo use crate::dom::bindings::codegen::Bindings::XRReferenceSpaceBinding::XRReferenceSpaceType; use crate::dom::bindings::codegen::Bindings::XRRenderStateBinding::XRRenderStateInit; use crate::dom::bindings::codegen::Bindings::XRRenderStateBinding::XRRenderStateMethods; -use crate::dom::bindings::codegen::Bindings::XRSessionBinding; use crate::dom::bindings::codegen::Bindings::XRSessionBinding::XREnvironmentBlendMode; use crate::dom::bindings::codegen::Bindings::XRSessionBinding::XRFrameRequestCallback; use crate::dom::bindings::codegen::Bindings::XRSessionBinding::XRSessionMethods; @@ -130,7 +129,6 @@ impl XRSession { mode, )), global, - XRSessionBinding::Wrap, ); ret.attach_event_handler(); ret.setup_raf_loop(frame_receiver); diff --git a/components/script/dom/xrsessionevent.rs b/components/script/dom/xrsessionevent.rs index 18a8b83a8c3..95005d4e397 100644 --- a/components/script/dom/xrsessionevent.rs +++ b/components/script/dom/xrsessionevent.rs @@ -38,11 +38,8 @@ impl XRSessionEvent { cancelable: bool, session: &XRSession, ) -> DomRoot<XRSessionEvent> { - let trackevent = reflect_dom_object( - Box::new(XRSessionEvent::new_inherited(&session)), - global, - XRSessionEventBinding::Wrap, - ); + let trackevent = + reflect_dom_object(Box::new(XRSessionEvent::new_inherited(&session)), global); { let event = trackevent.upcast::<Event>(); event.init_event(type_, bubbles, cancelable); diff --git a/components/script/dom/xrspace.rs b/components/script/dom/xrspace.rs index 652a4345ce2..80752be3e35 100644 --- a/components/script/dom/xrspace.rs +++ b/components/script/dom/xrspace.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::XRSpaceBinding; use crate::dom::bindings::inheritance::Castable; use crate::dom::bindings::reflector::reflect_dom_object; use crate::dom::bindings::root::{Dom, DomRoot, MutNullableDom}; @@ -55,7 +54,6 @@ impl XRSpace { reflect_dom_object( Box::new(XRSpace::new_inputspace_inner(session, input, is_grip_space)), global, - XRSpaceBinding::Wrap, ) } } diff --git a/components/script/dom/xrsystem.rs b/components/script/dom/xrsystem.rs index 8a8f109722b..78d4a5e89a0 100644 --- a/components/script/dom/xrsystem.rs +++ b/components/script/dom/xrsystem.rs @@ -4,7 +4,6 @@ use crate::dom::bindings::cell::DomRefCell; use crate::dom::bindings::codegen::Bindings::VRDisplayBinding::VRDisplayMethods; -use crate::dom::bindings::codegen::Bindings::XRSystemBinding; use crate::dom::bindings::codegen::Bindings::XRSystemBinding::XRSessionInit; use crate::dom::bindings::codegen::Bindings::XRSystemBinding::{XRSessionMode, XRSystemMethods}; use crate::dom::bindings::conversions::{ConversionResult, FromJSValConvertible}; @@ -74,7 +73,6 @@ impl XRSystem { window.webvr_thread(), )), window, - XRSystemBinding::Wrap, ); root.register(); root diff --git a/components/script/dom/xrtest.rs b/components/script/dom/xrtest.rs index 4c6852fc121..32adb628c11 100644 --- a/components/script/dom/xrtest.rs +++ b/components/script/dom/xrtest.rs @@ -9,9 +9,7 @@ use crate::dom::bindings::callback::ExceptionHandling; use crate::dom::bindings::cell::DomRefCell; use crate::dom::bindings::codegen::Bindings::FunctionBinding::Function; -use crate::dom::bindings::codegen::Bindings::XRTestBinding::{ - self, FakeXRDeviceInit, XRTestMethods, -}; +use crate::dom::bindings::codegen::Bindings::XRTestBinding::{FakeXRDeviceInit, XRTestMethods}; use crate::dom::bindings::refcounted::{Trusted, TrustedPromise}; use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector}; use crate::dom::bindings::root::{Dom, DomRoot}; @@ -42,11 +40,7 @@ impl XRTest { } pub fn new(global: &GlobalScope) -> DomRoot<XRTest> { - reflect_dom_object( - Box::new(XRTest::new_inherited()), - global, - XRTestBinding::Wrap, - ) + reflect_dom_object(Box::new(XRTest::new_inherited()), global) } fn device_obtained( diff --git a/components/script/dom/xrview.rs b/components/script/dom/xrview.rs index 04a4a2b66c8..38fc3e82f24 100644 --- a/components/script/dom/xrview.rs +++ b/components/script/dom/xrview.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::XRViewBinding; use crate::dom::bindings::codegen::Bindings::XRViewBinding::{XREye, XRViewMethods}; use crate::dom::bindings::reflector::{reflect_dom_object, Reflector}; use crate::dom::bindings::root::{Dom, DomRoot}; @@ -59,7 +58,6 @@ impl XRView { let ret = reflect_dom_object( Box::new(XRView::new_inherited(session, &transform, eye)), global, - XRViewBinding::Wrap, ); // row_major since euclid uses row vectors diff --git a/components/script/dom/xrviewerpose.rs b/components/script/dom/xrviewerpose.rs index 4391b677130..7aa4bdcb1c1 100644 --- a/components/script/dom/xrviewerpose.rs +++ b/components/script/dom/xrviewerpose.rs @@ -3,7 +3,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::codegen::Bindings::XRViewBinding::XREye; -use crate::dom::bindings::codegen::Bindings::XRViewerPoseBinding; use crate::dom::bindings::codegen::Bindings::XRViewerPoseBinding::XRViewerPoseMethods; use crate::dom::bindings::reflector::reflect_dom_object; use crate::dom::bindings::root::DomRoot; @@ -60,11 +59,7 @@ impl XRViewerPose { }, }); let transform = XRRigidTransform::new(global, cast_transform(pose)); - let pose = reflect_dom_object( - Box::new(XRViewerPose::new_inherited(&transform)), - global, - XRViewerPoseBinding::Wrap, - ); + let pose = reflect_dom_object(Box::new(XRViewerPose::new_inherited(&transform)), global); let cx = global.get_cx(); unsafe { diff --git a/components/script/dom/xrviewport.rs b/components/script/dom/xrviewport.rs index 80b8c27fbaa..30872bae0c4 100644 --- a/components/script/dom/xrviewport.rs +++ b/components/script/dom/xrviewport.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::XRViewportBinding; use crate::dom::bindings::codegen::Bindings::XRViewportBinding::XRViewportMethods; use crate::dom::bindings::reflector::{reflect_dom_object, Reflector}; use crate::dom::bindings::root::DomRoot; @@ -26,11 +25,7 @@ impl XRViewport { } pub fn new(global: &GlobalScope, viewport: Rect<i32, Viewport>) -> DomRoot<XRViewport> { - reflect_dom_object( - Box::new(XRViewport::new_inherited(viewport)), - global, - XRViewportBinding::Wrap, - ) + reflect_dom_object(Box::new(XRViewport::new_inherited(viewport)), global) } } diff --git a/components/script/dom/xrwebgllayer.rs b/components/script/dom/xrwebgllayer.rs index f6e05844dd8..c55115ed6db 100644 --- a/components/script/dom/xrwebgllayer.rs +++ b/components/script/dom/xrwebgllayer.rs @@ -4,7 +4,6 @@ use crate::dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextMethods; use crate::dom::bindings::codegen::Bindings::XRViewBinding::{XREye, XRViewMethods}; -use crate::dom::bindings::codegen::Bindings::XRWebGLLayerBinding; use crate::dom::bindings::codegen::Bindings::XRWebGLLayerBinding::XRWebGLLayerInit; use crate::dom::bindings::codegen::Bindings::XRWebGLLayerBinding::XRWebGLLayerMethods; use crate::dom::bindings::error::Error; @@ -78,7 +77,6 @@ impl XRWebGLLayer { framebuffer, )), global, - XRWebGLLayerBinding::Wrap, ) } |