Bug 1144516 - Remove offset of mozbrowser iframe. r=yzen
authorEitan Isaacson <eitan@monotonous.org>
Tue, 26 May 2015 10:13:17 -0700
changeset 265225 7e8f2f8cd18cdb78817c391d9bf5354d4c05625f
parent 265224 8dd444c92c4d1bfe0a4f89102aefe4d56d7bffa2
child 265226 5232dd059c11090c118ca413f60b22822823b2c3
push id8157
push userjlund@mozilla.com
push dateMon, 29 Jun 2015 20:36:23 +0000
treeherdermozilla-aurora@d480e05bd276 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersyzen
bugs1144516
milestone41.0a1
Bug 1144516 - Remove offset of mozbrowser iframe. r=yzen
accessible/jsat/AccessFu.jsm
--- a/accessible/jsat/AccessFu.jsm
+++ b/accessible/jsat/AccessFu.jsm
@@ -412,24 +412,16 @@ this.AccessFu = { // jshint ignore:line
     function(aJsonBounds, aBrowser, aToCSSPixels) {
       let bounds = new Rect(aJsonBounds.left, aJsonBounds.top,
                             aJsonBounds.right - aJsonBounds.left,
                             aJsonBounds.bottom - aJsonBounds.top);
       let win = Utils.win;
       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);
 
       // If we want to get to CSS pixels from device pixels, this needs to be
       // further divided by the devicePixelRatio due to widget scaling.
       if (aToCSSPixels) {
         bounds = bounds.scale(1 / dpr, 1 / dpr);