Bug 1450927 - use new getBoundsInCSSPixels method for accessible bounds in accessible highlighter. r=jryans
☠☠ backed out by 89bc67f5eaaf ☠ ☠
authorYura Zenevich <yura.zenevich@gmail.com>
Tue, 24 Apr 2018 15:07:47 -0400
changeset 471727 ca285aed3926966562f9444b912eb24d757d2657
parent 471726 d7dd8b0d2473d38abcc425e583c377eac734d14c
child 471728 b512c7a263b259b844aefd723301fb7643e1bfd2
push id1728
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:12:27 +0000
treeherdermozilla-release@c296fde26f5f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjryans
bugs1450927
milestone61.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1450927 - use new getBoundsInCSSPixels method for accessible bounds in accessible highlighter. r=jryans MozReview-Commit-ID: 4Ixj2ksuDrP
devtools/server/actors/accessibility.js
devtools/server/actors/highlighters/utils/accessibility.js
--- a/devtools/server/actors/accessibility.js
+++ b/devtools/server/actors/accessibility.js
@@ -320,17 +320,17 @@ const AccessibleActor = ActorClassWithSp
 
   get bounds() {
     if (this.isDefunct) {
       return null;
     }
 
     let x = {}, y = {}, w = {}, h = {};
     try {
-      this.rawAccessible.getBounds(x, y, w, h);
+      this.rawAccessible.getBoundsInCSSPixels(x, y, w, h);
       x = x.value;
       y = y.value;
       w = w.value;
       h = h.value;
     } catch (e) {
       return null;
     }
 
--- a/devtools/server/actors/highlighters/utils/accessibility.js
+++ b/devtools/server/actors/highlighters/utils/accessibility.js
@@ -21,29 +21,29 @@ const { getCurrentZoom } = require("devt
  *         - {Number} w
  *           width of the the accessible object
  *         - {Number} h
  *           height of the the accessible object
  * @return {Object|null} Returns, if available, positioning and bounds information for
  *                 the accessible object.
  */
 function getBounds(win, { x, y, w, h }) {
-  let { devicePixelRatio, mozInnerScreenX, mozInnerScreenY, scrollX, scrollY } = win;
+  let { mozInnerScreenX, mozInnerScreenY, scrollX, scrollY } = win;
   let zoom = getCurrentZoom(win);
   let left = x, right = x + w, top = y, bottom = y + h;
 
-  left -= (mozInnerScreenX - scrollX) * devicePixelRatio;
-  right -= (mozInnerScreenX - scrollX) * devicePixelRatio;
-  top -= (mozInnerScreenY - scrollY) * devicePixelRatio;
-  bottom -= (mozInnerScreenY - scrollY) * devicePixelRatio;
+  left -= mozInnerScreenX - scrollX;
+  right -= mozInnerScreenX - scrollX;
+  top -= mozInnerScreenY - scrollY;
+  bottom -= mozInnerScreenY - scrollY;
 
-  left *= zoom / devicePixelRatio;
-  right *= zoom / devicePixelRatio;
-  top *= zoom / devicePixelRatio;
-  bottom *= zoom / devicePixelRatio;
+  left *= zoom;
+  right *= zoom;
+  top *= zoom;
+  bottom *= zoom;
 
   let width = right - left;
   let height = bottom - top;
 
   return { left, right, top, bottom, width, height };
 }
 
 exports.getBounds = getBounds;