Bug 1689437, respect bookmarks.toolbars.bookmarks pref values to display bookmarks toolbar in skeleton UI r=dthayer

Differential Revision: https://phabricator.services.mozilla.com/D103358
This commit is contained in:
Emma Malysz 2021-02-02 20:32:51 +00:00
Родитель e2e8e3c012
Коммит 3e25955d29
1 изменённых файлов: 7 добавлений и 3 удалений

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

@ -1877,9 +1877,13 @@ nsresult AppWindow::MaybeSaveEarlyWindowPersistentValues(
}
settings.searchbarSpan = searchbar;
Element* bookmarksToolbar = doc->GetElementById(u"PersonalToolbar"_ns);
bookmarksToolbar->GetAttribute(u"collapsed"_ns, attributeValue);
settings.bookmarksToolbarShown = attributeValue.EqualsLiteral("false");
nsAutoString bookmarksVisibility;
Preferences::GetString("browser.toolbars.bookmarks.visibility",
bookmarksVisibility);
settings.bookmarksToolbarShown =
bookmarksVisibility.EqualsLiteral("always") ||
(Preferences::GetBool("browser.toolbars.bookmarks.2h2020", false) &&
bookmarksVisibility.EqualsLiteral("newtab"));
Element* menubar = doc->GetElementById(u"toolbar-menubar"_ns);
menubar->GetAttribute(u"autohide"_ns, attributeValue);