Chromium Code Reviews| Index: third_party/WebKit/public/platform/WebMouseEvent.h |
| diff --git a/third_party/WebKit/public/platform/WebMouseEvent.h b/third_party/WebKit/public/platform/WebMouseEvent.h |
| index 4e140a723a2911a8145061263a9235fce8891683..19dba586a3004e06a6006f535e611b3e8abcff1d 100644 |
| --- a/third_party/WebKit/public/platform/WebMouseEvent.h |
| +++ b/third_party/WebKit/public/platform/WebMouseEvent.h |
| @@ -21,6 +21,8 @@ class WebGestureEvent; |
| // on. crbug.com/456625 |
| class WebMouseEvent : public WebInputEvent, public WebPointerProperties { |
| public: |
| + static constexpr int kMousePointerId = std::numeric_limits<int>::max(); |
|
haraken
2017/05/02 00:27:23
kMousePointerId => kUndefinedMousePointerID or som
|
| + |
| int click_count; |
| WebMouseEvent(Type type_param, |
| @@ -29,12 +31,13 @@ class WebMouseEvent : public WebInputEvent, public WebPointerProperties { |
| int global_x_param, |
| int global_y_param, |
| int modifiers_param, |
| - double time_stamp_seconds_param) |
| + double time_stamp_seconds_param, |
| + int id_param = kMousePointerId) |
| : WebInputEvent(sizeof(WebMouseEvent), |
| type_param, |
| modifiers_param, |
| time_stamp_seconds_param), |
| - WebPointerProperties(), |
| + WebPointerProperties(id_param), |
| position_in_widget_(x_param, y_param), |
| position_in_screen_(global_x_param, global_y_param) {} |
| @@ -44,12 +47,13 @@ class WebMouseEvent : public WebInputEvent, public WebPointerProperties { |
| Button button_param, |
| int click_count_param, |
| int modifiers_param, |
| - double time_stamp_seconds_param) |
| + double time_stamp_seconds_param, |
| + int id_param = kMousePointerId) |
| : WebInputEvent(sizeof(WebMouseEvent), |
| type_param, |
| modifiers_param, |
| time_stamp_seconds_param), |
| - WebPointerProperties(button_param, PointerType::kMouse), |
| + WebPointerProperties(id_param, button_param, PointerType::kMouse), |
| click_count(click_count_param), |
| position_in_widget_(floor(position.x), floor(position.y)), |
| position_in_screen_(floor(global_position.x), |
| @@ -57,13 +61,15 @@ class WebMouseEvent : public WebInputEvent, public WebPointerProperties { |
| WebMouseEvent(Type type_param, |
| int modifiers_param, |
| - double time_stamp_seconds_param) |
| + double time_stamp_seconds_param, |
| + int id_param = kMousePointerId) |
| : WebMouseEvent(sizeof(WebMouseEvent), |
| type_param, |
| modifiers_param, |
| - time_stamp_seconds_param) {} |
| + time_stamp_seconds_param, |
| + id_param) {} |
| - WebMouseEvent() : WebMouseEvent(sizeof(WebMouseEvent)) {} |
| + WebMouseEvent() : WebMouseEvent(sizeof(WebMouseEvent), kMousePointerId) {} |
| bool FromTouch() const { |
| return (GetModifiers() & kIsCompatibilityEventForTouch) != 0; |
| @@ -75,7 +81,8 @@ class WebMouseEvent : public WebInputEvent, public WebPointerProperties { |
| Button button_param, |
| int click_count_param, |
| int modifiers_param, |
| - double time_stamp_seconds_param); |
| + double time_stamp_seconds_param, |
| + int id_param = kMousePointerId); |
| BLINK_PLATFORM_EXPORT WebFloatPoint MovementInRootFrame() const; |
| BLINK_PLATFORM_EXPORT WebFloatPoint PositionInRootFrame() const; |
| @@ -96,15 +103,16 @@ class WebMouseEvent : public WebInputEvent, public WebPointerProperties { |
| } |
| protected: |
| - explicit WebMouseEvent(unsigned size_param) |
| - : WebInputEvent(size_param), WebPointerProperties() {} |
| + WebMouseEvent(unsigned size_param, int id) |
| + : WebInputEvent(size_param), WebPointerProperties(id) {} |
| WebMouseEvent(unsigned size_param, |
| Type type, |
| int modifiers, |
| - double time_stamp_seconds) |
| + double time_stamp_seconds, |
| + int id) |
| : WebInputEvent(size_param, type, modifiers, time_stamp_seconds), |
| - WebPointerProperties() {} |
| + WebPointerProperties(id) {} |
| void FlattenTransformSelf(); |