Implements Stylesheet.ownerNode

This commit is contained in:
Vincent Ricard 2020-10-08 22:30:22 +02:00
parent 406d15974f
commit e7199c029f
14 changed files with 72 additions and 39 deletions

View file

@ -113,8 +113,10 @@ impl CSSStyleOwner {
if changed {
// If this is changed, see also
// CSSStyleRule::SetSelectorText, which does the same thing.
stylesheets_owner_from_node(rule.parent_stylesheet().owner().upcast::<Node>())
.invalidate_stylesheets();
if let Some(owner) = rule.parent_stylesheet().get_owner() {
stylesheets_owner_from_node(owner.upcast::<Node>())
.invalidate_stylesheets();
}
}
result
},