mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 09:45:06 +02:00
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.)
21 lines
467 B
HTML
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
|