Make the traits for the IDL interfaces take &self

This commit is contained in:
Anthony Ramine 2015-08-27 22:15:54 +02:00
parent 856fda7f2e
commit 709d347872
99 changed files with 1192 additions and 1192 deletions

View file

@ -205,31 +205,31 @@ impl HTMLCanvasElement {
}
}
impl<'a> HTMLCanvasElementMethods for &'a HTMLCanvasElement {
impl HTMLCanvasElementMethods for HTMLCanvasElement {
// https://html.spec.whatwg.org/multipage/#dom-canvas-width
fn Width(self) -> u32 {
fn Width(&self) -> u32 {
self.width.get()
}
// https://html.spec.whatwg.org/multipage/#dom-canvas-width
fn SetWidth(self, width: u32) {
fn SetWidth(&self, width: u32) {
let elem = ElementCast::from_ref(self);
elem.set_uint_attribute(&atom!("width"), width)
}
// https://html.spec.whatwg.org/multipage/#dom-canvas-height
fn Height(self) -> u32 {
fn Height(&self) -> u32 {
self.height.get()
}
// https://html.spec.whatwg.org/multipage/#dom-canvas-height
fn SetHeight(self, height: u32) {
fn SetHeight(&self, height: u32) {
let elem = ElementCast::from_ref(self);
elem.set_uint_attribute(&atom!("height"), height)
}
// https://html.spec.whatwg.org/multipage/#dom-canvas-getcontext
fn GetContext(self,
fn GetContext(&self,
cx: *mut JSContext,
id: DOMString,
attributes: Vec<HandleValue>)