47 bytes, text/x-phabricator-request
|Details | Review|
A dispatchTouchEvent() API is need to implement scrolling and selection using Fire TV's DPAD (via touch event simulation). Without this, any site that uses a cursor cannot be interacted with. TBD: Is dispatchTouchEvent() the right API? Should DPAD support be implemented in A-C or inside GV itself instead of the FFTV app?
You can simulate touch events (and therefore scrolling) by calling GeckoSession.getPanZoomController().onTouchEvent(). Is this sufficient, or do we need something else? Do we really just want caret browsing for this type of thing?  https://mozilla.github.io/geckoview/javadoc/mozilla-central/org/mozilla/geckoview/PanZoomController.html#onTouchEvent-android.view.MotionEvent-
Currently, WebView handles web page dpad interactions (e.g. YouTube TV navigation, VoiceView accessibility). On top of that, we manually call `Activity.dispatchTouchEvent` (which afaik should use the same code path as someone touching the screen) to trigger a touch event (e.g. to click links using the cursor). I would expect GeckoView to work the same way and that it would be working correctly already (i.e. GeckoView handles dpad events when focused and touch events work without special casing in GeckoView). Perhaps we can check with Simon (would NI but no BZ yet?), who did the GeckoView implementation on Fire TV or pull down his WIP PR.
> A dispatchTouchEvent() API is need to implement scrolling This is actually using `WebView.scrollBy` . The original implementation may have simulated touch events but it was janky and inaccurate. : https://github.com/mozilla-mobile/firefox-tv/blob/00b61b4f5344eb878b0efa4cafb61d535f1b9bc3/app/src/main/java/org/mozilla/tv/firefox/ext/EngineView.kt#L90
Assignee: nobody → rbarker
Priority: P2 → P1
Summary: Add GV API for DPAD scrolling and navigation (via dispatchTouchEvent API?) → Add GV API for D-pad scrolling and navigation (via dispatchTouchEvent API?)
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/autoland/rev/8066fe9c81ee Add scrollTo and scrollBy to PanZoomController r=geckoview-reviewers,snorp,esawin
You need to log in before you can comment on or make changes to this bug.