Bug 664707. Followup. Use the right point for touch events. r=matspal

This commit is contained in:
Timothy Nikkel 2012-03-06 09:58:36 -06:00
Родитель 50b93219f8
Коммит 93fec03e76
1 изменённых файлов: 4 добавлений и 4 удалений

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

@ -1048,14 +1048,14 @@ nsLayoutUtils::GetEventCoordinatesRelativeTo(const nsEvent* aEvent,
nsIView* view = aFrame->GetView();
if (view) {
nsIWidget* fwidget = view->GetWidget();
if (fwidget && fwidget == GUIEvent->widget) {
nsIWidget* frameWidget = view->GetWidget();
if (frameWidget && frameWidget == GUIEvent->widget) {
// Special case this cause it happens a lot.
// This also fixes bug 664707, events in the extra-special case of select
// dropdown popups that are transformed.
nsPresContext* presContext = aFrame->PresContext();
nsPoint pt(presContext->DevPixelsToAppUnits(GUIEvent->refPoint.x),
presContext->DevPixelsToAppUnits(GUIEvent->refPoint.y));
nsPoint pt(presContext->DevPixelsToAppUnits(aPoint.x),
presContext->DevPixelsToAppUnits(aPoint.y));
return pt - view->ViewToWidgetOffset();
}
}