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

@ -58,7 +58,7 @@ impl CollectionFilter for RowsFilter {
impl HTMLTableSectionElementMethods for HTMLTableSectionElement {
// https://html.spec.whatwg.org/multipage/#dom-tbody-rows
fn Rows(&self) -> Root<HTMLCollection> {
HTMLCollection::create(&window_from_node(self), self.upcast::<Node>(), box RowsFilter)
HTMLCollection::create(&window_from_node(self), self.upcast(), box RowsFilter)
}
// https://html.spec.whatwg.org/multipage/#dom-tbody-insertrow
@ -82,8 +82,7 @@ impl HTMLTableSectionElementMethods for HTMLTableSectionElement {
impl VirtualMethods for HTMLTableSectionElement {
fn super_type(&self) -> Option<&VirtualMethods> {
let htmlelement: &HTMLElement = self.upcast::<HTMLElement>();
Some(htmlelement as &VirtualMethods)
Some(self.upcast::<HTMLElement>() as &VirtualMethods)
}
fn attribute_mutated(&self, attr: &Attr, mutation: AttributeMutation) {