Call the generated rather than the hand-written traits (fixes #2936).

This commit is contained in:
Ms2ger 2014-07-27 20:22:13 +02:00
parent 38a658d561
commit 944d8b00b0
116 changed files with 126 additions and 765 deletions

View file

@ -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()