mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 17:55:07 +02:00
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.
27 lines
727 B
HTML
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>
|