mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Don't go through the layout thread to retrieve a node's primary style
This commit is contained in:
parent
030a1cf8fb
commit
c10e839924
10 changed files with 38 additions and 79 deletions
|
@ -396,7 +396,7 @@ impl Element {
|
|||
/// style will be `None` for elements in a `display: none` subtree. otherwise, the element has a
|
||||
/// layout box iff it doesn't have `display: none`.
|
||||
pub fn style(&self) -> Option<Arc<ComputedValues>> {
|
||||
window_from_node(self).style_query(self.upcast::<Node>().to_trusted_node_address())
|
||||
self.upcast::<Node>().style()
|
||||
}
|
||||
|
||||
// https://drafts.csswg.org/cssom-view/#css-layout-box
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue