зеркало из https://github.com/mozilla/gecko-dev.git
Bug 965805 - Calling nsITabParent::InjectTouchEvent can results into an out of sync TabParent::mEventCaptureDepth. r=kats
This commit is contained in:
Родитель
7243523ef2
Коммит
36d071027d
|
@ -1926,6 +1926,11 @@ TabParent::GetLoadContext()
|
|||
return loadContext.forget();
|
||||
}
|
||||
|
||||
/* Be careful if you call this method while proceding a real touch event. For
|
||||
* example sending a touchstart during a real touchend may results into
|
||||
* a busted mEventCaptureDepth and following touch events may not do what you
|
||||
* expect.
|
||||
*/
|
||||
NS_IMETHODIMP
|
||||
TabParent::InjectTouchEvent(const nsAString& aType,
|
||||
uint32_t* aIdentifiers,
|
||||
|
@ -1969,6 +1974,11 @@ TabParent::InjectTouchEvent(const nsAString& aType,
|
|||
event.touches.AppendElement(t);
|
||||
}
|
||||
|
||||
if ((msg == NS_TOUCH_END || msg == NS_TOUCH_CANCEL) && sEventCapturer) {
|
||||
WidgetGUIEvent* guiEvent = event.AsGUIEvent();
|
||||
TryCapture(*guiEvent);
|
||||
}
|
||||
|
||||
SendRealTouchEvent(event);
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче