mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 17:55:07 +02:00
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.
This commit is contained in:
Notes:
github-actions[bot]
2026-03-09 14:37:47 +00:00
Author: https://github.com/Calme1709 Commit: https://github.com/LadybirdBrowser/ladybird/commit/33c0e557629 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/8244 Reviewed-by: https://github.com/AtkinsSJ ✅
@@ -0,0 +1,40 @@
|
||||
<!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>
|
||||
Reference in New Issue
Block a user