Skip to content

Commit

Permalink
Bug 1689437, respect bookmarks.toolbars.bookmarks pref values to disp…
Browse files Browse the repository at this point in the history
…lay bookmarks toolbar in skeleton UI r=dthayer

Differential Revision: https://phabricator.services.mozilla.com/D103358
  • Loading branch information
Emma Malysz committed Feb 2, 2021
1 parent e2e8e3c commit 3e25955
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions xpfe/appshell/AppWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 3e25955

Please sign in to comment.