Automatic update from web-platform-tests script: Only call `CSSRuleList::append_lazy_dom_rule` when appending keyframes if the rule list exists The changes from #45173 exposed a new panic where appending a keyframe rule can lazily construct a `CSSRuleList` during the process of keyframe append. Lazily constructing `CSSRuleList` and then immediately appending a lazy DOM rule means that the `CSSRuleList` looks like it has one extra CSS rule than it actually has -- leading to a later panic. This change fixes that issue by only calling `CSSRuleList::append_lazy_dom_rule` if the `CSSRuleList` has already been constructed. Signed-off-by: Martin Robinson <martin@abandonedwig.info> -- wpt-commits: bbb0214ed3ec964fbe01a524e5cc7dade6175b46 wpt-pr: 60948
11 lines
294 B
HTML
11 lines
294 B
HTML
<!DOCTYPE html>
|
|
<title>CSSOM Test: Servo crash when modifying keyframe rules</title>
|
|
<link rel="help" href="https://github.com/servo/servo/issues/44990">
|
|
<style>
|
|
@keyframes keyframes0 {}
|
|
</style>
|
|
<script>
|
|
onload = _ =>
|
|
document.styleSheets[0].cssRules[0].appendRule("0% {}");
|
|
</script>
|