mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Implement something like CSS value serialization. Fetch actual inline style declarations from owning elements.
This commit is contained in:
parent
2e14b653bf
commit
505e1855a3
8 changed files with 375 additions and 55 deletions
|
@ -73,8 +73,8 @@ impl<'a> PrivateHTMLElementHelpers for JSRef<'a, HTMLElement> {
|
|||
impl<'a> HTMLElementMethods for JSRef<'a, HTMLElement> {
|
||||
fn Style(self) -> Temporary<CSSStyleDeclaration> {
|
||||
if self.style_decl.get().is_none() {
|
||||
let global = window_from_node(self);
|
||||
let style_props = CSS2Properties::new(&*global.root()).root();
|
||||
let global = window_from_node(self).root();
|
||||
let style_props = CSS2Properties::new(*global, self).root();
|
||||
let style_decl: JSRef<CSSStyleDeclaration> = CSSStyleDeclarationCast::from_ref(*style_props);
|
||||
self.style_decl.assign(Some(style_decl));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue