Files
ladybird/Tests/LibWeb/Text/input/css/element-requires-update-if-navigable-container-does.html
Callum Law 33c0e55762 LibWeb: Check navigable container for whether element needs style update
The style of an element depends on it's navigable's viewport size which
in turn depends on the navigable's container's style - so if requires a
style update then so does the original element.
2026-03-09 14:36:18 +00:00

41 lines
891 B
HTML

<!doctype html>
<style>
iframe {
width: 50px;
height: 0px;
}
</style>
<iframe
id="iframe"
srcdoc="
<div id=target></div>
<style>
#target {
order: calc(100vh / 1px);
}
</style>
"
></iframe>
<script src="../include.js"></script>
<script>
asyncTest(done => {
iframe.addEventListener("load", () => {
requestAnimationFrame(() => {
requestAnimationFrame(() => {
const target = iframe.contentDocument.querySelector("#target");
println(getComputedStyle(target).order);
for (let height of [1, 2, 3]) {
iframe.style.height = `${height}px`;
println(getComputedStyle(target).order);
}
done();
});
});
});
});
</script>