mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 20:05:49 +00:00
Bug 822558: Don't confuse subprocesses about ended touches. r=mwu a=blocking-basecamp
This commit is contained in:
parent
42f2ca6fe6
commit
f2dfd3a5d7
@ -431,14 +431,14 @@ bool TabParent::SendRealTouchEvent(nsTouchEvent& event)
|
||||
}
|
||||
|
||||
nsTouchEvent e(event);
|
||||
// PresShell::HandleEventInternal adds touches on touch end/cancel,
|
||||
// when we're not capturing raw events from the widget backend.
|
||||
// This hack filters those out. Bug 785554
|
||||
if (sEventCapturer != this &&
|
||||
(event.message == NS_TOUCH_END || event.message == NS_TOUCH_CANCEL)) {
|
||||
// PresShell::HandleEventInternal adds touches on touch end/cancel.
|
||||
// This confuses remote content into thinking that the added touches
|
||||
// are part of the touchend/cancel, when actually they're not.
|
||||
if (event.message == NS_TOUCH_END || event.message == NS_TOUCH_CANCEL) {
|
||||
for (int i = e.touches.Length() - 1; i >= 0; i--) {
|
||||
if (!e.touches[i]->mChanged)
|
||||
if (!e.touches[i]->mChanged) {
|
||||
e.touches.RemoveElementAt(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user