Files
ladybird/Tests/LibWeb/Text/input/css/recompute-inherited-style-animated-properties.html
Callum Law 9330bf4b72 LibWeb: Propagate animated values in recompute_inherited_style
As `recompute_inherited_style` works in-place rather than building
ComputedProperties from scratch we need to keep track of which animated
properties are inherited to know whether we should remove them when we
have no more inherited value.
2025-08-21 10:46:55 +01:00

27 lines
727 B
HTML

<!DOCTYPE html>
<html>
<style>
#bar {
color: inherit;
}
</style>
<div id="foo"><div id="bar"></div></div>
<script src="../include.js"></script>
<script>
asyncTest(done => {
// Wait for first layout to complete so we ensure this is done via `recompute_inherited_style()`
setTimeout(() => {
const animation = foo.animate([{ color: "red" }, { color: "blue" }], {
duration: 1000,
});
animation.pause();
animation.currentTime = 500;
println(getComputedStyle(bar).color);
done();
}, 100);
});
</script>
</html>