mirror of
https://github.com/servo/servo
synced 2026-05-09 16:42:16 +02:00
Sticky positioning tries to keep an element visible within the nearest scrollport. However, the element can't be offset to go beyond its containing block. We implement this as offset bounds. The problem was that, if the element would already be overflowing its containing block before applying the sticky positioning, then we were forcing it to move inside the containing block. That was wrong, and is solved by flooring or ceiling the offset bounds by zero. Testing: Adding new tests Signed-off-by: Oriol Brufau <obrufau@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>