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
10 lines
309 B
HTML
10 lines
309 B
HTML
<!DOCTYPE html>
|
|
<title>CSSOM Test: Servo crash when modifying keyframe rules</title>
|
|
<link rel="help" href="https://github.com/servo/servo/issues/46025">
|
|
<style>@keyframes keyframe {}</style>
|
|
<script>
|
|
let rule = document.styleSheets[0].cssRules[0];
|
|
rule.appendRule("1% { }")
|
|
rule.cssRules[1];
|
|
</script>
|