Set IS_CONNECTED flag on host and children instead of on containing shadow root

This commit is contained in:
Fernando Jiménez Moreno 2019-03-06 16:55:27 +01:00
parent 1427c43620
commit b8925a0297

View file

@ -2802,7 +2802,7 @@ impl VirtualMethods for Element {
f.bind_form_control_to_tree();
}
if let Some(shadow_root) = self.upcast::<Node>().owner_shadow_root() {
if let Some(shadow_root) = self.rare_data.shadow_root.get() {
let shadow_root = shadow_root.upcast::<Node>();
shadow_root.set_flag(NodeFlags::IS_CONNECTED, context.tree_connected);
for node in shadow_root.children() {