--- a/widget/android/nsWindow.cpp
+++ b/widget/android/nsWindow.cpp
@@ -647,17 +647,17 @@ public:
}
if (!controller) {
return false;
}
ScreenPoint origin = ScreenPoint(aX, aY);
- ScrollWheelInput input(aTime, TimeStamp::Now(), GetModifiers(aMetaState),
+ ScrollWheelInput input(aTime, GetEventTimeStamp(aTime), GetModifiers(aMetaState),
ScrollWheelInput::SCROLLMODE_SMOOTH,
ScrollWheelInput::SCROLLDELTA_PIXEL,
origin,
aHScroll, aVScroll,
false);
ScrollableLayerGuid guid;
uint64_t blockId;
@@ -766,17 +766,17 @@ public:
}
if (mouseType == MouseInput::MOUSE_NONE) {
return false;
}
ScreenPoint origin = ScreenPoint(aX, aY);
- MouseInput input(mouseType, buttonType, nsIDOMMouseEvent::MOZ_SOURCE_MOUSE, ConvertButtons(buttons), origin, aTime, TimeStamp(), GetModifiers(aMetaState));
+ MouseInput input(mouseType, buttonType, nsIDOMMouseEvent::MOZ_SOURCE_MOUSE, ConvertButtons(buttons), origin, aTime, GetEventTimeStamp(aTime), GetModifiers(aMetaState));
ScrollableLayerGuid guid;
uint64_t blockId;
nsEventStatus status = controller->ReceiveInputEvent(input, &guid, &blockId);
if (status == nsEventStatus_eConsumeNoDefault) {
return true;
}
@@ -837,17 +837,17 @@ public:
case sdk::MotionEvent::ACTION_OUTSIDE:
case sdk::MotionEvent::ACTION_CANCEL:
type = MultiTouchInput::MULTITOUCH_CANCEL;
break;
default:
return false;
}
- MultiTouchInput input(type, aTime, TimeStamp(), 0);
+ MultiTouchInput input(type, aTime, GetEventTimeStamp(aTime), 0);
input.modifiers = GetModifiers(aMetaState);
input.mTouches.SetCapacity(endIndex - startIndex);
nsTArray<float> x(aX->GetElements());
nsTArray<float> y(aY->GetElements());
nsTArray<float> orientation(aOrientation->GetElements());
nsTArray<float> pressure(aPressure->GetElements());
nsTArray<float> toolMajor(aToolMajor->GetElements());
@@ -2539,16 +2539,17 @@ InitKeyEvent(WidgetKeyboardEvent& event,
if (event.mKeyNameIndex == KEY_NAME_INDEX_USE_STRING &&
domPrintableKeyValue) {
event.mKeyValue = char16_t(domPrintableKeyValue);
}
event.mLocation =
WidgetKeyboardEvent::ComputeLocationFromCodeValue(event.mCodeNameIndex);
event.mTime = time;
+ event.mTimeStamp = GetEventTimeStamp(time);
}
void
nsWindow::GeckoViewSupport::OnKeyEvent(int32_t aAction, int32_t aKeyCode,
int32_t aScanCode, int32_t aMetaState, int64_t aTime,
int32_t aUnicodeChar, int32_t aBaseUnicodeChar,
int32_t aDomPrintableKeyValue, int32_t aRepeatCount, int32_t aFlags,
bool aIsSynthesizedImeKey, jni::Object::Param originalEvent)