mirror of
https://github.com/servo/servo
synced 2026-05-13 02:17:06 +02:00
This change is meant to make it more obvious that adjusting the pinch zoom of a `WebView` works differently than adjusting the page zoom. New pinch zoom values are *always* zoom deltas, that is they are always multiplied by the current pinch zoom value. This is due to the way that system APIs and Servo's internal touch handler provide values. In addition, stop clamping the pinch zoom by the page zoom clamp values. They aren't meant for that. Instead set up some reasonable clamping values for pinch zoom in the compositor. Also add more rustdoc for public API. Testing: The changes to API naming do not really need tests, and the changes to behavior (the clamping) can't be easily tested now as there is no way currently to read the current pinch zoom level of the WebView. This requires more API in the renderer. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Rakhi Sharma <atbrakhi@igalia.com>