mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Fix #7268 - getComputedStyle should take Element
, not HTMLElement
This commit is contained in:
parent
70b9922eb0
commit
b7d25159d3
7 changed files with 40 additions and 13 deletions
|
@ -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 {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue