mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 17:55:07 +02:00
When a CSS animation keyframe uses var() referencing a nonexistent or invalid custom property, variable substitution produces a guaranteed-invalid value. The animation keyframe processing code did not handle this case, allowing the value to reach compute_opacity() (and similar functions) which would hit VERIFY_NOT_REACHED(). Fix this by skipping guaranteed-invalid values in compute_keyframe_values, matching how the regular cascading code treats them. This fixes a crash on chess.com.
14 lines
371 B
HTML
14 lines
371 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<div id="foo"></div>
|
|
<script src="../include.js"></script>
|
|
<script>
|
|
test(() => {
|
|
const anim = foo.animate([{ opacity: "var(--nonexistent)" }, { opacity: "1" }], 1000);
|
|
anim.pause();
|
|
anim.currentTime = 500;
|
|
println(getComputedStyle(foo).opacity);
|
|
});
|
|
</script>
|
|
</html>
|