mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Remove needless '&mut self' from WindowMethods.
This commit is contained in:
parent
a90f1e3773
commit
884346030c
2 changed files with 10 additions and 10 deletions
|
@ -326,7 +326,7 @@ pub trait DocumentMethods {
|
||||||
fn Scripts(&self) -> Temporary<HTMLCollection>;
|
fn Scripts(&self) -> Temporary<HTMLCollection>;
|
||||||
fn Anchors(&self) -> Temporary<HTMLCollection>;
|
fn Anchors(&self) -> Temporary<HTMLCollection>;
|
||||||
fn Applets(&self) -> Temporary<HTMLCollection>;
|
fn Applets(&self) -> Temporary<HTMLCollection>;
|
||||||
fn Location(&mut self) -> Temporary<Location>;
|
fn Location(&self) -> Temporary<Location>;
|
||||||
fn Children(&self) -> Temporary<HTMLCollection>;
|
fn Children(&self) -> Temporary<HTMLCollection>;
|
||||||
fn GetOnload(&self) -> Option<EventHandlerNonNull>;
|
fn GetOnload(&self) -> Option<EventHandlerNonNull>;
|
||||||
fn SetOnload(&mut self, listener: Option<EventHandlerNonNull>);
|
fn SetOnload(&mut self, listener: Option<EventHandlerNonNull>);
|
||||||
|
@ -800,7 +800,7 @@ impl<'a> DocumentMethods for JSRef<'a, Document> {
|
||||||
HTMLCollection::create(&*window, NodeCast::from_ref(self), filter)
|
HTMLCollection::create(&*window, NodeCast::from_ref(self), filter)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn Location(&mut self) -> Temporary<Location> {
|
fn Location(&self) -> Temporary<Location> {
|
||||||
let mut window = self.window.root();
|
let mut window = self.window.root();
|
||||||
window.Location()
|
window.Location()
|
||||||
}
|
}
|
||||||
|
|
|
@ -119,16 +119,16 @@ pub trait WindowMethods {
|
||||||
fn Alert(&self, s: DOMString);
|
fn Alert(&self, s: DOMString);
|
||||||
fn Close(&self);
|
fn Close(&self);
|
||||||
fn Document(&self) -> Temporary<Document>;
|
fn Document(&self) -> Temporary<Document>;
|
||||||
fn Location(&mut self) -> Temporary<Location>;
|
fn Location(&self) -> Temporary<Location>;
|
||||||
fn Console(&mut self) -> Temporary<Console>;
|
fn Console(&self) -> Temporary<Console>;
|
||||||
fn Navigator(&mut self) -> Temporary<Navigator>;
|
fn Navigator(&self) -> Temporary<Navigator>;
|
||||||
fn SetTimeout(&mut self, _cx: *mut JSContext, callback: JSVal, timeout: i32) -> i32;
|
fn SetTimeout(&mut self, _cx: *mut JSContext, callback: JSVal, timeout: i32) -> i32;
|
||||||
fn ClearTimeout(&mut self, handle: i32);
|
fn ClearTimeout(&mut self, handle: i32);
|
||||||
fn SetInterval(&mut self, _cx: *mut JSContext, callback: JSVal, timeout: i32) -> i32;
|
fn SetInterval(&mut self, _cx: *mut JSContext, callback: JSVal, timeout: i32) -> i32;
|
||||||
fn ClearInterval(&mut self, handle: i32);
|
fn ClearInterval(&mut self, handle: i32);
|
||||||
fn Window(&self) -> Temporary<Window>;
|
fn Window(&self) -> Temporary<Window>;
|
||||||
fn Self(&self) -> Temporary<Window>;
|
fn Self(&self) -> Temporary<Window>;
|
||||||
fn Performance(&mut self) -> Temporary<Performance>;
|
fn Performance(&self) -> Temporary<Performance>;
|
||||||
fn GetOnload(&self) -> Option<EventHandlerNonNull>;
|
fn GetOnload(&self) -> Option<EventHandlerNonNull>;
|
||||||
fn SetOnload(&mut self, listener: Option<EventHandlerNonNull>);
|
fn SetOnload(&mut self, listener: Option<EventHandlerNonNull>);
|
||||||
fn GetOnunload(&self) -> Option<EventHandlerNonNull>;
|
fn GetOnunload(&self) -> Option<EventHandlerNonNull>;
|
||||||
|
@ -155,7 +155,7 @@ impl<'a> WindowMethods for JSRef<'a, Window> {
|
||||||
Temporary::new(frame.get_ref().document.clone())
|
Temporary::new(frame.get_ref().document.clone())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn Location(&mut self) -> Temporary<Location> {
|
fn Location(&self) -> Temporary<Location> {
|
||||||
if self.location.get().is_none() {
|
if self.location.get().is_none() {
|
||||||
let page = self.deref().page.clone();
|
let page = self.deref().page.clone();
|
||||||
let location = Location::new(self, page);
|
let location = Location::new(self, page);
|
||||||
|
@ -164,7 +164,7 @@ impl<'a> WindowMethods for JSRef<'a, Window> {
|
||||||
Temporary::new(self.location.get().get_ref().clone())
|
Temporary::new(self.location.get().get_ref().clone())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn Console(&mut self) -> Temporary<Console> {
|
fn Console(&self) -> Temporary<Console> {
|
||||||
if self.console.get().is_none() {
|
if self.console.get().is_none() {
|
||||||
let console = Console::new(self);
|
let console = Console::new(self);
|
||||||
self.console.assign(Some(console));
|
self.console.assign(Some(console));
|
||||||
|
@ -172,7 +172,7 @@ impl<'a> WindowMethods for JSRef<'a, Window> {
|
||||||
Temporary::new(self.console.get().get_ref().clone())
|
Temporary::new(self.console.get().get_ref().clone())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn Navigator(&mut self) -> Temporary<Navigator> {
|
fn Navigator(&self) -> Temporary<Navigator> {
|
||||||
if self.navigator.get().is_none() {
|
if self.navigator.get().is_none() {
|
||||||
let navigator = Navigator::new(self);
|
let navigator = Navigator::new(self);
|
||||||
self.navigator.assign(Some(navigator));
|
self.navigator.assign(Some(navigator));
|
||||||
|
@ -209,7 +209,7 @@ impl<'a> WindowMethods for JSRef<'a, Window> {
|
||||||
self.Window()
|
self.Window()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn Performance(&mut self) -> Temporary<Performance> {
|
fn Performance(&self) -> Temporary<Performance> {
|
||||||
if self.performance.get().is_none() {
|
if self.performance.get().is_none() {
|
||||||
let performance = Performance::new(self);
|
let performance = Performance::new(self);
|
||||||
self.performance.assign(Some(performance));
|
self.performance.assign(Some(performance));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue