Bug 802856 - Plugins don't always get focused in HiDPI mode if you click on them. r=jfkthame

This commit is contained in:
Steven Michaud 2012-10-18 10:53:32 -05:00
Родитель 10dd5e6f78
Коммит 01f5802859
1 изменённых файлов: 3 добавлений и 2 удалений

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

@ -3959,10 +3959,11 @@ static int32_t RoundUp(double aDouble)
nsAutoRetainCocoaObject kungFuDeathGrip(self); nsAutoRetainCocoaObject kungFuDeathGrip(self);
// hitTest needs coordinates in device pixels
NSPoint eventLoc = nsCocoaUtils::ScreenLocationForEvent(currentEvent); NSPoint eventLoc = nsCocoaUtils::ScreenLocationForEvent(currentEvent);
eventLoc.y = nsCocoaUtils::FlippedScreenY(eventLoc.y); eventLoc.y = nsCocoaUtils::FlippedScreenY(eventLoc.y);
nsIntPoint widgetLoc(NSToIntRound(eventLoc.x), NSToIntRound(eventLoc.y)); nsIntPoint widgetLoc = mGeckoChild->CocoaPointsToDevPixels(eventLoc) -
widgetLoc -= mGeckoChild->WidgetToScreenOffset(); mGeckoChild->WidgetToScreenOffset();
nsQueryContentEvent hitTest(true, NS_QUERY_DOM_WIDGET_HITTEST, mGeckoChild); nsQueryContentEvent hitTest(true, NS_QUERY_DOM_WIDGET_HITTEST, mGeckoChild);
hitTest.InitForQueryDOMWidgetHittest(widgetLoc); hitTest.InitForQueryDOMWidgetHittest(widgetLoc);