mirror of
https://github.com/servo/servo.git
synced 2025-07-18 04:43:41 +01:00
This patch contains 2 components: 1. Instead of passing `self.pinch_zoom_level().get()` while checking `zoom_result`, initialize it in `combined_magnification`. Ideally, this part shouldn't have any effect on behavior. 2. Separates the logic for PinchZoom and ViewportZoom. So, when a new page is opened, it will start with its own viewport zoom scale (rather than the previous scale multiples). i.e `self.pinch_zoom_level().get() * 1.0 * magnification` ```rust let mut combined_magnification = 1.0; ... ScrollZoomEvent::ViewportZoom(magnification) => { combined_magnification *= magnification }, ... let pinch_zoom_result = match self.set_pinch_zoom_level(self.pinch_zoom_level().get() * combined_magnification) ``` Testing: This change adds a new WPT test. Fixes: #37314 --------- Signed-off-by: Shubham Gupta <shubham13297@gmail.com> |
||
---|---|---|
.. | ||
Cargo.toml | ||
compositor.rs | ||
lib.rs | ||
refresh_driver.rs | ||
touch.rs | ||
tracing.rs | ||
webview_manager.rs | ||
webview_renderer.rs |