Clean up the cast calls

This commit is contained in:
Anthony Ramine 2015-10-07 14:55:02 +02:00
parent 13ea3ac413
commit 68014af78e
66 changed files with 412 additions and 718 deletions

View file

@ -10,7 +10,6 @@ use dom::bindings::js::{JS, MutNullableHeap, Root};
use dom::bindings::utils::Reflectable;
use dom::document::Document;
use dom::domtokenlist::DOMTokenList;
use dom::element::Element;
use dom::htmlelement::HTMLElement;
use dom::node::Node;
use dom::virtualmethods::VirtualMethods;
@ -43,8 +42,7 @@ impl HTMLAreaElement {
impl VirtualMethods for HTMLAreaElement {
fn super_type(&self) -> Option<&VirtualMethods> {
let htmlelement: &HTMLElement = self.upcast::<HTMLElement>();
Some(htmlelement as &VirtualMethods)
Some(self.upcast::<HTMLElement>() as &VirtualMethods)
}
fn parse_plain_attribute(&self, name: &Atom, value: DOMString) -> AttrValue {
@ -59,7 +57,7 @@ impl HTMLAreaElementMethods for HTMLAreaElement {
// https://html.spec.whatwg.org/multipage/#dom-area-rellist
fn RelList(&self) -> Root<DOMTokenList> {
self.rel_list.or_init(|| {
DOMTokenList::new(self.upcast::<Element>(), &atom!("rel"))
DOMTokenList::new(self.upcast(), &atom!("rel"))
})
}
}