Files
ladybird/Tests/LibWeb/Text/expected/scroll-with-pinch-zoom-applied.txt
Aliaksandr Kalenik f63674e92d LibWeb: Fix scroll regression when pinch-to-zoom is applied
When scrolling with a visual viewport offset (from pinch-to-zoom),
scroll_viewport_by_delta() was passing m_viewport_scroll_offset + delta
to perform_a_scroll_of_the_viewport(). However, that function calculates
the scroll delta as `position - page_top()`, where page_top() includes
the visual viewport offset. This caused the effective scroll delta to be
reduced by the visual offset amount.

Fix by using the current page position (which includes the visual
offset) as the base for the delta calculation.

Regression from 0a57e1e8ac.
2026-01-23 17:52:50 +01:00

5 lines
119 B
Plaintext

Initial: pageTop=0, scale=1
After zoom: pageTop=33.328125, scale=1.5, offsetTop=33.328125
pageTop changed by: 100
PASS