Do not send RemoveStyleSheet message for shadow roots

This commit is contained in:
Fernando Jiménez Moreno 2019-02-28 16:42:19 +01:00
parent 3e63655018
commit 3e53962b25
2 changed files with 6 additions and 6 deletions

View file

@ -4655,6 +4655,11 @@ impl StyleSheetListOwner for Dom<Document> {
/// Remove a stylesheet owned by `owner` from the list of document sheets.
#[allow(unrooted_must_root)] // Owner needs to be rooted already necessarily.
fn remove_stylesheet(&self, owner: &Element, s: &Arc<Stylesheet>) {
self.window
.layout_chan()
.send(Msg::RemoveStylesheet(s.clone()))
.unwrap();
self.document_or_shadow_root.remove_stylesheet(
owner,
s,