зеркало из https://github.com/mozilla/gecko-dev.git
Bug 964261 - Declare a widget to events created by TabParent::InjectTouchEvent. r=kats
This commit is contained in:
Родитель
e001a1fb17
Коммит
ee9dd904f4
|
@ -1916,7 +1916,12 @@ TabParent::InjectTouchEvent(const nsAString& aType,
|
|||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
WidgetTouchEvent event(true, msg, nullptr);
|
||||
nsCOMPtr<nsIWidget> widget = GetWidget();
|
||||
if (!widget) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
WidgetTouchEvent event(true, msg, widget);
|
||||
event.modifiers = aModifiers;
|
||||
event.time = PR_IntervalNow();
|
||||
|
||||
|
@ -1927,6 +1932,11 @@ TabParent::InjectTouchEvent(const nsAString& aType,
|
|||
nsIntPoint(aRxs[i], aRys[i]),
|
||||
aRotationAngles[i],
|
||||
aForces[i]);
|
||||
|
||||
// Consider all injected touch events as changedTouches. For more details
|
||||
// about the meaning of changedTouches for each event, see
|
||||
// https://developer.mozilla.org/docs/Web/API/TouchEvent.changedTouches
|
||||
t->mChanged = true;
|
||||
event.touches.AppendElement(t);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче