Backout e0be1d5500f2 (bug 833795) for causing bug 846816

This commit is contained in:
Fabrice Desré 2013-03-01 11:42:49 -08:00
Родитель f31f48dc7a
Коммит fc0f40efca
1 изменённых файлов: 11 добавлений и 12 удалений

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

@ -619,18 +619,6 @@ bool TabParent::SendRealTouchEvent(nsTouchEvent& event)
} }
MaybeForwardEventToRenderFrame(event, &e); MaybeForwardEventToRenderFrame(event, &e);
// Adjust the widget coordinates to be relative to our frame.
nsRefPtr<nsFrameLoader> frameLoader = GetFrameLoader();
if (!frameLoader) {
// No frame anymore?
sEventCapturer = nullptr;
return false;
}
nsEventStateManager::MapEventCoordinatesForChildProcess(frameLoader, &event);
return (e.message == NS_TOUCH_MOVE) ? return (e.message == NS_TOUCH_MOVE) ?
PBrowserParent::SendRealTouchMoveEvent(e) : PBrowserParent::SendRealTouchMoveEvent(e) :
PBrowserParent::SendRealTouchEvent(e); PBrowserParent::SendRealTouchEvent(e);
@ -667,6 +655,17 @@ TabParent::TryCapture(const nsGUIEvent& aEvent)
return false; return false;
} }
// Adjust the widget coordinates to be relative to our frame.
nsRefPtr<nsFrameLoader> frameLoader = GetFrameLoader();
if (!frameLoader) {
// No frame anymore?
sEventCapturer = nullptr;
return false;
}
nsEventStateManager::MapEventCoordinatesForChildProcess(frameLoader, &event);
SendRealTouchEvent(event); SendRealTouchEvent(event);
return true; return true;
} }