diff --git a/components/script/dom/rtcdatachannel.rs b/components/script/dom/rtcdatachannel.rs index 2b26bf4f8b96..24475c223235 100644 --- a/components/script/dom/rtcdatachannel.rs +++ b/components/script/dom/rtcdatachannel.rs @@ -282,26 +282,26 @@ impl RTCDataChannelMethods for RTCDataChannel { // fn SetBufferedAmountLowThreshold(&self, value: u32) -> (); // https://www.w3.org/TR/webrtc/#dom-rtcdatachannel-close - fn Close(&self) -> () {} + fn Close(&self) {} // fn BinaryType(&self) -> DOMString; // fn SetBinaryType(&self, value: DOMString) -> (); // https://www.w3.org/TR/webrtc/#dom-rtcdatachannel-send - fn Send(&self, data: USVString) -> () { + fn Send(&self, data: USVString) { if let Err(error) = self.channel.send(&data.0) { warn!("Could not send data channel message. Error: {:?}", error); } } // https://www.w3.org/TR/webrtc/#dom-rtcdatachannel-send!overload-1 - fn Send_(&self, data: &Blob) -> () {} + // fn Send_(&self, data: &Blob) -> () {} // https://www.w3.org/TR/webrtc/#dom-rtcdatachannel-send!overload-2 - fn Send__(&self, data: CustomAutoRooterGuard) -> () {} + // fn Send__(&self, data: CustomAutoRooterGuard) -> () {} // https://www.w3.org/TR/webrtc/#dom-rtcdatachannel-send!overload-3 - fn Send___(&self, data: CustomAutoRooterGuard) -> () {} + // fn Send___(&self, data: CustomAutoRooterGuard) -> () {} } impl From<&RTCDataChannelInit> for WebRtcDataChannelInit { diff --git a/components/script/dom/rtcdatachannelevent.rs b/components/script/dom/rtcdatachannelevent.rs index cd5239eff796..95935f681078 100644 --- a/components/script/dom/rtcdatachannelevent.rs +++ b/components/script/dom/rtcdatachannelevent.rs @@ -48,6 +48,7 @@ impl RTCDataChannelEvent { event } + #[allow(non_snake_case)] pub fn Constructor( window: &Window, type_: DOMString, @@ -64,10 +65,12 @@ impl RTCDataChannelEvent { } impl RTCDataChannelEventMethods for RTCDataChannelEvent { + // https://www.w3.org/TR/webrtc/#dom-datachannelevent-channel fn Channel(&self) -> DomRoot { DomRoot::from_ref(&*self.channel) } + // https://dom.spec.whatwg.org/#dom-event-istrusted fn IsTrusted(&self) -> bool { self.event.IsTrusted() } diff --git a/components/script/dom/rtcerrorevent.rs b/components/script/dom/rtcerrorevent.rs index a647fe8bcbd2..2d40844423a6 100644 --- a/components/script/dom/rtcerrorevent.rs +++ b/components/script/dom/rtcerrorevent.rs @@ -62,10 +62,12 @@ impl RTCErrorEvent { } impl RTCErrorEventMethods for RTCErrorEvent { + // https://www.w3.org/TR/webrtc/#dom-rtcerrorevent-error fn Error(&self) -> DomRoot { DomRoot::from_ref(&*self.error) } + // https://dom.spec.whatwg.org/#dom-event-istrusted fn IsTrusted(&self) -> bool { self.event.IsTrusted() } diff --git a/components/script/dom/rtcpeerconnection.rs b/components/script/dom/rtcpeerconnection.rs index 2e7f05f48733..2e568c7a9715 100644 --- a/components/script/dom/rtcpeerconnection.rs +++ b/components/script/dom/rtcpeerconnection.rs @@ -675,15 +675,9 @@ impl RTCPeerConnectionMethods for RTCPeerConnection { fn CreateDataChannel( &self, label: USVString, - dataChannelDict: &RTCDataChannelInit, + init: &RTCDataChannelInit, ) -> DomRoot { - RTCDataChannel::new( - &self.global(), - &self.controller, - label, - dataChannelDict, - None, - ) + RTCDataChannel::new(&self.global(), &self.controller, label, init, None) } } diff --git a/components/script/dom/webidls/RTCDataChannel.webidl b/components/script/dom/webidls/RTCDataChannel.webidl index e8a08969e550..910353dbbd33 100644 --- a/components/script/dom/webidls/RTCDataChannel.webidl +++ b/components/script/dom/webidls/RTCDataChannel.webidl @@ -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/. */ - // https://www.w3.org/TR/webrtc/#dom-rtcdatachannel +// https://w3c.github.io/webrtc-pc/#dom-rtcdatachannel [Exposed=Window] interface RTCDataChannel : EventTarget { @@ -25,9 +25,9 @@ interface RTCDataChannel : EventTarget { attribute EventHandler onmessage; //attribute DOMString binaryType; void send(USVString data); - void send(Blob data); - void send(ArrayBuffer data); - void send(ArrayBufferView data); + //void send(Blob data); + //void send(ArrayBuffer data); + //void send(ArrayBufferView data); }; // https://www.w3.org/TR/webrtc/#dom-rtcdatachannelinit @@ -46,4 +46,4 @@ enum RTCDataChannelState { "open", "closing", "closed" -}; \ No newline at end of file +}; diff --git a/components/script/dom/webidls/RTCDataChannelEvent.webidl b/components/script/dom/webidls/RTCDataChannelEvent.webidl index 5b1cde9e7232..081ab15db25c 100644 --- a/components/script/dom/webidls/RTCDataChannelEvent.webidl +++ b/components/script/dom/webidls/RTCDataChannelEvent.webidl @@ -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/. */ - // https://www.w3.org/TR/webrtc/#rtcdatachannelevent +// https://w3c.github.io/webrtc-pc/#dom-rtcdatachannelevent [Exposed=Window] interface RTCDataChannelEvent : Event { @@ -12,4 +12,4 @@ interface RTCDataChannelEvent : Event { dictionary RTCDataChannelEventInit : EventInit { required RTCDataChannel channel; -}; \ No newline at end of file +}; diff --git a/components/script/dom/webidls/RTCError.webidl b/components/script/dom/webidls/RTCError.webidl index 01929f0af5a9..f398c450905a 100644 --- a/components/script/dom/webidls/RTCError.webidl +++ b/components/script/dom/webidls/RTCError.webidl @@ -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/. */ -// https://www.w3.org/TR/webrtc/#dom-rtcerror +// https://w3c.github.io/webrtc-pc/#dom-rtcerror [Exposed=Window] interface RTCError : DOMException { @@ -32,4 +32,4 @@ enum RTCErrorDetailType { "sdp-syntax-error", "hardware-encoder-not-available", "hardware-encoder-error" -}; \ No newline at end of file +}; diff --git a/components/script/dom/webidls/RTCErrorEvent.webidl b/components/script/dom/webidls/RTCErrorEvent.webidl index 1f215d393740..9433fc6f5792 100644 --- a/components/script/dom/webidls/RTCErrorEvent.webidl +++ b/components/script/dom/webidls/RTCErrorEvent.webidl @@ -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/. */ - // https://www.w3.org/TR/webrtc/#rtcerrorevent-interface +// https://w3c.github.io/webrtc-pc/#dom-rtcerrorevent [Exposed=Window] interface RTCErrorEvent : Event { @@ -12,4 +12,4 @@ interface RTCErrorEvent : Event { dictionary RTCErrorEventInit : EventInit { required RTCError error; -}; \ No newline at end of file +};