mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-11 09:27:00 +02:00
When an inline-relative is split by block-level descendants, the rect computation only looked at one anonymous wrapper and returned empty for everything else, sending abspos placement back to the initial containing block. On Reddit this let an inline-relative ad host's <a> overlay the entire viewport and steal clicks from the post gallery's pager buttons. Walk every descendant of the inline's real block container instead, collecting fragments from any InlineNode part of the inline plus the border-box rects of its in-flow Box descendants. Matches what other engines expose via getClientRects() for split inlines. While here, narrow the inline-CB detection to the triggers that actually apply on non-atomic inlines: `position`, `filter`, `backdrop-filter` (and their will-change hints). transform, contain and the rest don't apply per their specs - the broader check would have started routing the WPT contain-paint/contain-layout ib-split tests through the inline path once the rect computation began returning non-empty results.
127 KiB
127 KiB