LibWeb: Always do parent document layout updates before updating style

We were doing this manually within `Document::update_layout()` and
`CSSStyleProperties::get_direct_property()` but we should do it for all
callers of `Document::update_style()`
This commit is contained in:
Callum Law
2025-10-29 22:39:24 +13:00
committed by Alexander Kalenik
parent b5db79be6d
commit 56e2ac8a9d
Notes: github-actions[bot] 2025-11-02 22:55:42 +00:00
5 changed files with 38 additions and 13 deletions

View File

@@ -0,0 +1,31 @@
<!DOCTYPE html>
<html>
<iframe
width="499"
id="frame"
srcdoc="
<!DOCTYPE html>
<html>
<style>
@keyframes foo {}
@media (width >= 500px) {
#bar {
animation: foo 1s;
}
}
</style>
<div id='bar'></div>
</html>
"
></iframe>
<script src="../include.js"></script>
<script>
promiseTest(async () => {
await new Promise(resolve => window.addEventListener("load", resolve));
frame.width = "500";
println(frame.contentDocument.getAnimations().length);
});
</script>
</html>