Don't explicitly restyle when updating <details> shadow tree (#36769)

I'm not sure why I added these calls in the first place, but they don't
seem to be necessary and seem to be the cause of crashes.

This PR also adds some spec comments that I added while investigating
the crash.


Testing: Covered by existing WPT tests
Fixes https://github.com/servo/servo/issues/36757
Fixes https://github.com/servo/servo/issues/36273

[try
run](https://github.com/simonwuelker/servo/actions/runs/14753023662/job/41415889180)

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
Simon Wülker 2025-04-30 14:24:27 +02:00 committed by GitHub
parent af5d665efa
commit c98cf8b306
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 30 additions and 24 deletions

View file

@ -178,8 +178,6 @@ impl HTMLDetailsElement {
}
}
shadow_tree.descendants.Assign(slottable_children);
self.upcast::<Node>().dirty(NodeDamage::OtherNodeDamage);
}
fn update_shadow_tree_styles(&self, can_gc: CanGc) {
@ -214,8 +212,6 @@ impl HTMLDetailsElement {
.implicit_summary
.upcast::<Element>()
.set_string_attribute(&local_name!("style"), implicit_summary_style.into(), can_gc);
self.upcast::<Node>().dirty(NodeDamage::OtherNodeDamage);
}
}