mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Revert style/dom_apis changes
This commit is contained in:
parent
bdd2f32c0f
commit
5be6779f9a
1 changed files with 9 additions and 10 deletions
|
@ -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,17 +276,17 @@ where
|
|||
}
|
||||
|
||||
if root.is_in_document() {
|
||||
if let Some(shadow) = root.as_shadow_root() {
|
||||
return shadow.elements_with_id(id);
|
||||
}
|
||||
|
||||
if let Some(shadow) = root.as_element().and_then(|e| e.containing_shadow()) {
|
||||
return shadow.elements_with_id(id);
|
||||
}
|
||||
|
||||
return root.owner_doc().elements_with_id(id);
|
||||
}
|
||||
|
||||
if let Some(shadow) = root.as_shadow_root() {
|
||||
return shadow.elements_with_id(id);
|
||||
}
|
||||
|
||||
if let Some(shadow) = root.as_element().and_then(|e| e.containing_shadow()) {
|
||||
return shadow.elements_with_id(id);
|
||||
}
|
||||
|
||||
Err(())
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue