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
parent 10dd5e6f78
commit 01f5802859

View File

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