Do not add shadow tree styles to stylist

This commit is contained in:
Fernando Jiménez Moreno 2019-02-13 18:22:20 +01:00
parent 519cc2c317
commit 47872cdaa3
2 changed files with 9 additions and 8 deletions

View file

@ -4603,6 +4603,15 @@ impl StyleSheetListOwner for Dom<Document> {
.is_before(sheet_in_doc.owner.upcast())
})
.cloned();
self.window
.layout_chan()
.send(Msg::AddStylesheet(
sheet.clone(),
insertion_point.as_ref().map(|s| s.sheet.clone()),
))
.unwrap();
self.document_or_shadow_root.add_stylesheet(
owner,
stylesheets,

View file

@ -253,14 +253,6 @@ impl DocumentOrShadowRoot {
"Wat"
);
self.window
.layout_chan()
.send(Msg::AddStylesheet(
sheet.clone(),
insertion_point.as_ref().map(|s| s.sheet.clone()),
))
.unwrap();
let sheet = StyleSheetInDocument {
sheet,
owner: Dom::from_ref(owner),