зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1726638 - Rename nsIDOMWindowUtils.toScreenRect to ToScreenRectInCSSUnits. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D123174
This commit is contained in:
Родитель
1f9b94dc30
Коммит
f252e47c82
|
@ -1839,8 +1839,8 @@ nsDOMWindowUtils::TransformRectLayoutToVisual(float aX, float aY, float aWidth,
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsDOMWindowUtils::ToScreenRect(float aX, float aY, float aWidth, float aHeight,
|
nsDOMWindowUtils::ToScreenRectInCSSUnits(float aX, float aY, float aWidth,
|
||||||
DOMRect** aResult) {
|
float aHeight, DOMRect** aResult) {
|
||||||
nsCOMPtr<nsPIDOMWindowOuter> window = do_QueryReferent(mWindow);
|
nsCOMPtr<nsPIDOMWindowOuter> window = do_QueryReferent(mWindow);
|
||||||
NS_ENSURE_STATE(window);
|
NS_ENSURE_STATE(window);
|
||||||
|
|
||||||
|
|
|
@ -1044,8 +1044,8 @@ interface nsIDOMWindowUtils : nsISupports {
|
||||||
* Transform a rectangle given in coordinates relative to this document
|
* Transform a rectangle given in coordinates relative to this document
|
||||||
* into CSS coordinates relative to the screen.
|
* into CSS coordinates relative to the screen.
|
||||||
*/
|
*/
|
||||||
DOMRect toScreenRect(in float aX, in float aY,
|
DOMRect toScreenRectInCSSUnits(in float aX, in float aY,
|
||||||
in float aWidth, in float aHeight);
|
in float aWidth, in float aHeight);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the maximum height of the dynamic toolbar in Screen pixel units.
|
* Sets the maximum height of the dynamic toolbar in Screen pixel units.
|
||||||
|
|
|
@ -326,7 +326,7 @@ async function coordinatesRelativeToScreen(aParams) {
|
||||||
const rect = _getTargetRect(target);
|
const rect = _getTargetRect(target);
|
||||||
|
|
||||||
const utils = SpecialPowers.getDOMWindowUtils(getInProcessRootWindow(window));
|
const utils = SpecialPowers.getDOMWindowUtils(getInProcessRootWindow(window));
|
||||||
const positionInScreenCoords = utils.toScreenRect(
|
const positionInScreenCoords = utils.toScreenRectInCSSUnits(
|
||||||
rect.left + (atCenter ? rect.width / 2 : offsetX),
|
rect.left + (atCenter ? rect.width / 2 : offsetX),
|
||||||
rect.top + (atCenter ? rect.height / 2 : offsetY),
|
rect.top + (atCenter ? rect.height / 2 : offsetY),
|
||||||
0,
|
0,
|
||||||
|
|
|
@ -39,7 +39,7 @@ var LayoutUtils = {
|
||||||
parentFrame = win.frameElement;
|
parentFrame = win.frameElement;
|
||||||
}
|
}
|
||||||
|
|
||||||
return aElement.ownerGlobal.windowUtils.toScreenRect(
|
return aElement.ownerGlobal.windowUtils.toScreenRectInCSSUnits(
|
||||||
x,
|
x,
|
||||||
y,
|
y,
|
||||||
rect.width,
|
rect.width,
|
||||||
|
|
Загрузка…
Ссылка в новой задаче