diff --git a/browser/components/preferences/fonts.xul b/browser/components/preferences/fonts.xul index 3aa4d21a6ae2..3e7abbcc7629 100644 --- a/browser/components/preferences/fonts.xul +++ b/browser/components/preferences/fonts.xul @@ -44,40 +44,43 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -214,36 +217,39 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -264,28 +270,31 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/browser/components/preferences/in-content-new/findInPage.js b/browser/components/preferences/in-content-new/findInPage.js index b5669336a1db..239363c2abc7 100644 --- a/browser/components/preferences/in-content-new/findInPage.js +++ b/browser/components/preferences/in-content-new/findInPage.js @@ -23,19 +23,6 @@ var gSearchResultsPane = { this.searchInput.focus(); this.initializeCategories(); }); - - // Throttling the resize event to reduce the callback frequency - let callbackId; - window.addEventListener("resize", () => { - if (!callbackId) { - callbackId = window.requestAnimationFrame(() => { - this.listSearchTooltips.forEach((anchorNode) => { - this.calculateTooltipPosition(anchorNode); - }); - callbackId = null; - }); - } - }); } let strings = this.strings; this.searchInput.placeholder = AppConstants.platform == "win" ? @@ -438,18 +425,8 @@ var gSearchResultsPane = { // In order to get the up-to-date position of each of the nodes that we're // putting tooltips on, we have to flush layout intentionally, and that // this is the result of a XUL limitation (bug 1363730). - let anchorRect = anchorNode.getBoundingClientRect(); let tooltipRect = searchTooltip.getBoundingClientRect(); - let parentRect = anchorNode.parentElement.getBoundingClientRect(); - - let offSetLeft = (anchorRect.width / 2) - (tooltipRect.width / 2); - let relativeOffset = anchorRect.left - parentRect.left; - offSetLeft += relativeOffset > 0 ? relativeOffset : 0; - // 20.5 is reserved for tooltip position - let offSetTop = anchorRect.top - parentRect.top - 20.5; - - searchTooltip.style.setProperty("left", `${offSetLeft}px`); - searchTooltip.style.setProperty("top", `${offSetTop}px`); + searchTooltip.style.setProperty("left", `calc(50% - ${(tooltipRect.width / 2)}px)`); }, /** diff --git a/browser/components/preferences/in-content-new/main.xul b/browser/components/preferences/in-content-new/main.xul index aa74d07c8483..1696c1f71ce3 100644 --- a/browser/components/preferences/in-content-new/main.xul +++ b/browser/components/preferences/in-content-new/main.xul @@ -432,13 +432,16 @@ &browserContainersLearnMore.label; -