New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 650351 link

Starred by 2 users

Issue metadata

Status: Duplicate
Merged: issue 644488
Owner:
inactive
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Feature

Blocking:
issue 620929



Sign in to add a comment

Remove joystick scroll on Android

Reported by ti...@chromium.org, Sep 26 2016

Issue description

The Android joystick scroll that has been introduced in CL https://codereview.chromium.org/901183002 has to be updated to support DIP scale change, since it stores the position of last motion event on physical pixels.

Per rbyers@ input, however, the joystick scroll should not be maintained in the current form, and should be either removed or rewritten.

This bug is a place to speak up and take the final decision about removal.
 
Cc: mustaq@chromium.org
+mustaq@ who is going to draft a proposal for refactoring autoscrolling code that this would eventually take advantage of that API.

Comment 2 by boliu@chromium.org, Sep 28 2016

Is it actually ok to delete this code? https://codereview.chromium.org/2373123002/

Comment 3 by aelias@chromium.org, Sep 28 2016

Cc: aelias@chromium.org
FYI, we already had a long previous discussion on this.  I had uploaded similar deletion patch https://codereview.chromium.org/2255813004/ (BTW, I think it should also include zoom controller as the zoom doesn't make sense to keep existing on its own), and filed similar bug  http://crbug.com/644488 .  As before, I am OK with either deleting now, or delaying the deletion until a new C++ implementation is available to be shared among all autoscrollers.

If we go with the short-term maintenance, I think the last motion event offset could be eliminated by generating synthetic mousewheel events instead of touch events.

Comment 4 by aelias@chromium.org, Sep 28 2016

And on further thought, I think reopening the deletion debate at this point would mostly just be a distraction.  I was OK with the long-term maintenance plan we ended up with earlier, and I don't think this DIP problem changes the situation much.

Before we talk again about immediate deletion, please try writing a patch switching it to the synthetic mousewheel event like I mentioned above.  I think it should be pretty easy, and it would be a proof-of-concept/incremental step towards the autoscroll controller plan.

Comment 5 by ti...@chromium.org, Nov 30 2016

Blocking: 620929
Cc: sgu...@chromium.org
Labels: -Pri-2 Pri-1

Comment 6 by ti...@chromium.org, Dec 1 2016

c#4: I do not immediately understand how to generate "synthetic mousewheel events instead of touch events". Alex, could you please point me to some example or docs?
It should be this kind of object or a Java/UI side event that generates that: https://cs.chromium.org/chromium/src/third_party/WebKit/public/platform/WebInputEvent.h?q=WebMouseWheelEvent&sq=package:chromium&l=404
Project Member

Comment 8 by bugdroid1@chromium.org, Dec 12 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4537fa801ee646b95ef496083e824e468978a374

commit 4537fa801ee646b95ef496083e824e468978a374
Author: timav <timav@chromium.org>
Date: Mon Dec 12 06:46:54 2016

Emulate Android joystick scroll with synthetic mouse wheel event

The JoystickScrollProvider Java class used to emulate a View
scroll events and call ContentViewCore.scrollBy(), now it
emulates the mouse wheel events directly, dropping the calculation
of the current event position (it is set to (0,0)).

This CL also removes JoystickScrollProvider dependency on
ContentViewCore, it talks to its own native counterpart.

BUG= 620929 ,  650351 

Review-Url: https://codereview.chromium.org/2548363007
Cr-Commit-Position: refs/heads/master@{#437826}

[modify] https://crrev.com/4537fa801ee646b95ef496083e824e468978a374/content/browser/BUILD.gn
[modify] https://crrev.com/4537fa801ee646b95ef496083e824e468978a374/content/browser/android/browser_jni_registrar.cc
[add] https://crrev.com/4537fa801ee646b95ef496083e824e468978a374/content/browser/android/joystick_scroll_provider.cc
[add] https://crrev.com/4537fa801ee646b95ef496083e824e468978a374/content/browser/android/joystick_scroll_provider.h
[modify] https://crrev.com/4537fa801ee646b95ef496083e824e468978a374/content/public/android/BUILD.gn
[modify] https://crrev.com/4537fa801ee646b95ef496083e824e468978a374/content/public/android/java/src/org/chromium/content/browser/ContentView.java
[modify] https://crrev.com/4537fa801ee646b95ef496083e824e468978a374/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
[modify] https://crrev.com/4537fa801ee646b95ef496083e824e468978a374/content/public/android/java/src/org/chromium/content/browser/input/JoystickScrollProvider.java

Cc: ntfschr@chromium.org
Labels: -Pri-1 Pri-3
Owner: aelias@chromium.org
aelias@, could you take a look at this? Does this require any further work?
Mergedinto: 644488
Status: Duplicate (was: Assigned)

Sign in to add a comment