From ba1ac6d353521f35dd3ce20aecade30c997317b9 Mon Sep 17 00:00:00 2001 From: Timothy Nikkel Date: Tue, 6 Mar 2012 09:58:36 -0600 Subject: [PATCH] Bug 664707. Followup. Use the right point for touch events. r=matspal --- layout/base/nsLayoutUtils.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/layout/base/nsLayoutUtils.cpp b/layout/base/nsLayoutUtils.cpp index 425c67fed24..1a46283afac 100644 --- a/layout/base/nsLayoutUtils.cpp +++ b/layout/base/nsLayoutUtils.cpp @@ -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(); } }