Bug 822558: Don't confuse subprocesses about ended touches. r=mwu a=blocking-basecamp

This commit is contained in:
Chris Jones 2012-12-20 11:54:00 -08:00
Родитель 42f2ca6fe6
Коммит f2dfd3a5d7
1 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

@ -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);
}
}
}