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

Add support for touch events on Android #22229

Merged
merged 1 commit into from Nov 21, 2018
Merged

Conversation

@Manishearth
Copy link
Member

Manishearth commented Nov 20, 2018

Currently on Android we treat all touch events as scroll events. Servo is already capable of distinguishing between scroll-touches and regular touch events (see on_touch_move in components/compositor/touch.rs), so we should just be passing touch events through.

Servo however does not natively support fling gestures, so we continue to use GestureDetector for that.

With this PR, the Three.js cloth animation can be panned around.

r? @paulrouget


This change is Reviewable

@Manishearth Manishearth force-pushed the Manishearth:touch-android branch from 470acce to 1122ccd Nov 20, 2018
@paulrouget
Copy link
Contributor

paulrouget commented Nov 21, 2018

Servo is already capable of distinguishing between scroll-touches and regular touch events

I missed that. Thanks. r=me.

Do we need to wait for #22187 before merging though?

@Manishearth
Copy link
Member Author

Manishearth commented Nov 21, 2018

I thought that was fixed?

Currently on Android we treat all touch events as scroll events. Servo
is already capable of distinguishing between scroll-touches and regular
touch events (see `on_touch_move` in `components/compositor/touch.rs`),
so we should just be passing touch events through.

Servo however does not natively support fling gestures, so we continue
to use `GestureDetector` for that.
@Manishearth Manishearth force-pushed the Manishearth:touch-android branch from 1122ccd to 3bccb8c Nov 21, 2018
@Manishearth
Copy link
Member Author

Manishearth commented Nov 21, 2018

@bors-servo r=paulrouget

@bors-servo
Copy link
Contributor

bors-servo commented Nov 21, 2018

📌 Commit 3bccb8c has been approved by paulrouget

@bors-servo
Copy link
Contributor

bors-servo commented Nov 21, 2018

Testing commit 3bccb8c with merge a9e0e21...

bors-servo added a commit that referenced this pull request Nov 21, 2018
Add support for touch events on Android

Currently on Android we treat all touch events as scroll events. Servo is already capable of distinguishing between scroll-touches and regular touch events (see `on_touch_move` in `components/compositor/touch.rs`), so we should just be passing touch events through.

Servo however does not natively support fling gestures, so we continue to use `GestureDetector` for that.

With this PR, the [Three.js cloth animation](https://threejs.org/examples/webgl_animation_cloth.html) can be panned around.

r? @paulrouget

<!-- 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/22229)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Nov 21, 2018

💔 Test failed - mac-rel-css1

@Manishearth
Copy link
Member Author

Manishearth commented Nov 21, 2018

@bors-servo
Copy link
Contributor

bors-servo commented Nov 21, 2018

💔 Test failed - mac-rel-css1

@CYBAI
Copy link
Collaborator

CYBAI commented Nov 21, 2018

@bors-servo retry

  • referer intermittent again
{"status": "NOTRUN", "group": "default", "message": null, "stack": null, "subtest": "The referrer URL is omitted when a\n                                 document served over http requires an https\n                                 sub-resource via a-tag using the rel-noreferrer\n                                 delivery method with keep-origin-redirect and when\n                                 the target request is cross-origin.", "test": "/_mozilla/mozilla/referrer-policy/no-referrer/rel-noreferrer/cross-origin/http-https/a-tag/generic.keep-origin-redirect.http.html", "line": 59731, "action": "test_result", "expected": "PASS"}
{"status": "TIMEOUT", "group": "default", "message": null, "stack": null, "subtest": null, "test": "/_mozilla/mozilla/referrer-policy/no-referrer/rel-noreferrer/cross-origin/http-https/a-tag/generic.keep-origin-redirect.http.html", "line": 59732, "action": "test_result", "expected": "OK"}
@bors-servo
Copy link
Contributor

bors-servo commented Nov 21, 2018

Testing commit 3bccb8c with merge 07e334a...

bors-servo added a commit that referenced this pull request Nov 21, 2018
Add support for touch events on Android

Currently on Android we treat all touch events as scroll events. Servo is already capable of distinguishing between scroll-touches and regular touch events (see `on_touch_move` in `components/compositor/touch.rs`), so we should just be passing touch events through.

Servo however does not natively support fling gestures, so we continue to use `GestureDetector` for that.

With this PR, the [Three.js cloth animation](https://threejs.org/examples/webgl_animation_cloth.html) can be panned around.

r? @paulrouget

<!-- 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/22229)
<!-- Reviewable:end -->
@bors-servo bors-servo merged commit 3bccb8c into servo:master Nov 21, 2018
3 checks passed
3 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
@Manishearth Manishearth deleted the Manishearth:touch-android branch Nov 21, 2018
@bors-servo
Copy link
Contributor

bors-servo commented Nov 21, 2018

💥 Test timed out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.