Skip to content
Permalink
Browse files

Revert style/dom_apis changes

  • Loading branch information...
ferjm committed Mar 7, 2019
1 parent bdd2f32 commit 5be6779f9a65218a41d970eab6f01dd5d6b60775
Showing with 8 additions and 9 deletions.
  1. +8 −9 components/style/dom_apis.rs
@@ -241,11 +241,10 @@ where
}

if root.as_shadow_root().is_some() {
debug_assert!(element.as_node().is_in_document(), "Not connected?");
debug_assert_eq!(
element.containing_shadow().unwrap().as_node(),
root,
"Where did this element come from?"
"Not connected?"
);
return true;
}
@@ -277,15 +276,15 @@ where
}

if root.is_in_document() {
if let Some(shadow) = root.as_shadow_root() {
return shadow.elements_with_id(id);
}
return root.owner_doc().elements_with_id(id);
}

if let Some(shadow) = root.as_element().and_then(|e| e.containing_shadow()) {
return shadow.elements_with_id(id);
}
if let Some(shadow) = root.as_shadow_root() {
return shadow.elements_with_id(id);
}

return root.owner_doc().elements_with_id(id);
if let Some(shadow) = root.as_element().and_then(|e| e.containing_shadow()) {
return shadow.elements_with_id(id);
}

Err(())

0 comments on commit 5be6779

Please sign in to comment.
You can’t perform that action at this time.