mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-23 00:19:18 +00:00
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.
14 lines
226 B
HTML
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>
|