mirror of
https://github.com/servo/servo.git
synced 2025-07-23 15:23:42 +01:00
Don't register unconnected shadow roots with their owner document (#34361)
* Don't falsely register Shadow Roots as connected Previously, a shadowroot would be registered as connected during the shadow hosts bind_to_tree call, even if the host was being bound to an element that was not itself connected to a document. Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Update WPT expectations Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Move bind/unbind methods into a VirtualMethod impl Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Add DocumentFragment/Shadowroot to vtable_for Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
parent
888a93af47
commit
f1e89c58a6
10 changed files with 161 additions and 27 deletions
|
@ -20,6 +20,7 @@ use crate::dom::element::Element;
|
|||
use crate::dom::htmlcollection::HTMLCollection;
|
||||
use crate::dom::node::{window_from_node, Node};
|
||||
use crate::dom::nodelist::NodeList;
|
||||
use crate::dom::virtualmethods::VirtualMethods;
|
||||
use crate::dom::window::Window;
|
||||
use crate::script_runtime::CanGc;
|
||||
|
||||
|
@ -132,3 +133,9 @@ impl DocumentFragmentMethods<crate::DomTypeHolder> for DocumentFragment {
|
|||
self.upcast::<Node>().query_selector_all(selectors)
|
||||
}
|
||||
}
|
||||
|
||||
impl VirtualMethods for DocumentFragment {
|
||||
fn super_type(&self) -> Option<&dyn VirtualMethods> {
|
||||
Some(self.upcast::<Node>() as &dyn VirtualMethods)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue