Skip to content

Use the client coordinates for the pinch-zoom origin - #21659

Merged
calixteman merged 1 commit into
mozilla:masterfrom
calixteman:fix/pinch-zoom-origin
Jul 31, 2026
Merged

Use the client coordinates for the pinch-zoom origin#21659
calixteman merged 1 commit into
mozilla:masterfrom
calixteman:fix/pinch-zoom-origin

Conversation

@calixteman

Copy link
Copy Markdown
Contributor

TouchManager computes the pinch distances with the screen coordinates, but it was passing the pinch center in that space too, while the viewer expects a client coordinate, like the origin coming from a wheel event.

Since a two-finger gesture can be synthesized with WebDriver BiDi, the pinch-zoom test doesn't have to rely on CDP anymore and can run in Chrome, where it fails without the above fix.

@calixteman
calixteman requested a review from timvandermeij July 29, 2026 13:38
@codecov-commenter

codecov-commenter commented Jul 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.98%. Comparing base (61acf93) to head (8960edd).
⚠️ Report is 14 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #21659   +/-   ##
=======================================
  Coverage   89.98%   89.98%           
=======================================
  Files         263      263           
  Lines       66887    66900   +13     
=======================================
+ Hits        60186    60200   +14     
+ Misses       6701     6700    -1     
Flag Coverage Δ
browsertest 66.53% <0.00%> (-0.02%) ⬇️
fonttest 9.04% <ø> (ø)
integrationtest 69.35% <100.00%> (+0.01%) ⬆️
unittest 57.82% <0.00%> (+0.24%) ⬆️
unittestcli 56.55% <0.00%> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@timvandermeij timvandermeij left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

r=me, with the comments addressed. Nice work on getting those tests unskipped!

Comment thread test/integration/ink_editor_spec.mjs Outdated
Comment thread test/integration/viewer_spec.mjs Outdated
Comment thread test/integration/ink_editor_spec.mjs
`TouchManager` computes the pinch distances with the screen coordinates, but it
was passing the pinch center in that space too, while the viewer expects a
client coordinate, like the origin coming from a wheel event.

Since a two-finger gesture can be synthesized with WebDriver BiDi, the
pinch-zoom test doesn't have to rely on CDP anymore and can run in Chrome, where
it fails without the above fix.
@calixteman
calixteman merged commit af38789 into mozilla:master Jul 31, 2026
21 checks passed
@calixteman
calixteman deleted the fix/pinch-zoom-origin branch July 31, 2026 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants