servo/components/compositing
Shubham Gupta 34829dfce7
renderer: Have the viewport meta element establish the initial zoom of new pages (#37315)
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>
2025-07-15 13:54:05 +00:00
..
Cargo.toml chore: Simplify tracing with servo_tracing macro (#36661) (#37497) 2025-06-18 16:18:04 +00:00
compositor.rs compositor: Do not wait for animation termination to take screenshots (#38055) 2025-07-14 12:18:18 +00:00
lib.rs compositor: Add an initial RefreshDriver (#37169) 2025-05-29 10:43:49 +00:00
refresh_driver.rs script: Allow reflows that do not produce display lists (#37186) 2025-06-12 19:25:04 +00:00
touch.rs libservo|compositor: Have scroll offset directionality match that of WebRender and the web (#37752) 2025-07-03 13:04:06 +00:00
tracing.rs script: Get the screen metrics from the WebViewDelegate instead of via the compositor (#38020) 2025-07-12 16:07:39 +00:00
webview_manager.rs Reduce indexing boilerplate for serializable/transferrable objects. (#36624) 2025-04-22 02:02:02 +00:00
webview_renderer.rs renderer: Have the viewport meta element establish the initial zoom of new pages (#37315) 2025-07-15 13:54:05 +00:00