Bug 1747422 - Rename the allDownloads list box. r=dao
* Having a different id for the container of download items in the download panel vs the all-downloads view (about:downloads and the library/places view) is one of the main reasons we need the %define item, to allow the same included stylesheet to apply to the different markup by virtue of the different selector produced when @item@ is expanded * As these IDs aren't particularly descriptive, and the distinction isn't meaningful, having each list use the same id allows more direct stylesheet reuse in both places Differential Revision: https://phabricator.services.mozilla.com/D135399
This commit is contained in:
@@ -880,7 +880,7 @@ function goUpdateDownloadCommands() {
|
||||
}
|
||||
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
let richListBox = document.getElementById("downloadsRichListBox");
|
||||
let richListBox = document.getElementById("downloadsListBox");
|
||||
richListBox.addEventListener("scroll", function(event) {
|
||||
return this._placesView.onScroll();
|
||||
});
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#downloadsRichListBox:not(:empty) + #downloadsListEmptyDescription,
|
||||
#downloadsRichListBox:empty {
|
||||
#downloadsListBox:not(:empty) + #downloadsListEmptyDescription,
|
||||
#downloadsListBox:empty {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@@ -10,14 +10,14 @@ const { PrivateBrowsingUtils } = ChromeUtils.import(
|
||||
|
||||
var ContentAreaDownloadsView = {
|
||||
init() {
|
||||
let box = document.getElementById("downloadsRichListBox");
|
||||
let box = document.getElementById("downloadsListBox");
|
||||
box.addEventListener(
|
||||
"InitialDownloadsLoaded",
|
||||
() => {
|
||||
// Set focus to Downloads list once it is created
|
||||
// And prevent it from showing the focus ring around the richlistbox (Bug 1702694)
|
||||
document
|
||||
.getElementById("downloadsRichListBox")
|
||||
.getElementById("downloadsListBox")
|
||||
.focus({ preventFocusRing: true });
|
||||
},
|
||||
{ once: true }
|
||||
|
||||
@@ -41,7 +41,8 @@
|
||||
|
||||
<richlistbox flex="1"
|
||||
seltype="multiple"
|
||||
id="downloadsRichListBox"
|
||||
id="downloadsListBox"
|
||||
class="allDownloadsListBox"
|
||||
context="downloadsContextMenu"/>
|
||||
<description id="downloadsListEmptyDescription"
|
||||
data-l10n-id="downloads-list-empty"/>
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
/*** Downloads View ***/
|
||||
|
||||
#downloadsRichListBox > richlistitem button {
|
||||
#downloadsListBox.allDownloadsListBox > richlistitem button {
|
||||
/* These buttons should never get focus, as that would "disable"
|
||||
the downloads view controller (it's only used when the richlistbox
|
||||
is focused). */
|
||||
|
||||
Reference in New Issue
Block a user