mirror of
https://github.com/servo/servo.git
synced 2025-06-13 10:54:29 +00:00
script: Fix stylesheet adoption.
This commit is contained in:
parent
02d1264047
commit
82c58d0a05
3 changed files with 6 additions and 7 deletions
|
@ -242,8 +242,8 @@ impl VirtualMethods for HTMLLinkElement {
|
||||||
s.unbind_from_tree(context);
|
s.unbind_from_tree(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Some(ref s) = *self.stylesheet.borrow() {
|
if let Some(s) = self.stylesheet.borrow_mut().take() {
|
||||||
document_from_node(self).remove_stylesheet(self.upcast(), s);
|
document_from_node(self).remove_stylesheet(self.upcast(), &s);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -196,8 +196,8 @@ impl VirtualMethods for HTMLMetaElement {
|
||||||
if context.tree_in_doc {
|
if context.tree_in_doc {
|
||||||
self.process_referrer_attribute();
|
self.process_referrer_attribute();
|
||||||
|
|
||||||
if let Some(ref s) = *self.stylesheet.borrow() {
|
if let Some(s) = self.stylesheet.borrow_mut().take() {
|
||||||
document_from_node(self).remove_stylesheet(self.upcast(), s);
|
document_from_node(self).remove_stylesheet(self.upcast(), &s);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -190,9 +190,8 @@ impl VirtualMethods for HTMLStyleElement {
|
||||||
}
|
}
|
||||||
|
|
||||||
if context.tree_in_doc {
|
if context.tree_in_doc {
|
||||||
if let Some(ref s) = *self.stylesheet.borrow() {
|
if let Some(s) = self.stylesheet.borrow_mut().take() {
|
||||||
let doc = document_from_node(self);
|
document_from_node(self).remove_stylesheet(self.upcast(), &s)
|
||||||
doc.remove_stylesheet(self.upcast(), s)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue