mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
script: Handle shadow roots when determining common ancestors of dirty roots. (#35132)
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
parent
6195026db0
commit
ac22157491
2 changed files with 12 additions and 3 deletions
|
@ -606,8 +606,15 @@ impl Document {
|
|||
ancestor.set_flag(NodeFlags::HAS_DIRTY_DESCENDANTS, has_dirty_descendants);
|
||||
has_dirty_descendants &= *ancestor != *new_dirty_root;
|
||||
}
|
||||
self.dirty_root
|
||||
.set(Some(new_dirty_root.downcast::<Element>().unwrap()));
|
||||
|
||||
let maybe_shadow_host = new_dirty_root
|
||||
.downcast::<ShadowRoot>()
|
||||
.map(ShadowRootMethods::Host);
|
||||
let new_dirty_root_element = new_dirty_root
|
||||
.downcast::<Element>()
|
||||
.or(maybe_shadow_host.as_deref());
|
||||
|
||||
self.dirty_root.set(new_dirty_root_element);
|
||||
}
|
||||
|
||||
pub(crate) fn take_dirty_root(&self) -> Option<DomRoot<Element>> {
|
||||
|
|
|
@ -1,2 +1,4 @@
|
|||
[test-003.html]
|
||||
expected: CRASH
|
||||
expected: TIMEOUT
|
||||
[A_05_05_03_T01]
|
||||
expected: TIMEOUT
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue