libservo|compositor: Have scroll offset directionality match that of WebRender and the web (#37752)

Previously, our Servo-specific spatial tree scroll offsets were opposite
to
that of WebRender and also the web platform. This is due to the fact,
likely, that `winit` wheel directionality is also flipped. This change
has both the Servo spatial tree and the API take offsets that are
consistent with the web.

Any possible changes to the meaning of wheel directionality will be
handled in a followup change.

This is a breaking change to the Servo API.

Testing: This change updates unit tests.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
Martin Robinson 2025-07-03 15:04:06 +02:00 committed by GitHub
parent d33d057763
commit 89bfa26f00
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 54 additions and 132 deletions

View file

@ -476,7 +476,6 @@ impl Layout for LayoutThread {
.borrow_mut()
.as_mut()
.and_then(|tree| tree.compositor_info.scroll_tree.scroll_offset(id))
.map(|scroll_offset| -scroll_offset)
}
}
@ -1083,7 +1082,7 @@ impl LayoutThread {
.scroll_tree
.set_scroll_offset_for_node_with_external_scroll_id(
external_scroll_id,
-offset,
offset,
ScrollType::Script,
)
{