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

Issue 642455 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 1
Type: Bug

Blocking:
issue 636458



Sign in to add a comment

Blink should handle pen eraser mode correctly even with hovering

Project Member Reported by mustaq@chromium.org, Aug 30 2016

Issue description

A pen is in eraser mode when either it is flipped to have the "flat" end towards the digitizer, or the barrel button for eraser is depressed.

Low-level events from OS/drivers treat an "eraser mode" pen as a new type (different from type_pen) which can handle hovering pens perfectly. The PointerEvent spec, on the the other hand, can't, see the spec discussion here: https://github.com/w3c/pointerevents/issues/134

In our internal plumbing through WebInputEvent/PlaformEvent etc, we will add a new pointerType to carry the extra info along. Alternatively, we can have a separate bit (modifier bit?) in the event to indicate the flipped state.

Right before firing DOM PointerEvents, however, we will still fall back to "eraser button" notation until the spec is fixed.

 

Comment 1 Deleted

Comment 2 by mustaq@chromium.org, Aug 31 2016

Labels: -Pri-2 OS-All Pri-1

Comment 3 Deleted

Comment 4 by mustaq@chromium.org, Aug 31 2016

Blocking: 636458
Project Member

Comment 5 by bugdroid1@chromium.org, Sep 2 2016

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

commit 758b11555d5e65c63258731d4fc72b7d7edea0d7
Author: mustaq <mustaq@chromium.org>
Date: Fri Sep 02 22:06:43 2016

Make a pen in eraser mode visible thru PointerEvent.buttons

The PointerEvent spec can't gracefully support a hovering pen in eraser
mode because a non-zero |buttons| field indicate an active buttons
state. The issue is currently being discussed in github:
  https://github.com/w3c/pointerevents/issues/134

Until the spec gets fixed, this CL exposes the eraser mode in a
spec-compliant way by hiding the eraser mode until the pen touches the
digitizer. Edge shows the same behavior.

This CL also adds X1, X2 & Eraser button/buttons values to
WebPointerProperties.

BUG= 642455 

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

[modify] https://crrev.com/758b11555d5e65c63258731d4fc72b7d7edea0d7/components/test_runner/event_sender.cc
[modify] https://crrev.com/758b11555d5e65c63258731d4fc72b7d7edea0d7/third_party/WebKit/LayoutTests/fast/events/pointerevents/mouse-pointer-event-properties-expected.txt
[modify] https://crrev.com/758b11555d5e65c63258731d4fc72b7d7edea0d7/third_party/WebKit/LayoutTests/fast/events/pointerevents/mouse-pointer-event-properties.html
[modify] https://crrev.com/758b11555d5e65c63258731d4fc72b7d7edea0d7/third_party/WebKit/Source/core/events/MouseEvent.cpp
[modify] https://crrev.com/758b11555d5e65c63258731d4fc72b7d7edea0d7/third_party/WebKit/Source/core/events/MouseEvent.h
[modify] https://crrev.com/758b11555d5e65c63258731d4fc72b7d7edea0d7/third_party/WebKit/Source/core/events/PointerEventFactory.cpp
[modify] https://crrev.com/758b11555d5e65c63258731d4fc72b7d7edea0d7/third_party/WebKit/public/platform/WebPointerProperties.h

Labels: Merge-Request-54

Comment 7 by dimu@chromium.org, Sep 6 2016

Labels: -Merge-Request-54 Merge-Approved-54 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M54 (branch: 2840)
Project Member

Comment 8 by bugdroid1@chromium.org, Sep 6 2016

Labels: -merge-approved-54 merge-merged-2840
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/956dc72f92984d993e390491c90b283beda8b89c

commit 956dc72f92984d993e390491c90b283beda8b89c
Author: Mustaq Ahmed <mustaq@google.com>
Date: Tue Sep 06 14:44:54 2016

Make a pen in eraser mode visible thru PointerEvent.buttons

The PointerEvent spec can't gracefully support a hovering pen in eraser
mode because a non-zero |buttons| field indicate an active buttons
state. The issue is currently being discussed in github:
  https://github.com/w3c/pointerevents/issues/134

Until the spec gets fixed, this CL exposes the eraser mode in a
spec-compliant way by hiding the eraser mode until the pen touches the
digitizer. Edge shows the same behavior.

This CL also adds X1, X2 & Eraser button/buttons values to
WebPointerProperties.

BUG= 642455 

Review-Url: https://codereview.chromium.org/2296303002
Cr-Commit-Position: refs/heads/master@{#416360}
(cherry picked from commit 758b11555d5e65c63258731d4fc72b7d7edea0d7)

Review URL: https://codereview.chromium.org/2313653004 .

Cr-Commit-Position: refs/branch-heads/2840@{#168}
Cr-Branched-From: 1ae106dbab4bddd85132d5b75c670794311f4c57-refs/heads/master@{#414607}

[modify] https://crrev.com/956dc72f92984d993e390491c90b283beda8b89c/components/test_runner/event_sender.cc
[modify] https://crrev.com/956dc72f92984d993e390491c90b283beda8b89c/third_party/WebKit/LayoutTests/fast/events/pointerevents/mouse-pointer-event-properties-expected.txt
[modify] https://crrev.com/956dc72f92984d993e390491c90b283beda8b89c/third_party/WebKit/LayoutTests/fast/events/pointerevents/mouse-pointer-event-properties.html
[modify] https://crrev.com/956dc72f92984d993e390491c90b283beda8b89c/third_party/WebKit/Source/core/events/MouseEvent.cpp
[modify] https://crrev.com/956dc72f92984d993e390491c90b283beda8b89c/third_party/WebKit/Source/core/events/MouseEvent.h
[modify] https://crrev.com/956dc72f92984d993e390491c90b283beda8b89c/third_party/WebKit/Source/core/events/PointerEventFactory.cpp
[modify] https://crrev.com/956dc72f92984d993e390491c90b283beda8b89c/third_party/WebKit/public/platform/WebPointerProperties.h

Status: Fixed (was: Started)
Labels: -merge-merged-2840 Merge-Approved-54
Status: Assigned (was: Fixed)
Reopening: reverting the merge.

Project Member

Comment 11 by bugdroid1@chromium.org, Sep 6 2016

Labels: -merge-approved-54 merge-merged-2840
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6e01992bd53d00979bdc6e465efe993246a0b4ba

commit 6e01992bd53d00979bdc6e465efe993246a0b4ba
Author: mustaq <mustaq@chromium.org>
Date: Tue Sep 06 16:08:26 2016

Revert of Make a pen in eraser mode visible thru PointerEvent.buttons (patchset #1 id:1 of https://codereview.chromium.org/2313653004/ )

Reason for revert:
Broke the build.

Original issue's description:
> Make a pen in eraser mode visible thru PointerEvent.buttons
>
> The PointerEvent spec can't gracefully support a hovering pen in eraser
> mode because a non-zero |buttons| field indicate an active buttons
> state. The issue is currently being discussed in github:
>   https://github.com/w3c/pointerevents/issues/134
>
> Until the spec gets fixed, this CL exposes the eraser mode in a
> spec-compliant way by hiding the eraser mode until the pen touches the
> digitizer. Edge shows the same behavior.
>
> This CL also adds X1, X2 & Eraser button/buttons values to
> WebPointerProperties.
>
> BUG= 642455 
>
> Review-Url: https://codereview.chromium.org/2296303002
> Cr-Commit-Position: refs/heads/master@{#416360}
> (cherry picked from commit 758b11555d5e65c63258731d4fc72b7d7edea0d7)
>
> Committed: https://chromium.googlesource.com/chromium/src/+/956dc72f92984d993e390491c90b283beda8b89c

TBR=
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG= 642455 

Review-Url: https://codereview.chromium.org/2314093002
Cr-Commit-Position: refs/branch-heads/2840@{#170}
Cr-Branched-From: 1ae106dbab4bddd85132d5b75c670794311f4c57-refs/heads/master@{#414607}

[modify] https://crrev.com/6e01992bd53d00979bdc6e465efe993246a0b4ba/components/test_runner/event_sender.cc
[modify] https://crrev.com/6e01992bd53d00979bdc6e465efe993246a0b4ba/third_party/WebKit/LayoutTests/fast/events/pointerevents/mouse-pointer-event-properties-expected.txt
[modify] https://crrev.com/6e01992bd53d00979bdc6e465efe993246a0b4ba/third_party/WebKit/LayoutTests/fast/events/pointerevents/mouse-pointer-event-properties.html
[modify] https://crrev.com/6e01992bd53d00979bdc6e465efe993246a0b4ba/third_party/WebKit/Source/core/events/MouseEvent.cpp
[modify] https://crrev.com/6e01992bd53d00979bdc6e465efe993246a0b4ba/third_party/WebKit/Source/core/events/MouseEvent.h
[modify] https://crrev.com/6e01992bd53d00979bdc6e465efe993246a0b4ba/third_party/WebKit/Source/core/events/PointerEventFactory.cpp
[modify] https://crrev.com/6e01992bd53d00979bdc6e465efe993246a0b4ba/third_party/WebKit/public/platform/WebPointerProperties.h

Labels: -merge-merged-2840 Merge-Approved-54
Just realized that the last CL in the blocked bug wasn't merged:
https://codereview.chromium.org/2289273002

Dennis: Please let me know when you are done with the merge, mine should follow yours.
Project Member

Comment 13 by bugdroid1@chromium.org, Sep 6 2016

Labels: -merge-approved-54 merge-merged-2840
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0611ea461e746b29cafc767d3542aa2b5bcc58ee

commit 0611ea461e746b29cafc767d3542aa2b5bcc58ee
Author: Mustaq Ahmed <mustaq@google.com>
Date: Tue Sep 06 18:49:06 2016

Make a pen in eraser mode visible thru PointerEvent.buttons

The PointerEvent spec can't gracefully support a hovering pen in eraser
mode because a non-zero |buttons| field indicate an active buttons
state. The issue is currently being discussed in github:
  https://github.com/w3c/pointerevents/issues/134

Until the spec gets fixed, this CL exposes the eraser mode in a
spec-compliant way by hiding the eraser mode until the pen touches the
digitizer. Edge shows the same behavior.

This CL also adds X1, X2 & Eraser button/buttons values to
WebPointerProperties.

BUG= 642455 

Review-Url: https://codereview.chromium.org/2296303002
Cr-Commit-Position: refs/heads/master@{#416360}
(cherry picked from commit 758b11555d5e65c63258731d4fc72b7d7edea0d7)

Review URL: https://codereview.chromium.org/2311213004 .

Cr-Commit-Position: refs/branch-heads/2840@{#179}
Cr-Branched-From: 1ae106dbab4bddd85132d5b75c670794311f4c57-refs/heads/master@{#414607}

[modify] https://crrev.com/0611ea461e746b29cafc767d3542aa2b5bcc58ee/components/test_runner/event_sender.cc
[modify] https://crrev.com/0611ea461e746b29cafc767d3542aa2b5bcc58ee/third_party/WebKit/LayoutTests/fast/events/pointerevents/mouse-pointer-event-properties-expected.txt
[modify] https://crrev.com/0611ea461e746b29cafc767d3542aa2b5bcc58ee/third_party/WebKit/LayoutTests/fast/events/pointerevents/mouse-pointer-event-properties.html
[modify] https://crrev.com/0611ea461e746b29cafc767d3542aa2b5bcc58ee/third_party/WebKit/Source/core/events/MouseEvent.cpp
[modify] https://crrev.com/0611ea461e746b29cafc767d3542aa2b5bcc58ee/third_party/WebKit/Source/core/events/MouseEvent.h
[modify] https://crrev.com/0611ea461e746b29cafc767d3542aa2b5bcc58ee/third_party/WebKit/Source/core/events/PointerEventFactory.cpp
[modify] https://crrev.com/0611ea461e746b29cafc767d3542aa2b5bcc58ee/third_party/WebKit/public/platform/WebPointerProperties.h

Status: Fixed (was: Assigned)
Project Member

Comment 15 by bugdroid1@chromium.org, Oct 27 2016

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

commit 956dc72f92984d993e390491c90b283beda8b89c
Author: Mustaq Ahmed <mustaq@google.com>
Date: Tue Sep 06 14:44:54 2016

Make a pen in eraser mode visible thru PointerEvent.buttons

The PointerEvent spec can't gracefully support a hovering pen in eraser
mode because a non-zero |buttons| field indicate an active buttons
state. The issue is currently being discussed in github:
  https://github.com/w3c/pointerevents/issues/134

Until the spec gets fixed, this CL exposes the eraser mode in a
spec-compliant way by hiding the eraser mode until the pen touches the
digitizer. Edge shows the same behavior.

This CL also adds X1, X2 & Eraser button/buttons values to
WebPointerProperties.

BUG= 642455 

Review-Url: https://codereview.chromium.org/2296303002
Cr-Commit-Position: refs/heads/master@{#416360}
(cherry picked from commit 758b11555d5e65c63258731d4fc72b7d7edea0d7)

Review URL: https://codereview.chromium.org/2313653004 .

Cr-Commit-Position: refs/branch-heads/2840@{#168}
Cr-Branched-From: 1ae106dbab4bddd85132d5b75c670794311f4c57-refs/heads/master@{#414607}

[modify] https://crrev.com/956dc72f92984d993e390491c90b283beda8b89c/components/test_runner/event_sender.cc
[modify] https://crrev.com/956dc72f92984d993e390491c90b283beda8b89c/third_party/WebKit/LayoutTests/fast/events/pointerevents/mouse-pointer-event-properties-expected.txt
[modify] https://crrev.com/956dc72f92984d993e390491c90b283beda8b89c/third_party/WebKit/LayoutTests/fast/events/pointerevents/mouse-pointer-event-properties.html
[modify] https://crrev.com/956dc72f92984d993e390491c90b283beda8b89c/third_party/WebKit/Source/core/events/MouseEvent.cpp
[modify] https://crrev.com/956dc72f92984d993e390491c90b283beda8b89c/third_party/WebKit/Source/core/events/MouseEvent.h
[modify] https://crrev.com/956dc72f92984d993e390491c90b283beda8b89c/third_party/WebKit/Source/core/events/PointerEventFactory.cpp
[modify] https://crrev.com/956dc72f92984d993e390491c90b283beda8b89c/third_party/WebKit/public/platform/WebPointerProperties.h

Project Member

Comment 16 by bugdroid1@chromium.org, Oct 27 2016

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

commit 6e01992bd53d00979bdc6e465efe993246a0b4ba
Author: mustaq <mustaq@chromium.org>
Date: Tue Sep 06 16:08:26 2016

Revert of Make a pen in eraser mode visible thru PointerEvent.buttons (patchset #1 id:1 of https://codereview.chromium.org/2313653004/ )

Reason for revert:
Broke the build.

Original issue's description:
> Make a pen in eraser mode visible thru PointerEvent.buttons
>
> The PointerEvent spec can't gracefully support a hovering pen in eraser
> mode because a non-zero |buttons| field indicate an active buttons
> state. The issue is currently being discussed in github:
>   https://github.com/w3c/pointerevents/issues/134
>
> Until the spec gets fixed, this CL exposes the eraser mode in a
> spec-compliant way by hiding the eraser mode until the pen touches the
> digitizer. Edge shows the same behavior.
>
> This CL also adds X1, X2 & Eraser button/buttons values to
> WebPointerProperties.
>
> BUG= 642455 
>
> Review-Url: https://codereview.chromium.org/2296303002
> Cr-Commit-Position: refs/heads/master@{#416360}
> (cherry picked from commit 758b11555d5e65c63258731d4fc72b7d7edea0d7)
>
> Committed: https://chromium.googlesource.com/chromium/src/+/956dc72f92984d993e390491c90b283beda8b89c

TBR=
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG= 642455 

Review-Url: https://codereview.chromium.org/2314093002
Cr-Commit-Position: refs/branch-heads/2840@{#170}
Cr-Branched-From: 1ae106dbab4bddd85132d5b75c670794311f4c57-refs/heads/master@{#414607}

[modify] https://crrev.com/6e01992bd53d00979bdc6e465efe993246a0b4ba/components/test_runner/event_sender.cc
[modify] https://crrev.com/6e01992bd53d00979bdc6e465efe993246a0b4ba/third_party/WebKit/LayoutTests/fast/events/pointerevents/mouse-pointer-event-properties-expected.txt
[modify] https://crrev.com/6e01992bd53d00979bdc6e465efe993246a0b4ba/third_party/WebKit/LayoutTests/fast/events/pointerevents/mouse-pointer-event-properties.html
[modify] https://crrev.com/6e01992bd53d00979bdc6e465efe993246a0b4ba/third_party/WebKit/Source/core/events/MouseEvent.cpp
[modify] https://crrev.com/6e01992bd53d00979bdc6e465efe993246a0b4ba/third_party/WebKit/Source/core/events/MouseEvent.h
[modify] https://crrev.com/6e01992bd53d00979bdc6e465efe993246a0b4ba/third_party/WebKit/Source/core/events/PointerEventFactory.cpp
[modify] https://crrev.com/6e01992bd53d00979bdc6e465efe993246a0b4ba/third_party/WebKit/public/platform/WebPointerProperties.h

Project Member

Comment 17 by bugdroid1@chromium.org, Oct 27 2016

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

commit 0611ea461e746b29cafc767d3542aa2b5bcc58ee
Author: Mustaq Ahmed <mustaq@google.com>
Date: Tue Sep 06 18:49:06 2016

Make a pen in eraser mode visible thru PointerEvent.buttons

The PointerEvent spec can't gracefully support a hovering pen in eraser
mode because a non-zero |buttons| field indicate an active buttons
state. The issue is currently being discussed in github:
  https://github.com/w3c/pointerevents/issues/134

Until the spec gets fixed, this CL exposes the eraser mode in a
spec-compliant way by hiding the eraser mode until the pen touches the
digitizer. Edge shows the same behavior.

This CL also adds X1, X2 & Eraser button/buttons values to
WebPointerProperties.

BUG= 642455 

Review-Url: https://codereview.chromium.org/2296303002
Cr-Commit-Position: refs/heads/master@{#416360}
(cherry picked from commit 758b11555d5e65c63258731d4fc72b7d7edea0d7)

Review URL: https://codereview.chromium.org/2311213004 .

Cr-Commit-Position: refs/branch-heads/2840@{#179}
Cr-Branched-From: 1ae106dbab4bddd85132d5b75c670794311f4c57-refs/heads/master@{#414607}

[modify] https://crrev.com/0611ea461e746b29cafc767d3542aa2b5bcc58ee/components/test_runner/event_sender.cc
[modify] https://crrev.com/0611ea461e746b29cafc767d3542aa2b5bcc58ee/third_party/WebKit/LayoutTests/fast/events/pointerevents/mouse-pointer-event-properties-expected.txt
[modify] https://crrev.com/0611ea461e746b29cafc767d3542aa2b5bcc58ee/third_party/WebKit/LayoutTests/fast/events/pointerevents/mouse-pointer-event-properties.html
[modify] https://crrev.com/0611ea461e746b29cafc767d3542aa2b5bcc58ee/third_party/WebKit/Source/core/events/MouseEvent.cpp
[modify] https://crrev.com/0611ea461e746b29cafc767d3542aa2b5bcc58ee/third_party/WebKit/Source/core/events/MouseEvent.h
[modify] https://crrev.com/0611ea461e746b29cafc767d3542aa2b5bcc58ee/third_party/WebKit/Source/core/events/PointerEventFactory.cpp
[modify] https://crrev.com/0611ea461e746b29cafc767d3542aa2b5bcc58ee/third_party/WebKit/public/platform/WebPointerProperties.h

Sign in to add a comment