diff options
author | Josh Matthews <josh@joshmatthews.net> | 2014-04-24 13:03:19 -0400 |
---|---|---|
committer | Josh Matthews <josh@joshmatthews.net> | 2014-05-03 14:18:31 -0400 |
commit | 91278da9dd55582401154e07f9eea34425a332c2 (patch) | |
tree | ccce9b42e8a6c54245e53620082efe0b9840eae1 /src/components/script/dom/virtualmethods.rs | |
parent | 46a33b4b38666252245af5dd3a38bb6f57ff8a8e (diff) | |
download | servo-91278da9dd55582401154e07f9eea34425a332c2.tar.gz servo-91278da9dd55582401154e07f9eea34425a332c2.zip |
Address review comments.
Diffstat (limited to 'src/components/script/dom/virtualmethods.rs')
-rw-r--r-- | src/components/script/dom/virtualmethods.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/components/script/dom/virtualmethods.rs b/src/components/script/dom/virtualmethods.rs index f67d97985e1..2b0d9aabfe5 100644 --- a/src/components/script/dom/virtualmethods.rs +++ b/src/components/script/dom/virtualmethods.rs @@ -17,7 +17,7 @@ use dom::htmliframeelement::HTMLIFrameElement; use dom::htmlimageelement::HTMLImageElement; use dom::htmlobjectelement::HTMLObjectElement; use dom::htmlstyleelement::HTMLStyleElement; -use dom::node::{Node, ElementNodeTypeId}; +use dom::node::{Node, NodeHelpers, ElementNodeTypeId}; use servo_util::str::DOMString; /// Trait to allow DOM nodes to opt-in to overriding (or adding to) common @@ -25,7 +25,7 @@ use servo_util::str::DOMString; pub trait VirtualMethods { /// Returns self as the superclass of the implementation for this trait, /// if any. - fn super_type(&self) -> Option<~VirtualMethods:>; + fn super_type<'a>(&'a mut self) -> Option<&'a mut VirtualMethods:>; /// Called when changing or adding attributes, after the attribute's value /// has been updated. @@ -75,7 +75,7 @@ pub trait VirtualMethods { /// concrete type, propagating up the parent hierarchy unless otherwise /// interrupted. pub fn vtable_for<'a>(node: &'a mut JSRef<Node>) -> &'a mut VirtualMethods: { - match node.get().type_id { + match node.type_id() { ElementNodeTypeId(HTMLImageElementTypeId) => { let element: &mut JSRef<HTMLImageElement> = HTMLImageElementCast::to_mut_ref(node).unwrap(); element as &mut VirtualMethods: |