Bug 1075670 - Remove mapScreenCoordinatesFromContent as it is legacy behavior r=billm

This commit is contained in:
David Parks 2015-02-04 04:22:30 -08:00
Родитель dfabccab89
Коммит 3f8568e6b8
5 изменённых файлов: 5 добавлений и 49 удалений

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

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