Files
ladybird/Tests/LibWeb/Text/input/css/content-visibility-interpolation.html
Tim Ledbetter 49f8fafc2e LibWeb: Treat content-visibility auto as non-hidden in interpolation
This matches the interpolation behavior of the `visibility` property
and of other engines.
2026-01-13 10:49:31 +01:00

27 lines
812 B
HTML

<!DOCTYPE html>
<div id="target"></div>
<script src="../include.js"></script>
<script>
test(() => {
const div = document.getElementById("target");
const animation = div.animate(
{ contentVisibility: ["visible", "auto"] },
{ duration: 1000, fill: "both" }
);
animation.currentTime = 0;
println(`progress 0: ${getComputedStyle(div).contentVisibility}`);
animation.currentTime = 400;
println(`progress 0.4: ${getComputedStyle(div).contentVisibility}`);
animation.currentTime = 600;
println(`progress 0.6: ${getComputedStyle(div).contentVisibility}`);
animation.currentTime = 1000;
println(`progress 1: ${getComputedStyle(div).contentVisibility}`);
animation.cancel();
});
</script>