Chromium Code Reviews| Index: third_party/WebKit/Source/web/WebInputEventConversion.cpp |
| diff --git a/third_party/WebKit/Source/web/WebInputEventConversion.cpp b/third_party/WebKit/Source/web/WebInputEventConversion.cpp |
| index 96061fa86542a3ec8d4c6b69a52ecbc6c3c6c8d9..79df17fe2b29f4cdac4b70d8ae947d7b982c54a9 100644 |
| --- a/third_party/WebKit/Source/web/WebInputEventConversion.cpp |
| +++ b/third_party/WebKit/Source/web/WebInputEventConversion.cpp |
| @@ -254,6 +254,16 @@ PlatformGestureEventBuilder::PlatformGestureEventBuilder(Widget* widget, const W |
| m_globalPosition = IntPoint(e.globalX, e.globalY); |
| m_timestamp = e.timeStampSeconds; |
| m_modifiers = e.modifiers; |
| + switch (e.sourceDevice) { |
| + case WebGestureDeviceUninitialized: |
|
tdresser
2015/10/19 12:52:39
Let's put the exceptional case at the end.
wjmaclean
2015/10/19 15:26:55
Done.
|
| + ASSERT_NOT_REACHED(); |
| + break; |
| + case WebGestureDeviceTouchpad: |
| + m_source = PlatformGestureSourceTouchpad; |
| + break; |
| + case WebGestureDeviceTouchscreen: |
| + m_source = PlatformGestureSourceTouchscreen; |
| + } |
| } |
| // MakePlatformKeyboardEvent -------------------------------------------------- |
| @@ -704,6 +714,17 @@ WebGestureEventBuilder::WebGestureEventBuilder(const LayoutObject* layoutObject, |
| IntPoint localPoint = convertAbsoluteLocationForLayoutObject(event.absoluteLocation(), *layoutObject); |
| x = localPoint.x(); |
| y = localPoint.y(); |
| + |
| + switch (event.source()) { |
| + case GestureSourceUninitialized: |
|
tdresser
2015/10/19 12:52:39
ditto
wjmaclean
2015/10/19 15:26:55
Done.
|
| + ASSERT_NOT_REACHED(); |
| + break; |
| + case GestureSourceTouchpad: |
| + sourceDevice = WebGestureDeviceTouchpad; |
| + break; |
| + case GestureSourceTouchscreen: |
| + sourceDevice = WebGestureDeviceTouchscreen; |
| + } |
| } |
| } // namespace blink |