mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Call the generated rather than the hand-written traits (fixes #2936).
This commit is contained in:
parent
38a658d561
commit
944d8b00b0
116 changed files with 126 additions and 765 deletions
|
@ -3,6 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use dom::bindings::codegen::Bindings::HTMLCanvasElementBinding;
|
||||
use dom::bindings::codegen::Bindings::HTMLCanvasElementBinding::HTMLCanvasElementMethods;
|
||||
use dom::bindings::codegen::InheritTypes::HTMLCanvasElementDerived;
|
||||
use dom::bindings::codegen::InheritTypes::{ElementCast, HTMLElementCast};
|
||||
use dom::bindings::global::Window;
|
||||
|
@ -57,14 +58,6 @@ impl HTMLCanvasElement {
|
|||
}
|
||||
}
|
||||
|
||||
pub trait HTMLCanvasElementMethods {
|
||||
fn Width(&self) -> u32;
|
||||
fn SetWidth(&self, width: u32);
|
||||
fn Height(&self) -> u32;
|
||||
fn SetHeight(&self, height: u32);
|
||||
fn GetContext(&self, id: DOMString) -> Option<Temporary<CanvasRenderingContext2D>>;
|
||||
}
|
||||
|
||||
impl<'a> HTMLCanvasElementMethods for JSRef<'a, HTMLCanvasElement> {
|
||||
fn Width(&self) -> u32 {
|
||||
self.width.get()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue