mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-11 16:32:59 +00:00
Bug 1075670 - [e10s] event.screenX and event.screenY is wrong
mapScreenCoordinatesFromContent is now wrong, unnecessary, and gone.
This commit is contained in:
parent
18e4b763a1
commit
78987406ff
@ -3202,8 +3202,7 @@
|
||||
addonInfo: aMessage.data.addonInfo };
|
||||
let popup = browser.ownerDocument.getElementById("contentAreaContextMenu");
|
||||
let event = gContextMenuContentData.event;
|
||||
let pos = browser.mapScreenCoordinatesFromContent(event.screenX, event.screenY);
|
||||
popup.openPopupAtScreen(pos.x, pos.y, true);
|
||||
popup.openPopupAtScreen(event.screenX, event.screenY, true);
|
||||
break;
|
||||
}
|
||||
case "DOMWebNotificationClicked": {
|
||||
|
@ -81,9 +81,8 @@ this.AutoCompleteE10S = {
|
||||
this.popup.hidden = false;
|
||||
this.popup.setAttribute("width", rect.width);
|
||||
|
||||
let {x, y} = this.browser.mapScreenCoordinatesFromContent(rect.left, rect.top + rect.height);
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.x = rect.left;
|
||||
this.y = rect.top + rect.height;
|
||||
},
|
||||
|
||||
_showPopup: function(results) {
|
||||
|
@ -868,8 +868,7 @@
|
||||
if (!this.autoscrollEnabled) {
|
||||
return false;
|
||||
}
|
||||
let pos = this.mapScreenCoordinatesFromContent(data.screenX, data.screenY);
|
||||
this.startScroll(data.scrolldir, pos.x, pos.y);
|
||||
this.startScroll(data.scrolldir, data.screenX, data.screenY);
|
||||
return true;
|
||||
}
|
||||
case "Autoscroll:Cancel":
|
||||
@ -1050,25 +1049,6 @@
|
||||
</body>
|
||||
</method>
|
||||
|
||||
<!--
|
||||
For out-of-process code, event.screen[XY] is relative to the
|
||||
left/top of the content view. For in-process code,
|
||||
event.screen[XY] is relative to the left/top of the screen. We
|
||||
use this method to map screen coordinates received from a
|
||||
(possibly out-of-process) <browser> element to coordinates
|
||||
that are relative to the screen. This code handles the
|
||||
in-process case, where we return the coordinates unchanged.
|
||||
-->
|
||||
<method name="mapScreenCoordinatesFromContent">
|
||||
<parameter name="aScreenX"/>
|
||||
<parameter name="aScreenY"/>
|
||||
<body>
|
||||
<![CDATA[
|
||||
return { x: aScreenX, y: aScreenY };
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
||||
<method name="swapDocShells">
|
||||
<parameter name="aOtherBrowser"/>
|
||||
<body>
|
||||
|
@ -385,27 +385,6 @@
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
<!--
|
||||
For out-of-process code, event.screen[XY] is relative to the
|
||||
left/top of the content view. For in-process code,
|
||||
event.screen[XY] is relative to the left/top of the screen. We
|
||||
use this method to map screen coordinates received from a
|
||||
(possibly out-of-process) <browser> element to coordinates
|
||||
that are relative to the screen. This code handles the
|
||||
out-of-process case, where we need to translate by the screen
|
||||
position of the <browser> element.
|
||||
-->
|
||||
<method name="mapScreenCoordinatesFromContent">
|
||||
<parameter name="aScreenX"/>
|
||||
<parameter name="aScreenY"/>
|
||||
<body>
|
||||
<![CDATA[
|
||||
return { x: aScreenX + this.boxObject.screenX,
|
||||
y: aScreenY + this.boxObject.screenY };
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
||||
<method name="enableDisableCommands">
|
||||
<parameter name="aAction"/>
|
||||
<parameter name="aEnabledLength"/>
|
||||
|
@ -28,8 +28,7 @@ this.SelectParentHelper = {
|
||||
currentBrowser = browser;
|
||||
this._registerListeners(menulist.menupopup);
|
||||
|
||||
let {x, y} = browser.mapScreenCoordinatesFromContent(rect.left, rect.top + rect.height);
|
||||
menulist.menupopup.openPopupAtScreen(x, y);
|
||||
menulist.menupopup.openPopupAtScreen(rect.left, rect.top + rect.height);
|
||||
menulist.selectedItem.scrollIntoView();
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user