Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pinch to zoom support #20109

Closed
fabricedesre opened this issue Feb 23, 2018 · 4 comments
Closed

Pinch to zoom support #20109

fabricedesre opened this issue Feb 23, 2018 · 4 comments
Assignees

Comments

@fabricedesre
Copy link
Contributor

When an embedder sends a sequence of touch events such as:
TouchEventType::Down, one or more TouchEventType::Move, TouchEventType::Up these are correctly used to pan the page and/or synthetized a click.

However when there are multiple TouchId tracked, they are not taken into account to provide a pinch to zoom functionality.

@paulrouget
Copy link
Contributor

Isn't that the job of the embedder to track the TouchId and do the zooming?

@fabricedesre
Copy link
Contributor Author

It's hard to let the embedder do that because the behavior can depend on whether preventDefault() was called on the touchstart event. But actually there seems to be support in components/compositing/touch.rs and components/compositing/compositor.rs, I will dig deeper to see what that was triggering in my tests.

@paulrouget
Copy link
Contributor

It should work like key events. Embedder send touch events to Servo, if Servo send them back, the embedder call the zoom functions.

@mbrubeck mbrubeck self-assigned this May 4, 2018
bors-servo pushed a commit that referenced this issue May 24, 2018
Basic pinch zoom handling

r? glennw

Basic fix for #20387 and #20109.  Note: Without calling `generate_frame`
when updating Webrender's pinch zoom level, rendering doesn't happen
reliably during/after a pinch zoom gesture.  I'm not sure whether this
is the correct way to fix that or not.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20749)
<!-- Reviewable:end -->
bors-servo pushed a commit that referenced this issue May 24, 2018
Basic pinch zoom handling

r? glennw

Basic fix for #20387 and #20109.  Note: Without calling `generate_frame`
when updating Webrender's pinch zoom level, rendering doesn't happen
reliably during/after a pinch zoom gesture.  I'm not sure whether this
is the correct way to fix that or not.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20749)
<!-- Reviewable:end -->
@jdm
Copy link
Member

jdm commented Jul 23, 2018

Fixed by #20749.

@jdm jdm closed this as completed Jul 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants