Files
ladybird/Tests/LibWeb/Layout/input/layout-tree-update/change-position-for-child-of-display-contents.html
Andreas Kling b28480f62d LibWeb: Propagate layout tree update in display: contents to parent
When an element has `display: contents` and it gets marked for a layout
tree rebuild, we actually have to mark its parent for rebuild as well.

The structure of the parent (and siblings) may change depending on how
the `display: contents` element changes (e.g position, display, etc.)
2025-11-08 11:20:32 +01:00

21 lines
467 B
HTML

<!doctype html><head><script>
window.onload = function() {
let art = document.querySelector("article");
art.style.position = "static";
art.offsetWidth;
art.style.position = "relative";
art.offsetWidth;
art.style.position = "static";
art.offsetWidth;
art.style.position = "relative";
art.offsetWidth;
};
</script><style>
main {
display: contents;
background: red;
}
</style></head><body><main><article>wat