Files
ladybird/Tests/LibWeb/Text/expected/SVG/svg-foreignObject-abspos-preserved-during-partial-relayout.txt
Aliaksandr Kalenik b3231ea2a0 LibWeb: Make foreignObject establish a containing block for abspos
Absolutely positioned elements inside SVG foreignObject were being
positioned relative to an ancestor containing block outside the SVG,
instead of relative to the foreignObject itself. Per a W3C resolution
and the behavior of other browsers, foreignObject should establish a
containing block for absolutely and fixed positioned elements.

With this fix, the `has_abspos_with_external_containing_block` check
in `set_needs_layout_update()` and the abspos preservation loop in
`relayout_svg_root()` become dead code — remove both and simplify the
ancestor loops. Rename related tests to reflect the new behavior.

Fixes https://github.com/LadybirdBrowser/ladybird/issues/3241
2026-02-17 15:59:59 +01:00

16 lines
305 B
Plaintext

Before SVG relayout:
abspos width: 25
abspos height: 25
abspos x: 18
abspos y: 18
After SVG relayout:
abspos width: 25
abspos height: 25
abspos x: 18
abspos y: 18
Abspos preserved after SVG relayout:
width unchanged: true
height unchanged: true
x unchanged: true
y unchanged: true