commit 1bce2ce8e3c40f20b3c99650470004a1eeb77901 parent e96d60444f5448b2ae6e0dd62f7f685fce26b508 Author: Cristina Horotan <chorotan@mozilla.com> Date: Mon, 3 Nov 2025 07:49:47 +0200 Revert "Bug 1997722. Allow coordinatesRelativeToScreen in apz_test_native_event_utils.js to always be able to walk up the in process document hierarchy. r=hiro" for causing mochitest failures on test_group_double_tap_zoom-2.html This reverts commit 2132f219cb77ce83611db4aac4bcfd2362e63b98. Diffstat:
| M | gfx/layers/apz/test/mochitest/apz_test_native_event_utils.js | | | 12 | +++++------- |
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/gfx/layers/apz/test/mochitest/apz_test_native_event_utils.js b/gfx/layers/apz/test/mochitest/apz_test_native_event_utils.js @@ -240,10 +240,8 @@ function _getTargetRect(aTarget) { // Iterate up the window hierarchy until we reach the root // content window, adding the offsets of any iframe windows // relative to their parent window. - aTarget = SpecialPowers.wrap(aTarget); - while (aTarget.ownerDocument.defaultView.browsingContext.embedderElement) { - const iframe = - aTarget.ownerDocument.defaultView.browsingContext.embedderElement; + while (aTarget.ownerDocument.defaultView.frameElement) { + const iframe = aTarget.ownerDocument.defaultView.frameElement; // The offset of the iframe window relative to the parent window // includes the iframe's border, and the iframe's origin in its // containing document. @@ -285,9 +283,9 @@ function _getTargetRect(aTarget) { // Returns the in-process root window for the given |aWindow|. function getInProcessRootWindow(aWindow) { - let window = SpecialPowers.wrap(aWindow); - while (window.browsingContext.embedderElement) { - window = window.browsingContext.embedderElement.ownerDocument.defaultView; + let window = aWindow; + while (window.frameElement) { + window = window.frameElement.ownerDocument.defaultView; } return window; }