ladybird/Tests/LibWeb/Layout/input/svg/foreignObject-with-abspos-descendant.html
Andreas Kling ddcb87fb40 LibWeb: Make TreeBuilder nicer to SVG foreignObject
This patch does two things:

1. Makes TreeBuilder never cross the foreignObject boundary when looking
   for an appropriate insertion parent. Before this change, we would
   sometimes make things inside the foreignObject DOM subtree have
   layout nodes outside the foreignObject.

2. Makes foreignObject boxes participate in the anonymous wrapping of
   inline-level boxes. This is particularly imporant for absolutely
   positioned elements inside foreignObject, which were previously
   getting incorrectly wrapped if there was any text (even empty)
   preceding the abspos element.
2025-07-09 14:36:08 +02:00

14 lines
226 B
HTML

<!doctype HTML>
<style>
.el {
width: 50px;
height: 60px;
position: absolute;
}
</style>
<svg style="display: block">
<foreignObject width=100 height=200>
<div class="el"></div>
</foreignObject>
</svg>