Files
ladybird/Tests/LibWeb/Text/input/css/computation-context-cache-cleared-after-inherited-style-recomputation.html
Callum Law 33e590dddb LibWeb: Ensure that computation context cache is always cleared
Previously we didn't clear the computation context caches after:
 - Recomputing inherited style
 - Computing keyframe values

We now clear the caches in those two cases and verify it has been
cleared before using it.

Fixes #7959
2026-02-15 17:52:11 +01:00

30 lines
759 B
HTML

<!doctype html>
<html>
<style>
:root {
font-size: 50%;
}
#foo {
font-weight: inherit;
}
</style>
<div id="foo"></div>
<script src="../include.js"></script>
<script>
asyncTest(done => {
requestAnimationFrame(() => {
requestAnimationFrame(() => {
document.documentElement.style.fontWeight = "bold";
getComputedStyle(document.documentElement).fontSize;
document.documentElement.style.fontWeight = "normal";
println(getComputedStyle(document.documentElement).fontSize);
done();
});
});
});
</script>
</html>