Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 27 additions & 30 deletions browser/base/content/browser-places.js
Original file line number Diff line number Diff line change
Expand Up @@ -1594,43 +1594,40 @@ var BookmarkingUI = {
* We hide it in customize mode, unless there's nothing on the toolbar.
*/
updateEmptyToolbarMessage() {
let emptyMsg = document.getElementById("personal-toolbar-empty");

// If the bookmarks are here but it's early in startup, show the message.
// It'll get made visibility: hidden early in startup anyway - it's just
// to ensure the toolbar has height.
//
// If we're customizing, we might have visible children anyways, even if we
// haven't really initialized the toolbar, so go through the usual path.
if (!this._isCustomizing && !this.toolbar.hasAttribute("initialized")) {
emptyMsg.hidden = false;
emptyMsg.setAttribute("nowidth", "");
return;
}

// Do we have visible kids?
let hasVisibleChildren = !!this.toolbar.querySelector(
`:scope > toolbarpaletteitem > toolbarbutton:not([hidden]),
:scope > toolbarpaletteitem > toolbaritem:not([hidden], #personal-bookmarks),
:scope > toolbarbutton:not([hidden]),
:scope > toolbaritem:not([hidden], #personal-bookmarks)`
);

if (!hasVisibleChildren) {
let hasVisibleChildren = (() => {
// Do we have visible kids?
if (
this.toolbar.querySelector(
`:scope > toolbarpaletteitem > toolbarbutton:not([hidden]),
:scope > toolbarpaletteitem > toolbaritem:not([hidden], #personal-bookmarks),
:scope > toolbarbutton:not([hidden]),
:scope > toolbaritem:not([hidden], #personal-bookmarks)`
)
) {
return true;
}
if (!this.toolbar.hasAttribute("initialized")) {
// If the bookmarks are here but it's early in startup, show the
// message. It'll get made visibility: hidden early in startup anyway -
// it's just to ensure the toolbar has height.
return false;
}
// Hmm, apparently not. Check for bookmarks or customize mode:
let bookmarksToolbarItemsPlacement = CustomizableUI.getPlacementOfWidget(
"personal-bookmarks"
);
let bookmarksItemInToolbar =
bookmarksToolbarItemsPlacement?.area == CustomizableUI.AREA_BOOKMARKS;
if (!bookmarksItemInToolbar) {
return false;
}
return (
this._isCustomizing ||
!!PlacesUtils.getChildCountForFolder(PlacesUtils.bookmarks.toolbarGuid)
);
})();

hasVisibleChildren =
bookmarksItemInToolbar &&
(this._isCustomizing ||
!!PlacesUtils.getChildCountForFolder(
PlacesUtils.bookmarks.toolbarGuid
));
}
let emptyMsg = document.getElementById("personal-toolbar-empty");
emptyMsg.hidden = hasVisibleChildren;
emptyMsg.toggleAttribute("nowidth", !hasVisibleChildren);
},
Expand Down
16 changes: 8 additions & 8 deletions browser/locales/l10n-changesets.json
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "00858ae687ca16fc880d4c449ce85d5459717af0"
"revision": "d3426cf3b0277e4a48c47055a781fb710c4d45b3"
},
"cy": {
"pin": false,
Expand Down Expand Up @@ -357,7 +357,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "497f09d62f3c1fb11b0eccdab56b82f1a04b185d"
"revision": "5e13d8d59e3d5a05333fa14bb33280f6fbb121b1"
},
"de": {
"pin": false,
Expand Down Expand Up @@ -1137,7 +1137,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "e6d431f4579ba59e5db9c3600e5179334685c763"
"revision": "60e30a0f66f21d58781bcf20ed0a18c223c82e38"
},
"lt": {
"pin": false,
Expand Down Expand Up @@ -1353,7 +1353,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "3e99b803677432798ba38670de3b7c01f691fc68"
"revision": "25da53543433d7a910ec52e4acd51412459a0c27"
},
"oc": {
"pin": false,
Expand All @@ -1371,7 +1371,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "2299d1c778ceb2a2786c5c6f34e91d35b336049f"
"revision": "a487b1d59e3eec344d06653deaa9b121f2d646d9"
},
"pa-IN": {
"pin": false,
Expand Down Expand Up @@ -1407,7 +1407,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "b7e966ccbdb01a23616af0a5860782189bba7164"
"revision": "fe03bc5a66b396447adf9f940a32708386fc6798"
},
"pt-BR": {
"pin": false,
Expand Down Expand Up @@ -1497,7 +1497,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "07f8a8331a304f2e55575ad76ef7ab8283fcf901"
"revision": "0580a616542e1e0091b09bc0401ba47266bf8481"
},
"sat": {
"pin": false,
Expand Down Expand Up @@ -1785,7 +1785,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "e68df25f9d58cdeea48bce8fa54b83754ede6dcb"
"revision": "d8c66e08a3abce3d807ee54b4cc8372841ff7a9f"
},
"th": {
"pin": false,
Expand Down
2 changes: 1 addition & 1 deletion modules/libpref/init/StaticPrefList.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6534,7 +6534,7 @@
# Whether to use a video overlay layers for sw decoded video with DirectComposition
- name: gfx.webrender.dcomp-video-sw-overlay-win
type: bool
value: @IS_EARLY_BETA_OR_EARLIER@
value: true
mirror: once
- name: gfx.webrender.dcomp-video-check-slow-present
type: RelaxedAtomicBool
Expand Down