mirror of
https://github.com/servo/servo.git
synced 2025-09-30 08:39:16 +01:00
html: Properly count <image>/<source> insertion/removal steps as the relevant mutations (#39452)
Follow the HTML specification and take into account that the HTML `<image>/<source>` element inserting/removal steps should only be counted as relevant mutations for `<image>` element if the parent of the inclusive ancestor that was inserted/removed is the parent `<picture>` element. See <https://html.spec.whatwg.org/multipage/#relevant-mutations>. Testing: Improvements in the following tests - html/semantics/embedded-content/the-img-element/relevant-mutations.html Signed-off-by: Andrei Volykhin <andrei.volykhin@gmail.com>
This commit is contained in:
parent
c63311af02
commit
99fbd36b5d
6 changed files with 75 additions and 71 deletions
|
@ -737,11 +737,7 @@ impl Element {
|
|||
.upcast::<Node>()
|
||||
.set_containing_shadow_root(Some(&shadow_root));
|
||||
|
||||
let bind_context = BindContext {
|
||||
tree_connected: self.upcast::<Node>().is_connected(),
|
||||
tree_is_in_a_document_tree: self.upcast::<Node>().is_in_a_document_tree(),
|
||||
tree_is_in_a_shadow_tree: true,
|
||||
};
|
||||
let bind_context = BindContext::new(&self.node);
|
||||
shadow_root.bind_to_tree(&bind_context, can_gc);
|
||||
|
||||
let node = self.upcast::<Node>();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue