# HG changeset patch # User Ian Neal # Date 1722959418 -3600 # Parent e165f204a6f0e76c57468ad2a1d442a6a393acca Bug 1911844 - Switch from boxObject to getBoundingClientRect in utilityOverlay. r=frg a=frg diff --git a/suite/base/content/utilityOverlay.js b/suite/base/content/utilityOverlay.js --- a/suite/base/content/utilityOverlay.js +++ b/suite/base/content/utilityOverlay.js @@ -934,18 +934,18 @@ function focusElement(aElement) function isElementVisible(aElement) { if (!aElement) return false; // If aElement or a direct or indirect parent is hidden or collapsed, // height, width or both will be 0. - var bo = aElement.boxObject; - return (bo.height > 0 && bo.width > 0); + var rect = aElement.getBoundingClientRect(); + return rect.height > 0 && rect.width > 0; } function makeURLAbsolute(aBase, aUrl, aCharset) { // Construct nsIURL. return Services.io.newURI(aUrl, aCharset, Services.io.newURI(aBase, aCharset)).spec; }