Tweak list of shadow roots attached to doc

This commit is contained in:
Fernando Jiménez Moreno 2019-03-06 18:02:10 +01:00
parent b8925a0297
commit 0313e38074
3 changed files with 14 additions and 10 deletions

View file

@ -430,7 +430,10 @@ impl<'ld> ServoLayoutDocument<'ld> {
self.document
.shadow_roots()
.iter()
.map(|sr| ServoShadowRoot::from_layout_js(*sr))
.map(|sr| {
debug_assert!(sr.upcast::<Node>().get_flag(NodeFlags::IS_CONNECTED));
ServoShadowRoot::from_layout_js(*sr)
})
.collect()
}
}