Chromium Code Reviews| 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)); |