Skip to content

Commit

Permalink
Ensure we pass integer coordinates to actions
Browse files Browse the repository at this point in the history
Differential Revision: https://phabricator.services.mozilla.com/D151531

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1543337
gecko-commit: dcf8d6675ecb10b9d5618c37d020e40da24c434d
gecko-reviewers: webdriver-reviewers, whimboo
  • Loading branch information
jgraham committed Sep 23, 2022
1 parent f80617c commit 1f01904
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions visual-viewport/viewport_support.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
// separation.
function pinchZoomIn() {
const viewport = window.visualViewport;
const center_x = (viewport.width * viewport.scale) / 2;
const center_y = (viewport.height * viewport.scale) / 2;
const center_x = Math.floor((viewport.width * viewport.scale) / 2);
const center_y = Math.floor((viewport.height * viewport.scale) / 2);

return new test_driver.Actions()
.setContext(window)
Expand Down

0 comments on commit 1f01904

Please sign in to comment.