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

Unified Diff: third_party/WebKit/public/platform/WebMouseEvent.h

Issue 2849083002: Add pointer id to the WebMouseEvent's constructors (Closed)
Patch Set: webmouseidd Created 3 years, 8 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
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..e542127dea7adf8c102605942f9a2297b385e486 100644
--- a/third_party/WebKit/public/platform/WebMouseEvent.h
+++ b/third_party/WebKit/public/platform/WebMouseEvent.h
@@ -29,12 +29,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)
dtapuska 2017/05/01 15:49:05 Why do you use an int here and an int32_t for the
lanwei 2017/05/01 23:51:21 Done.
: 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 +45,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 +59,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 +79,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 +101,16 @@ class WebMouseEvent : public WebInputEvent, public WebPointerProperties {
}
protected:
- explicit WebMouseEvent(unsigned size_param)
- : WebInputEvent(size_param), WebPointerProperties() {}
+ explicit 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();

Powered by Google App Engine
This is Rietveld 408576698