Bug 1616793 - Stop hiding top sites if they are disabled in the new tab page. r=mak

Differential Revision: https://phabricator.services.mozilla.com/D63464

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Dão Gottwald 2020-02-20 14:05:04 +00:00
Родитель 73a6a77284
Коммит 86af384543
2 изменённых файлов: 2 добавлений и 7 удалений

Просмотреть файл

@ -186,7 +186,6 @@ const PREF_OTHER_DEFAULTS = new Map([
["browser.search.suggest.enabled.private", false],
["ui.popup.disable_autohide", false],
["browser.fixup.dns_first_for_single_words", false],
["browser.newtabpage.activity-stream.feeds.topsites", true],
]);
// Maps preferences under browser.urlbar.suggest to behavior names, as defined

Просмотреть файл

@ -406,13 +406,9 @@ class UrlbarView {
!this.input.value ||
this.input.getAttribute("pageproxystate") == "valid"
) {
// We do not show Top Sites in private windows, or if the user disabled
// them on about:newtab.
let canOpenTopSites =
!this.input.isPrivate &&
UrlbarPrefs.get("browser.newtabpage.activity-stream.feeds.topsites");
if (
canOpenTopSites &&
// Do not show Top Sites in private windows.
!this.input.isPrivate &&
!this.isOpen &&
["mousedown", "command"].includes(queryOptions.event.type)
) {