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

Issue 773262 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug


Show other hotlists

Hotlists containing this issue:
Fixing-touch


Sign in to add a comment

Pointer Width/Height

Project Member Reported by dtapu...@chromium.org, Oct 10 2017

Issue description

Got a ChromeOS device with stylus...

Why is the pointer width/height 25/25 on Chrome OS for a stylus? It matches the touch area size for a finger. It should be much smaller than that.

Load http://rbyers.net/paint.html and use the stylus. Compare this to Windows with a stylus.


 
Status: Started (was: Assigned)
Cc: -tbuck...@chromium.org nzolghadr@chromium.org
Components: -Blink>Input UI>Input>Touch
Labels: -Pri-3 Pri-2
Owner: tbuck...@chromium.org
Status: Assigned (was: Started)
This looks like the radius is coming directly from the driver.

tbuckley@ can you triage?
Cc: tbuck...@chromium.org
Labels: Hotlist-Stylus
Owner: jkwang@chromium.org

Comment 4 by jkwang@google.com, Oct 11 2017

Cc: jkwang@chromium.org
Owner: dtapu...@chromium.org
The driver does not report touch_major (which will later be radius_x, then height) for stylus. Until ozone events is dispatched, the radius_x is still 0.

But in blink code, the WebTouchEvent radius_x is set to 25.
I would assume somewhere along the dispatch patch, the value is set to 25 when the radius_x is 0. 

Could you take a look? dtapuska@
jkwang@ I do agree the driver is reporting no width/height. Why can't the driver 
report this value even for touch events? 

Aura is filing it in here:
https://cs.chromium.org/chromium/src/ui/events/gestures/motion_event_aura.cc?dr=CSs&l=46

and it seems wrong to do it for touch events no?

Comment 6 by jkwang@google.com, Oct 23 2017

It should be OK for touch events if it's a finger. When the screen is not able to report a major, the assumptions here is not bad.

And I think it makes sense that the stylus driver does not report width/height, because the contact of stylus is the pen tip.

I would suggest check the EventPointerType here and put a different default for POINTER_TYPE_PEN. You could well assume the width/height of stylus is 1mm.

With that said, I am not sure if what is expected by the consumer of touch events (in the user level). If any of them requires a contact size to trigger some events, this change will disable stylus. Say, if I require a minimum contact size of 5 mm to press down my button, stylus could not do it after this change. Please do take this into your consideration.
jkwang@ I'm trying eve and touch_major/minor isn't reported for fingers either.

I agree I will make 1x1 the default for types pen/eraser.
Project Member

Comment 8 by bugdroid1@chromium.org, Oct 24 2017

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

commit e2f1551a57b8ac6e144582fdb6879552be6ae288
Author: Dave Tapuska <dtapuska@chromium.org>
Date: Tue Oct 24 01:18:56 2017

Fix default size for pointer stylus events on aura.

If the radius_x/y wasn't provided on the native event the field would
get populated by the gesture code. For stylus events it should be
a 1x1 pixel point as opposed to the 50x50 circle that is the default
in the GestureConfig.

BUG= 773262 

Change-Id: I5124ecf43bb592a1b3e3ccbbdb7c09020f79bbdd
Reviewed-on: https://chromium-review.googlesource.com/734016
Reviewed-by: Timothy Dresser <tdresser@chromium.org>
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/master@{#510980}
[modify] https://crrev.com/e2f1551a57b8ac6e144582fdb6879552be6ae288/ui/events/gestures/motion_event_aura.cc
[modify] https://crrev.com/e2f1551a57b8ac6e144582fdb6879552be6ae288/ui/events/gestures/motion_event_aura_unittest.cc

Status: Fixed (was: Assigned)

Sign in to add a comment