зеркало из https://github.com/mozilla/gecko-dev.git
Bug 802856 - Plugins don't always get focused in HiDPI mode if you click on them. r=jfkthame
This commit is contained in:
Родитель
10dd5e6f78
Коммит
01f5802859
|
@ -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);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче