mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Make the traits for the IDL interfaces take &self
This commit is contained in:
parent
856fda7f2e
commit
709d347872
99 changed files with 1192 additions and 1192 deletions
|
@ -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>)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue