| Index: Source/web/WebInputEventConversion.cpp
|
| diff --git a/Source/web/WebInputEventConversion.cpp b/Source/web/WebInputEventConversion.cpp
|
| index df65059f3854eea1db3b53d39b914e98e04c179d..26772c10a83805a21c78aee6501f64cc83e7a7a6 100644
|
| --- a/Source/web/WebInputEventConversion.cpp
|
| +++ b/Source/web/WebInputEventConversion.cpp
|
| @@ -50,8 +50,6 @@
|
|
|
| namespace blink {
|
|
|
| -static const double millisPerSecond = 1000.0;
|
| -
|
| static float scaleDeltaToWindow(const Widget* widget, float delta)
|
| {
|
| float scale = 1;
|
| @@ -320,6 +318,7 @@ PlatformKeyboardEventBuilder::PlatformKeyboardEventBuilder(const WebKeyboardEven
|
| m_key = Platform::current()->domKeyStringFromEnum(e.domKey);
|
|
|
| m_modifiers = toPlatformKeyboardEventModifiers(e.modifiers);
|
| + m_timestamp = e.timeStampSeconds;
|
|
|
| // FIXME: PlatformKeyboardEvents expect a locational version of the keycode (e.g. VK_LSHIFT
|
| // instead of VK_SHIFT). This should be changed so the location/keycode are stored separately,
|
| @@ -480,7 +479,7 @@ static IntPoint convertAbsoluteLocationForLayoutObject(const LayoutPoint& locati
|
| // RemoteFrameViews.
|
| static void updateWebMouseEventFromCoreMouseEvent(const MouseRelatedEvent& event, const Widget* widget, const LayoutObject& layoutObject, WebMouseEvent& webEvent)
|
| {
|
| - webEvent.timeStampSeconds = event.timeStamp() / millisPerSecond;
|
| + webEvent.timeStampSeconds = event.timeStampForPlatformInSeconds();
|
| webEvent.modifiers = getWebInputModifiers(event);
|
|
|
| FrameView* view = widget ? toFrameView(widget->parent()) : 0;
|
| @@ -570,7 +569,7 @@ WebMouseEventBuilder::WebMouseEventBuilder(const Widget* widget, const LayoutObj
|
| else
|
| return;
|
|
|
| - timeStampSeconds = event.timeStamp() / millisPerSecond;
|
| + timeStampSeconds = event.timeStampForPlatformInSeconds();
|
| modifiers = getWebInputModifiers(event);
|
|
|
| // The mouse event co-ordinates should be generated from the co-ordinates of the touch point.
|
| @@ -628,7 +627,7 @@ WebKeyboardEventBuilder::WebKeyboardEventBuilder(const KeyboardEvent& event)
|
| else if (event.location() == KeyboardEvent::DOM_KEY_LOCATION_RIGHT)
|
| modifiers |= WebInputEvent::IsRight;
|
|
|
| - timeStampSeconds = event.timeStamp() / millisPerSecond;
|
| + timeStampSeconds = event.timeStampForPlatformInSeconds();
|
| windowsKeyCode = event.keyCode();
|
|
|
| // The platform keyevent does not exist if the event was created using
|
| @@ -721,7 +720,7 @@ WebTouchEventBuilder::WebTouchEventBuilder(const LayoutObject* layoutObject, con
|
| }
|
|
|
| modifiers = getWebInputModifiers(event);
|
| - timeStampSeconds = event.timeStamp() / millisPerSecond;
|
| + timeStampSeconds = event.timeStampForPlatformInSeconds();
|
| cancelable = event.cancelable();
|
| causesScrollingIfUncanceled = event.causesScrollingIfUncanceled();
|
|
|
| @@ -756,7 +755,7 @@ WebGestureEventBuilder::WebGestureEventBuilder(const LayoutObject* layoutObject,
|
| data.tap.tapCount = 1;
|
| }
|
|
|
| - timeStampSeconds = event.timeStamp() / millisPerSecond;
|
| + timeStampSeconds = event.timeStampForPlatformInSeconds();
|
| modifiers = getWebInputModifiers(event);
|
|
|
| globalX = event.screenX();
|
|
|