Bug 1726638 - Rename nsIDOMWindowUtils.toScreenRect to ToScreenRectInCSSUnits. r=tnikkel

Differential Revision: https://phabricator.services.mozilla.com/D123174
This commit is contained in:
Hiroyuki Ikezoe 2021-08-21 00:31:13 +00:00
Родитель 1f9b94dc30
Коммит f252e47c82
4 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

@ -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,