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