Bug 1708008 - Remove browser's extension icon, always use extensionGeneric as default extension icon. r=mixedpuppy

Differential Revision: https://phabricator.services.mozilla.com/D119931
This commit is contained in:
Sam Foster 2021-07-19 16:58:11 +00:00
parent 2bf658dd41
commit 3834704712
10 changed files with 9 additions and 25 deletions

View File

@ -186,13 +186,7 @@ function triggerPageOptionsAction(win, action) {
}
function isDefaultIcon(icon) {
// These are basically the same icon, but code within webextensions
// generates references to the former and generic add-ons manager code
// generates referces to the latter.
return (
icon == "chrome://browser/content/extension.svg" ||
icon == "chrome://mozapps/skin/extensions/extensionGeneric.svg"
);
return icon == "chrome://mozapps/skin/extensions/extensionGeneric.svg";
}
/**

View File

@ -1,6 +0,0 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- 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/. -->
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16" fill="context-fill" fill-opacity="context-fill-opacity">
<path d="M2.6 8 4 8c1.103 0 2 .897 2 2s-.897 2-2 2l-1.4 0-.6.6 0 1.775C2 15.271 2.729 16 3.625 16l9.75 0c.896 0 1.625-.729 1.625-1.625l0-8.75C15 4.729 14.271 4 13.375 4L11 4l0-2c0-1.103-.897-2-2-2S7 .897 7 2l0 2-3.375 0C2.729 4 2 4.729 2 5.625L2 7.4l.6.6z"/>
</svg>

Before

Width:  |  Height:  |  Size: 620 B

View File

@ -14,7 +14,6 @@ browser.jar:
#ifdef XP_WIN
content/browser/extension-win-panel.css
#endif
content/browser/extension.svg
content/browser/ext-browser.json
content/browser/parent/ext-bookmarks.js (parent/ext-bookmarks.js)
content/browser/parent/ext-browser.js (parent/ext-browser.js)

View File

@ -591,7 +591,7 @@ add_task(async function testPropertyRemoval() {
},
getTests: function(tabs, windows) {
let defaultIcon = "chrome://browser/content/extension.svg";
let defaultIcon = "chrome://mozapps/skin/extensions/extensionGeneric.svg";
let details = [
{
icon: browser.runtime.getURL("default.png"),

View File

@ -365,7 +365,7 @@ add_task(async function testDetailsObjects() {
await promiseAnimationFrame();
// The initial icon should be the default icon since no icon is in the manifest.
const DEFAULT_ICON = "chrome://browser/content/extension.svg";
const DEFAULT_ICON = "chrome://mozapps/skin/extensions/extensionGeneric.svg";
let browserActionButton = browserActionWidget.forWindow(window).node;
let pageActionImage = document.getElementById(pageActionId);
is(

View File

@ -51,7 +51,7 @@ add_task(async function testTabSwitchContext() {
},
getTests: function(tabs) {
let defaultIcon = "chrome://browser/content/extension.svg";
let defaultIcon = "chrome://mozapps/skin/extensions/extensionGeneric.svg";
let details = [
{
icon: browser.runtime.getURL("default.png"),

View File

@ -431,7 +431,7 @@ add_task(async function testPropertyRemoval() {
},
getTests: function(tabs, windows) {
let defaultIcon = "chrome://browser/content/extension.svg";
let defaultIcon = "chrome://mozapps/skin/extensions/extensionGeneric.svg";
let details = [
{
icon: browser.runtime.getURL("default.png"),

View File

@ -107,10 +107,7 @@ browser/chrome/browser/search-extensions/yandex/yandex-en.ico
browser/chrome/browser/content/activity-stream/data/content/tippytop/favicons/yandex-ru.png
browser/chrome/browser/search-extensions/yandex/yandex-ru.ico
# Bug 1708008 - De-duplicate extension icons
browser/chrome/browser/content/browser/extension.svg
chrome/toolkit/skin/classic/mozapps/extensions/extension.svg
chrome/toolkit/skin/classic/mozapps/extensions/extensionGeneric.svg
# Bug 1720584 - De-duplicate theme and customize icons
chrome/toolkit/skin/classic/mozapps/extensions/themeGeneric.svg
browser/chrome/browser/skin/classic/browser/customize.svg

View File

@ -324,7 +324,7 @@
}
.popup-notification-icon[popupid="addon-install-confirmation"] {
list-style-image: url(chrome://browser/content/extension.svg);
list-style-image: url(chrome://mozapps/skin/extensions/extension.svg);
}
#addon-install-confirmation-notification[warning] .popup-notification-icon[popupid="addon-install-confirmation"] {

View File

@ -1542,7 +1542,7 @@ function watchExtensionProxyContextLoad(
// Manages icon details for toolbar buttons in the |pageAction| and
// |browserAction| APIs.
let IconDetails = {
DEFAULT_ICON: "chrome://browser/content/extension.svg",
DEFAULT_ICON: "chrome://mozapps/skin/extensions/extensionGeneric.svg",
// WeakMap<Extension -> Map<url-string -> Map<iconType-string -> object>>>
iconCache: new DefaultWeakMap(() => {
@ -1662,7 +1662,7 @@ let IconDetails = {
// Returns the appropriate icon URL for the given icons object and the
// screen resolution of the given window.
getPreferredIcon(icons, extension = null, size = 16) {
const DEFAULT = "chrome://browser/content/extension.svg";
const DEFAULT = "chrome://mozapps/skin/extensions/extensionGeneric.svg";
let bestSize = null;
if (icons[size]) {