Fix #7268 - getComputedStyle should take Element, not HTMLElement

This commit is contained in:
Mahdi Dibaiee 2015-08-20 00:53:46 +04:30
parent 70b9922eb0
commit b7d25159d3
7 changed files with 40 additions and 13 deletions

View file

@ -136,7 +136,7 @@ impl<'a> HTMLElementMethods for &'a HTMLElement {
fn Style(self) -> Root<CSSStyleDeclaration> {
self.style_decl.or_init(|| {
let global = window_from_node(self);
CSSStyleDeclaration::new(global.r(), self, None, CSSModificationAccess::ReadWrite)
CSSStyleDeclaration::new(global.r(), ElementCast::from_ref(self), None, CSSModificationAccess::ReadWrite)
})
}
@ -458,4 +458,3 @@ impl PartialEq for HTMLElementTypeId {
}
}
}