Generate all Derived implementations in codegen

This commit is contained in:
Anthony Ramine 2015-09-27 17:52:37 +02:00
parent 32daa17d5c
commit 617fc08783
93 changed files with 137 additions and 1027 deletions

View file

@ -2,11 +2,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use dom::bindings::codegen::InheritTypes::{ElementTypeId, EventTargetTypeId};
use dom::bindings::codegen::InheritTypes::{HTMLElementTypeId, HTMLMediaElementDerived};
use dom::bindings::codegen::InheritTypes::{HTMLMediaElementTypeId, NodeTypeId};
use dom::bindings::codegen::InheritTypes::{HTMLElementTypeId, HTMLMediaElementTypeId};
use dom::document::Document;
use dom::eventtarget::EventTarget;
use dom::htmlelement::HTMLElement;
use util::str::DOMString;
@ -15,16 +12,6 @@ pub struct HTMLMediaElement {
htmlelement: HTMLElement,
}
impl HTMLMediaElementDerived for EventTarget {
fn is_htmlmediaelement(&self) -> bool {
match *self.type_id() {
EventTargetTypeId::Node(
NodeTypeId::Element(ElementTypeId::HTMLElement(HTMLElementTypeId::HTMLMediaElement(_)))) => true,
_ => false
}
}
}
impl HTMLMediaElement {
pub fn new_inherited(type_id: HTMLMediaElementTypeId, tag_name: DOMString,
prefix: Option<DOMString>, document: &Document)