Bug 1144516 - Remove offset of mozbrowser iframe. r=yzen

This commit is contained in:
Eitan Isaacson 2015-05-26 10:13:17 -07:00
parent 83bfbdcc05
commit b60a45cbf7

View File

@ -417,14 +417,6 @@ this.AccessFu = { // jshint ignore:line
let dpr = win.devicePixelRatio;
let offset = { left: -win.mozInnerScreenX, top: -win.mozInnerScreenY };
if (!aBrowser.contentWindow) {
// OOP browser, add offset of browser.
// The offset of the browser element in relation to its parent window.
let clientRect = aBrowser.getBoundingClientRect();
let win = aBrowser.ownerDocument.defaultView;
offset.left += clientRect.left + win.mozInnerScreenX;
offset.top += clientRect.top + win.mozInnerScreenY;
}
// Add the offset; the offset is in CSS pixels, so multiply the
// devicePixelRatio back in before adding to preserve unit consistency.
bounds = bounds.translate(offset.left * dpr, offset.top * dpr);