mirror of
https://github.com/servo/servo
synced 2026-05-14 10:56:44 +02:00
Previously in the `WebView::set_zoom` API, we were multiplying the zoom value with the current page zoom. This made it hard to absolute zoom value or to reset the zoom value entirely. This PR modifies the API to take a final zoom value. Now it's the embedder's responsibility to calculate relative zoom changes. In addition, API is renamed to `WebView::set_page_zoom()` and `WebView::page_zoom()` in order to better distinguished between page zoom and pinch zoom. Testing: Added unit test Signed-off-by: atbrakhi <atbrakhi@igalia.com> Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Shubham Gupta <shubham13297@gmail.com>