fune/testing/web-platform/tests/css/css-animations/CSSAnimation-getKeyframes-crash.html
Kevin Ellis 1bef6999f2 Bug 1769676 [wpt PR 34089] - Fix null READ when calling getKeyframes on an orphaned element, a=testonly
Automatic update from web-platform-tests
Fix null READ when calling getKeyframes on an orphaned element

Values of CSS properties are resolved when retrieving keyframes.
This resolution triggered a DCHECK failure if the effects target
was orphaned since it would not have a computed style.

Bug:  1326225

Change-Id: Ie60eff021a215baf41503d47a056903ff39ce018
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3649496
Commit-Queue: Kevin Ellis <kevers@chromium.org>
Reviewed-by: Anders Hartvoll Ruud <andruud@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1004364}

--

wpt-commits: ee5f3c9979f0d1fffd6eadaa79f5228f0b3570ea
wpt-pr: 34089
2022-05-22 08:37:06 +00:00

26 lines
636 B
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="help" href="https://crbug.com/1326225">
<title>Crash test calling getKeyframes on an orphaned element</title>
</head>
<style type="text/css">
@keyframes anim {
from { left: 0; }
}
</style>
<body>
<div id="container">
<div id="target">
</div>
</div>
</body>
<script type="text/javascript">
target.style.animation = "anim 0.01s";
var animation = target.getAnimations()[0];
container.innerHTML = 1;
animation.effect.getKeyframes()[0].hasOwnProperty();
</script>
</html>