mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1139675 - Update JS callers of nsIDOMWindowUtils.setResolution and getResolution in accessibility code. r=yzen
This commit is contained in:
parent
b7b1daa972
commit
b0b35fd90e
@ -301,22 +301,22 @@ this.Utils = { // jshint ignore:line
|
||||
},
|
||||
|
||||
getContentResolution: function _getContentResolution(aAccessible) {
|
||||
let resX = { value: 1 }, resY = { value: 1 };
|
||||
let res = { value: 1 };
|
||||
aAccessible.document.window.QueryInterface(
|
||||
Ci.nsIInterfaceRequestor).getInterface(
|
||||
Ci.nsIDOMWindowUtils).getResolution(resX, resY);
|
||||
return [resX.value, resY.value];
|
||||
Ci.nsIDOMWindowUtils).getResolution(res);
|
||||
return res.value;
|
||||
},
|
||||
|
||||
getBounds: function getBounds(aAccessible, aPreserveContentScale) {
|
||||
let objX = {}, objY = {}, objW = {}, objH = {};
|
||||
aAccessible.getBounds(objX, objY, objW, objH);
|
||||
|
||||
let [scaleX, scaleY] = aPreserveContentScale ? [1, 1] :
|
||||
let scale = aPreserveContentScale ? 1 :
|
||||
this.getContentResolution(aAccessible);
|
||||
|
||||
return new Rect(objX.value, objY.value, objW.value, objH.value).scale(
|
||||
scaleX, scaleY);
|
||||
scale, scale);
|
||||
},
|
||||
|
||||
getTextBounds: function getTextBounds(aAccessible, aStart, aEnd,
|
||||
@ -326,11 +326,11 @@ this.Utils = { // jshint ignore:line
|
||||
accText.getRangeExtents(aStart, aEnd, objX, objY, objW, objH,
|
||||
Ci.nsIAccessibleCoordinateType.COORDTYPE_SCREEN_RELATIVE);
|
||||
|
||||
let [scaleX, scaleY] = aPreserveContentScale ? [1, 1] :
|
||||
let scale = aPreserveContentScale ? 1 :
|
||||
this.getContentResolution(aAccessible);
|
||||
|
||||
return new Rect(objX.value, objY.value, objW.value, objH.value).scale(
|
||||
scaleX, scaleY);
|
||||
scale, scale);
|
||||
},
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user