mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-18 23:12:02 +00:00
When restructuring inline nodes because of a block element insertion during the layout tree build, we might end up with a `display: contents` element in the ancestor stack that is not part of the actual layout tree, since it's never actually used as a parent for any node. Because we were only rewinding the ancestor stack with actual new layout nodes, it became corrupted and layout nodes were added to the wrong parent. This new logic leaves the ancestor stack intact, only replacing layout nodes whenever a new one is created. Fixes the sidebar on https://reddit.com. Fixes #3590.
24 lines
646 B
HTML
24 lines
646 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<body>
|
|
<b>foo</b><div><b>bar</b></div>
|
|
<hr>
|
|
<div><b>foo</b></div><b>bar</b>
|
|
<hr>
|
|
<b>foo</b><div><b>bar</b></div><b>baz</b>
|
|
<hr>
|
|
<b>foo<i>bar</i></b><div><b><i>baz</i></b></div><b><i>lorem</i>ipsum</b>
|
|
<hr>
|
|
<b>foo</b><div><b>bar</b></div><div><b>baz</b></div><b>lorem</b>
|
|
<hr>
|
|
<b>foo</b><div><b>bar</b></div><b><u>baz</u></b><div><b>lorem</b></div><b>ipsum</b>
|
|
<hr>
|
|
<div>foo<div><b>bar</b></div></div>
|
|
<hr>
|
|
<b>foo</b><div><b>bar</b></div><b>baz</b>
|
|
<hr>
|
|
<span>foo</span><div>bar</div>
|
|
<hr>
|
|
<b>foo</b><div><b>bar</b></div><b>baz</b>
|
|
</body>
|
|
</html>
|