From 19eb990aeb197f70a0cf46efdf9f2bdd6ed1d48c Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Thu, 30 Sep 2021 21:05:34 -0400 Subject: DOMRect update (#1973) * Compare using left/top rather than x/y * Simplify * Update Popup*.getFrameRect to return a custom structure * Don't use x/y on DOMRect --- ext/js/comm/frame-offset-forwarder.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ext/js/comm') diff --git a/ext/js/comm/frame-offset-forwarder.js b/ext/js/comm/frame-offset-forwarder.js index 2382a9fa..dd064a64 100644 --- a/ext/js/comm/frame-offset-forwarder.js +++ b/ext/js/comm/frame-offset-forwarder.js @@ -63,7 +63,7 @@ class FrameOffsetForwarder { const frameElement = this._frameAncestryHandler.getChildFrameElement(frameId); if (frameElement === null) { return null; } - const {x, y, width, height} = frameElement.getBoundingClientRect(); - return {x, y, width, height}; + const {left, top, width, height} = frameElement.getBoundingClientRect(); + return {x: left, y: top, width, height}; } } -- cgit v1.2.3