Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(330)

Unified Diff: third_party/WebKit/Source/core/events/PointerEventFactory.cpp

Issue 2867093003: Do not increase the pointer id when type is eraser (Closed)
Patch Set: pointer eraser id Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/events/pointerevents/mouse-pointer-event-properties.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/events/PointerEventFactory.cpp
diff --git a/third_party/WebKit/Source/core/events/PointerEventFactory.cpp b/third_party/WebKit/Source/core/events/PointerEventFactory.cpp
index 2bbb8654d16dd90a4ce7f35ef1766e82490ffa2c..46d8fe74d1f50aff292ec85b04f679bbd9e01792 100644
--- a/third_party/WebKit/Source/core/events/PointerEventFactory.cpp
+++ b/third_party/WebKit/Source/core/events/PointerEventFactory.cpp
@@ -188,11 +188,8 @@ void PointerEventFactory::SetIdTypeButtons(
PointerEventInit& pointer_event_init,
const WebPointerProperties& pointer_properties,
unsigned buttons) {
- const WebPointerProperties::PointerType pointer_type =
+ WebPointerProperties::PointerType pointer_type =
pointer_properties.pointer_type;
- const IncomingId incoming_id(pointer_type, pointer_properties.id);
- int pointer_id = AddIdAndActiveButtons(incoming_id, buttons != 0);
-
// Tweak the |buttons| to reflect pen eraser mode only if the pen is in
// active buttons state w/o even considering the eraser button.
// TODO(mustaq): Fix when the spec starts supporting hovering erasers.
@@ -203,6 +200,10 @@ void PointerEventFactory::SetIdTypeButtons(
}
pointer_event_init.setButtons(buttons);
+ if (pointer_type == WebPointerProperties::PointerType::kEraser)
dtapuska 2017/05/09 20:53:08 Can this be rolled into the other pointer_type ==
lanwei 2017/05/10 17:50:42 Done.
+ pointer_type = WebPointerProperties::PointerType::kPen;
+ const IncomingId incoming_id(pointer_type, pointer_properties.id);
+ int pointer_id = AddIdAndActiveButtons(incoming_id, buttons != 0);
pointer_event_init.setPointerId(pointer_id);
pointer_event_init.setPointerType(
PointerTypeNameForWebPointPointerType(pointer_type));
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/events/pointerevents/mouse-pointer-event-properties.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698