Bug 1075670 - [e10s] event.screenX and event.screenY is wrong

mapScreenCoordinatesFromContent is now wrong, unnecessary, and gone.
This commit is contained in:
David Parks 2015-02-04 04:22:30 -08:00
parent 18e4b763a1
commit 78987406ff
5 changed files with 5 additions and 49 deletions

View File

@ -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": {

View File

@ -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) {

View File

@ -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>

View File

@ -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"/>

View File

@ -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();
},