diff --git a/browser/components/BrowserGlue.jsm b/browser/components/BrowserGlue.jsm index bc32212274ed..c6657d0f4930 100644 --- a/browser/components/BrowserGlue.jsm +++ b/browser/components/BrowserGlue.jsm @@ -154,7 +154,6 @@ let LEGACY_ACTORS = { "AboutLogins:LoginModified", "AboutLogins:LoginRemoved", "AboutLogins:MasterPasswordResponse", - "AboutLogins:SendFavicons", "AboutLogins:SyncState", "AboutLogins:UpdateBreaches", ], diff --git a/browser/components/aboutlogins/AboutLoginsChild.jsm b/browser/components/aboutlogins/AboutLoginsChild.jsm index 8286d2b0b8dc..3dc54c6d42bd 100644 --- a/browser/components/aboutlogins/AboutLoginsChild.jsm +++ b/browser/components/aboutlogins/AboutLoginsChild.jsm @@ -167,9 +167,6 @@ class AboutLoginsChild extends ActorChild { if (masterPasswordPromise) { masterPasswordPromise.resolve(message.data); } - case "AboutLogins:SendFavicons": - this.sendToContent("SendFavicons", message.data); - break; case "AboutLogins:SyncState": this.sendToContent("SyncState", message.data); break; diff --git a/browser/components/aboutlogins/AboutLoginsParent.jsm b/browser/components/aboutlogins/AboutLoginsParent.jsm index 0a6025c834c5..4e5cd087a655 100644 --- a/browser/components/aboutlogins/AboutLoginsParent.jsm +++ b/browser/components/aboutlogins/AboutLoginsParent.jsm @@ -35,12 +35,6 @@ ChromeUtils.defineModuleGetter( "resource://services-sync/UIState.jsm" ); -ChromeUtils.defineModuleGetter( - this, - "PlacesUtils", - "resource://gre/modules/PlacesUtils.jsm" -); - XPCOMUtils.defineLazyGetter(this, "log", () => { return LoginHelper.createLogger("AboutLoginsParent"); }); @@ -267,19 +261,16 @@ var AboutLoginsParent = { messageManager.sendAsyncMessage("AboutLogins:SyncState", syncState); this.updatePasswordSyncNotificationState(); - if (BREACH_ALERTS_ENABLED) { - const breachesByLoginGUID = await LoginHelper.getBreachesForLogins( - logins - ); - messageManager.sendAsyncMessage( - "AboutLogins:UpdateBreaches", - breachesByLoginGUID - ); + if (!BREACH_ALERTS_ENABLED) { + return; } + const breachesByLoginGUID = await LoginHelper.getBreachesForLogins( + logins + ); messageManager.sendAsyncMessage( - "AboutLogins:SendFavicons", - await this.getAllFavicons(logins) + "AboutLogins:UpdateBreaches", + breachesByLoginGUID ); } catch (ex) { if (ex.result != Cr.NS_ERROR_NOT_INITIALIZED) { @@ -382,38 +373,6 @@ var AboutLoginsParent = { } }, - async getFavicon(login) { - try { - const faviconData = await PlacesUtils.promiseFaviconData(login.hostname); - return { - faviconData, - title: login.title, - }; - } catch (ex) { - return null; - } - }, - - async getAllFavicons(logins) { - let favicons = await Promise.all( - logins.map(login => this.getFavicon(login)) - ); - let vanillaFavicons = {}; - for (let favicon of favicons) { - if (!favicon) { - continue; - } - try { - vanillaFavicons[favicon.title] = { - data: favicon.faviconData.data, - dataLen: favicon.faviconData.dataLen, - mimeType: favicon.faviconData.mimeType, - }; - } catch (ex) {} - } - return vanillaFavicons; - }, - showMasterPasswordLoginNotifications() { this.showNotifications({ id: MASTER_PASSWORD_NOTIFICATION_ID, diff --git a/browser/components/aboutlogins/content/aboutLogins.html b/browser/components/aboutlogins/content/aboutLogins.html index aaf1e1b55b59..e45dbe24777e 100644 --- a/browser/components/aboutlogins/content/aboutLogins.html +++ b/browser/components/aboutlogins/content/aboutLogins.html @@ -90,11 +90,8 @@ @@ -107,7 +104,6 @@
-

diff --git a/browser/components/aboutlogins/content/aboutLogins.js b/browser/components/aboutlogins/content/aboutLogins.js index 946d98973d46..f171f0d8ab49 100644 --- a/browser/components/aboutlogins/content/aboutLogins.js +++ b/browser/components/aboutlogins/content/aboutLogins.js @@ -47,10 +47,6 @@ window.addEventListener("AboutLoginsChromeToContent", event => { gElements.loginItem.loginRemoved(event.detail.value); break; } - case "SendFavicons": { - gElements.loginList.addFavicons(event.detail.value); - break; - } case "SyncState": { gElements.fxAccountsButton.updateState(event.detail.value); break; diff --git a/browser/components/aboutlogins/content/components/login-item.css b/browser/components/aboutlogins/content/components/login-item.css index 82949677f5bc..730e05ee569a 100644 --- a/browser/components/aboutlogins/content/components/login-item.css +++ b/browser/components/aboutlogins/content/components/login-item.css @@ -41,7 +41,6 @@ .header { display: flex; - align-items: center; border-bottom: 1px solid var(--in-content-box-border-color); margin-bottom: 40px; } @@ -191,11 +190,6 @@ box-shadow: 0 0 0 4px var(--in-content-border-active-shadow); } -.login-item-favicon { - width: 38px; - margin-right: 12px; -} - .breach-alert { border-radius: 8px; border: 1px solid var(--in-content-border-color); diff --git a/browser/components/aboutlogins/content/components/login-item.js b/browser/components/aboutlogins/content/components/login-item.js index fd5ded9cacb4..93d13f7aad08 100644 --- a/browser/components/aboutlogins/content/components/login-item.js +++ b/browser/components/aboutlogins/content/components/login-item.js @@ -54,7 +54,6 @@ export default class LoginItem extends HTMLElement { this._saveChangesButton = this.shadowRoot.querySelector( ".save-changes-button" ); - this._favicon = this.shadowRoot.querySelector(".login-item-favicon"); this._title = this.shadowRoot.querySelector(".login-item-title"); this._timeCreated = this.shadowRoot.querySelector(".time-created"); this._timeChanged = this.shadowRoot.querySelector(".time-changed"); @@ -75,7 +74,6 @@ export default class LoginItem extends HTMLElement { this._revealCheckbox.addEventListener("click", this); window.addEventListener("AboutLoginsCreateLogin", this); window.addEventListener("AboutLoginsInitialLoginSelected", this); - window.addEventListener("AboutLoginsLoadInitialFavicon", this); window.addEventListener("AboutLoginsLoginSelected", this); } @@ -99,17 +97,6 @@ export default class LoginItem extends HTMLElement { timeUsed: this._login.timeLastUsed || "", }); - if (this._login.faviconDataURI) { - this._favicon.src = this._login.faviconDataURI; - document.l10n.setAttributes(this._favicon, "login-favicon", { - title: this._login.title, - }); - } else { - // reset the src and alt attributes if the currently selected favicon doesn't have a favicon - this._favicon.src = "chrome://mozapps/skin/places/defaultFavicon.svg"; - this._favicon.alt = ""; - } - this._title.textContent = this._login.title; this._originInput.defaultValue = this._login.origin || ""; this._usernameInput.defaultValue = this._login.username || ""; @@ -138,10 +125,6 @@ export default class LoginItem extends HTMLElement { this.setLogin(event.detail, { skipFocusChange: true }); break; } - case "AboutLoginsLoadInitialFavicon": { - this.setLogin(event.detail, { skipFocusChange: true }); - break; - } case "AboutLoginsLoginSelected": { this.setLogin(event.detail); break; diff --git a/browser/components/aboutlogins/content/components/login-list-item.js b/browser/components/aboutlogins/content/components/login-list-item.js index 2f3f627f4876..a8532861eac0 100644 --- a/browser/components/aboutlogins/content/components/login-list-item.js +++ b/browser/components/aboutlogins/content/components/login-list-item.js @@ -17,7 +17,7 @@ export default class LoginListItemFactory { let listItem = loginListItem.querySelector("li"); let title = loginListItem.querySelector(".title"); let username = loginListItem.querySelector(".username"); - let favicon = loginListItem.querySelector(".favicon"); + listItem.setAttribute("role", "option"); if (!login.guid) { @@ -45,13 +45,6 @@ export default class LoginListItemFactory { ); } - if (login.faviconDataURI) { - favicon.src = login.faviconDataURI; - document.l10n.setAttributes(favicon, "login-favicon", { - title: login.title, - }); - } - return listItem; } } diff --git a/browser/components/aboutlogins/content/components/login-list.css b/browser/components/aboutlogins/content/components/login-list.css index b0a80ac9f7b4..642c7a9a3da4 100644 --- a/browser/components/aboutlogins/content/components/login-list.css +++ b/browser/components/aboutlogins/content/components/login-list.css @@ -53,8 +53,7 @@ ol { } .login-list-item { - display: flex; - align-items: center; + display: block; padding: 10px; padding-inline-end: 18px; padding-inline-start: 14px; @@ -92,11 +91,6 @@ ol { overflow: hidden; } -.favicon { - width: 16px; - margin-right: 14px; -} - .username { font-size: 0.85em; color: var(--in-content-deemphasized-text); diff --git a/browser/components/aboutlogins/content/components/login-list.js b/browser/components/aboutlogins/content/components/login-list.js index 1b55e6bfca8c..c76c21a2fd27 100644 --- a/browser/components/aboutlogins/content/components/login-list.js +++ b/browser/components/aboutlogins/content/components/login-list.js @@ -217,33 +217,6 @@ export default class LoginList extends HTMLElement { } } - addFavicons(favicons) { - for (let login of this._logins) { - const favicon = favicons[login.title]; - if (favicon && login.title) { - favicon.uri = btoa( - new Uint8Array(favicon.data).reduce( - (data, byte) => data + String.fromCharCode(byte), - "" - ) - ); - let faviconDataURI = `data:${favicon.mimeType};base64,${favicon.uri}`; - login.faviconDataURI = faviconDataURI; - } - } - let selectedListItem = this._list.querySelector( - ".login-list-item.selected" - ); - if (selectedListItem) { - window.dispatchEvent( - new CustomEvent("AboutLoginsLoadInitialFavicon", { - detail: selectedListItem._login, - }) - ); - } - this.render(); - } - /** * @param {Map} breachesByLoginGUID A Map of breaches by login GUIDs used for displaying breached login indicators. */ diff --git a/browser/locales/en-US/browser/aboutLogins.ftl b/browser/locales/en-US/browser/aboutLogins.ftl index 601537fee09d..2d8bfbb5e4b1 100644 --- a/browser/locales/en-US/browser/aboutLogins.ftl +++ b/browser/locales/en-US/browser/aboutLogins.ftl @@ -9,12 +9,6 @@ login-filter = create-login-button = Create New Login -# This string is used as alternative text for favicon images. -# Variables: -# $title (String) - The title of the website associated with the favicon. -login-favicon = - .alt = Favicon for { $title } - fxaccounts-sign-in-text = Get your passwords on your other devices fxaccounts-sign-in-button = Sign in to { -sync-brand-short-name }