mirror of
https://github.com/servo/servo
synced 2026-05-11 01:22:19 +02:00
The static position of an abspos is the hypothetical position that it would have had in the normal flow. If the abspos is inside inline layout and it had a block-level original display, then the static position is computed as if the abspos was a block-level that breaks the inline. Usually this places the static position after the current line. However, if the abspos is not preceded by any text, padding, border, margin, preserved newline or atomic inline, then the static position should be as if the abspos was preceded by a 0px tall phantom line. Previously we weren't taking that into account. Note that browsers aren't completely interoperable in corner cases. Testing: Adding 3 new tests. Blink fails the 2nd one and Gecko fails the 3rd one. WebKit and Servo pass them all. Fixes: #41990 Signed-off-by: Oriol Brufau <obrufau@igalia.com>