aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmlmediaelement.rs
diff options
context:
space:
mode:
authorMegha Gupta <meghabloomgirl@gmail.com>2014-12-30 19:49:02 +0530
committerMegha Gupta <meghabloomgirl@gmail.com>2015-01-02 23:10:32 +0530
commit50310968536c615f1331f3dc8b2b1352230816ee (patch)
tree787e4fb21cd92bcc35b961c61f6fcd67745a4ab3 /components/script/dom/htmlmediaelement.rs
parentf85b9e37cc121544bd4c2ebe434e717eb3a3d953 (diff)
downloadservo-50310968536c615f1331f3dc8b2b1352230816ee.tar.gz
servo-50310968536c615f1331f3dc8b2b1352230816ee.zip
Fix inheritance enums for htmlmediaelement and htmltablecellelement
Diffstat (limited to 'components/script/dom/htmlmediaelement.rs')
-rw-r--r--components/script/dom/htmlmediaelement.rs14
1 files changed, 10 insertions, 4 deletions
diff --git a/components/script/dom/htmlmediaelement.rs b/components/script/dom/htmlmediaelement.rs
index 3a73d03387c..9346436eeb7 100644
--- a/components/script/dom/htmlmediaelement.rs
+++ b/components/script/dom/htmlmediaelement.rs
@@ -19,17 +19,16 @@ pub struct HTMLMediaElement {
impl HTMLMediaElementDerived for EventTarget {
fn is_htmlmediaelement(&self) -> bool {
match *self.type_id() {
- EventTargetTypeId::Node(NodeTypeId::Element(ElementTypeId::HTMLElement(HTMLElementTypeId::HTMLVideoElement))) |
- EventTargetTypeId::Node(NodeTypeId::Element(ElementTypeId::HTMLElement(HTMLElementTypeId::HTMLAudioElement))) => true,
+ EventTargetTypeId::Node(NodeTypeId::Element(ElementTypeId::HTMLElement(HTMLElementTypeId::HTMLMediaElement(_)))) => true,
_ => false
}
}
}
impl HTMLMediaElement {
- pub fn new_inherited(type_id: HTMLElementTypeId, tag_name: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLMediaElement {
+ pub fn new_inherited(type_id: HTMLMediaElementTypeId, tag_name: DOMString, prefix: Option<DOMString>, document: JSRef<Document>) -> HTMLMediaElement {
HTMLMediaElement {
- htmlelement: HTMLElement::new_inherited(type_id, tag_name, prefix, document)
+ htmlelement: HTMLElement::new_inherited(HTMLElementTypeId::HTMLMediaElement(type_id), tag_name, prefix, document)
}
}
@@ -39,3 +38,10 @@ impl HTMLMediaElement {
}
}
+#[deriving(PartialEq, Show)]
+#[jstraceable]
+pub enum HTMLMediaElementTypeId {
+ HTMLAudioElement,
+ HTMLVideoElement,
+}
+