mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +00:00
LibWeb: Retain display: contents
in ancestor stack for continuations
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.
This commit is contained in:
parent
dd8cca180f
commit
de7ca7b157
Notes:
github-actions[bot]
2025-02-18 22:32:41 +00:00
Author: https://github.com/gmta
Commit: de7ca7b157
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3617
3 changed files with 13 additions and 12 deletions
|
@ -18,5 +18,7 @@
|
|||
<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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue