aboutsummaryrefslogtreecommitdiffstats
path: root/components/servo
diff options
context:
space:
mode:
authorMartin Robinson <mrobinson@igalia.com>2023-10-03 14:49:36 +0200
committerGitHub <noreply@github.com>2023-10-03 12:49:36 +0000
commitdfd14aabef7eb33b09ed5d3b6e4f7faf4cf94b3b (patch)
treed49da8b4c0a642eaa1a37eadd45ec9a7a2cee043 /components/servo
parentf78d53daaa6ff1235a80684314cb39ea9996739a (diff)
downloadservo-dfd14aabef7eb33b09ed5d3b6e4f7faf4cf94b3b.tar.gz
servo-dfd14aabef7eb33b09ed5d3b6e4f7faf4cf94b3b.zip
Fix pinch zoom and enable it for TouchpadMagnify events (#30459)
Pinch zoom was broken because pinch zoom events were triggered at -1, -1 in the compositor. This change: 1. Differentiates between magnify and scroll events in the compositor to remove the question of where to trigger them. 2. Converts winit TouchpadMagnify events into pinch zoom events so that this works properly on MacOS.
Diffstat (limited to 'components/servo')
-rw-r--r--components/servo/lib.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/servo/lib.rs b/components/servo/lib.rs
index e62a8e5f11b..36ceac156e0 100644
--- a/components/servo/lib.rs
+++ b/components/servo/lib.rs
@@ -548,8 +548,8 @@ where
self.compositor.on_zoom_reset_window_event();
},
- EmbedderEvent::PinchZoom(magnification) => {
- self.compositor.on_pinch_zoom_window_event(magnification);
+ EmbedderEvent::PinchZoom(zoom) => {
+ self.compositor.on_pinch_zoom_window_event(zoom);
},
EmbedderEvent::Navigation(top_level_browsing_context_id, direction) => {