mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 965805 - Calling nsITabParent::InjectTouchEvent can results into an out of sync TabParent::mEventCaptureDepth. r=kats
This commit is contained in:
parent
bce38c0c45
commit
dff4362727
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user