Skip to content

Conversation

@atbrakhi
Copy link
Member

@atbrakhi atbrakhi commented Oct 9, 2025

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

Copy link
Member

@mrobinson mrobinson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!

Co-authored-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Shubham Gupta <shubham13297@gmail.com>
Signed-off-by: atbrakhi <atbrakhi@igalia.com>
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
@atbrakhi atbrakhi marked this pull request as ready for review October 10, 2025 11:07
@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Oct 10, 2025
@mrobinson mrobinson enabled auto-merge October 10, 2025 11:11
@mrobinson mrobinson added this pull request to the merge queue Oct 10, 2025
@servo-highfive servo-highfive added the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Oct 10, 2025
Merged via the queue into servo:main with commit 7ea75b5 Oct 10, 2025
28 checks passed
@servo-highfive servo-highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Oct 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-awaiting-review There is new code that needs to be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants