From 86cc27eb448cb126815957c793ea333646103124 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Mon, 26 Feb 2024 15:11:00 +0000 Subject: [PATCH] Bug 1881488 - Use tooltip delay for tab preview. r=tabbrowser-reviewers,dao Differential Revision: https://phabricator.services.mozilla.com/D202420 --- browser/app/profile/firefox.js | 1 - browser/base/content/test/tabs/browser_tab_preview.js | 2 +- browser/components/tabpreview/tabpreview.mjs | 4 +--- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js index c16e63b0e031..50c09f9bc5dd 100644 --- a/browser/app/profile/firefox.js +++ b/browser/app/profile/firefox.js @@ -938,7 +938,6 @@ pref("browser.tabs.tooltipsShowPidAndActiveness", false); #endif pref("browser.tabs.cardPreview.enabled", false); -pref("browser.tabs.cardPreview.delayMs", 1000); pref("browser.tabs.cardPreview.showThumbnails", true); pref("browser.tabs.firefox-view", true); diff --git a/browser/base/content/test/tabs/browser_tab_preview.js b/browser/base/content/test/tabs/browser_tab_preview.js index e3dd1b684208..c4ebabd30de3 100644 --- a/browser/base/content/test/tabs/browser_tab_preview.js +++ b/browser/base/content/test/tabs/browser_tab_preview.js @@ -34,7 +34,7 @@ add_setup(async function () { set: [ ["browser.tabs.cardPreview.enabled", true], ["browser.tabs.cardPreview.showThumbnails", false], - ["browser.tabs.cardPreview.delayMs", 0], + ["ui.tooltip.delay_ms", 0], ], }); }); diff --git a/browser/components/tabpreview/tabpreview.mjs b/browser/components/tabpreview/tabpreview.mjs index 5256ab22ff3a..38c13b03a4c2 100644 --- a/browser/components/tabpreview/tabpreview.mjs +++ b/browser/components/tabpreview/tabpreview.mjs @@ -11,7 +11,6 @@ var { XPCOMUtils } = ChromeUtils.importESModule( const TAB_PREVIEW_USE_THUMBNAILS_PREF = "browser.tabs.cardPreview.showThumbnails"; -const TAB_PREVIEW_DELAY_PREF = "browser.tabs.cardPreview.delayMs"; /** * Detailed preview card that displays when hovering a tab @@ -37,8 +36,7 @@ export default class TabPreview extends MozLitElement { XPCOMUtils.defineLazyPreferenceGetter( this, "_prefPreviewDelay", - TAB_PREVIEW_DELAY_PREF, - 1000 + "ui.tooltip.delay_ms" ); XPCOMUtils.defineLazyPreferenceGetter( this,