Bug 1719492 - Migrates screenshot icons into the browser/component/screenshots directory. r=emalysz

Differential Revision: https://phabricator.services.mozilla.com/D119540
This commit is contained in:
Kajal Sah 2021-07-20 14:49:00 +00:00
parent 4cfda87a78
commit e450fdda18
14 changed files with 23 additions and 38 deletions

View File

Before

Width:  |  Height:  |  Size: 508 B

After

Width:  |  Height:  |  Size: 508 B

View File

Before

Width:  |  Height:  |  Size: 627 B

After

Width:  |  Height:  |  Size: 627 B

View File

Before

Width:  |  Height:  |  Size: 590 B

After

Width:  |  Height:  |  Size: 590 B

View File

Before

Width:  |  Height:  |  Size: 555 B

After

Width:  |  Height:  |  Size: 555 B

View File

Before

Width:  |  Height:  |  Size: 558 B

After

Width:  |  Height:  |  Size: 558 B

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 979 B

After

Width:  |  Height:  |  Size: 979 B

View File

@ -3,4 +3,12 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
browser.jar:
content/browser/screenshots/screenshots.js (content/screenshots.js)
content/browser/screenshots/cancel.svg (content/cancel.svg)
content/browser/screenshots/copied-notification.svg (content/copied-notification.svg)
content/browser/screenshots/copy.svg (content/copy.svg)
content/browser/screenshots/download-white.svg (content/download-white.svg)
content/browser/screenshots/download.svg (content/download.svg)
content/browser/screenshots/icon-welcome-face-without-eyes.svg (content/icon-welcome-face-without-eyes.svg)
content/browser/screenshots/menu-fullpage.svg (content/menu-fullpage.svg)
content/browser/screenshots/menu-visible.svg (content/menu-visible.svg)
content/browser/screenshots/screenshots.js (content/screenshots.js)

View File

@ -170,7 +170,7 @@ this.main = (function() {
]);
return browser.notifications.create(id, {
type: "basic",
iconUrl: "../icons/copied-notification.svg",
iconUrl: "chrome://browser/content/screenshots/copied-notification.svg",
title,
message,
});
@ -209,7 +209,7 @@ this.main = (function() {
catcher.watchPromise(incrementCount("copy"));
return browser.notifications.create({
type: "basic",
iconUrl: "../icons/copied-notification.svg",
iconUrl: "chrome://browser/content/screenshots/copied-notification.svg",
title,
message,
});

View File

@ -73,7 +73,7 @@ window.inlineSelectionCss = `
margin-inline-end: 10px;
transition: background-color 150ms cubic-bezier(0.07, 0.95, 0, 1); }
.button.download, .download.highlight-button-cancel, .download.highlight-button-download, .download.highlight-button-copy {
background-image: url("../img/icon-download.svg"); }
background-image: url("chrome://browser/content/screenshots/download.svg"); }
.button.download:hover, .download.highlight-button-cancel:hover, .download.highlight-button-download:hover, .download.highlight-button-copy:hover {
background-color: #ededf0; }
.button.download:active, .download.highlight-button-cancel:active, .download.highlight-button-download:active, .download.highlight-button-copy:active {
@ -544,7 +544,7 @@ window.inlineSelectionCss = `
width: 62.4px;
height: 62.4px;
display: block;
background-image: url("MOZ_EXTENSION/icons/icon-welcome-face-without-eyes.svg"); }
background-image: url("chrome://browser/content/screenshots/icon-welcome-face-without-eyes.svg"); }
.eye {
background-color: #fff;
@ -644,9 +644,9 @@ window.inlineSelectionCss = `
background-color: #dedede;
border: 1px solid #989898; }
.all-buttons-container .full-page {
background-image: url("MOZ_EXTENSION/icons/menu-fullpage.svg"); }
background-image: url("chrome://browser/content/screenshots/menu-fullpage.svg"); }
.all-buttons-container .visible {
background-image: url("MOZ_EXTENSION/icons/menu-visible.svg"); }
background-image: url("chrome://browser/content/screenshots/menu-visible.svg"); }
@keyframes pulse {
0% {

View File

@ -38,14 +38,7 @@
}
],
"web_accessible_resources": [
"blank.html",
"icons/cancel.svg",
"icons/download.svg",
"icons/copy.svg",
"icons/icon-256.png",
"icons/menu-fullpage.svg",
"icons/menu-visible.svg",
"icons/icon-welcome-face-without-eyes.svg"
"blank.html"
],
"permissions": [
"activeTab",

View File

@ -49,17 +49,6 @@ FINAL_TARGET_FILES.features["screenshots@mozilla.org"]["experiments"][
"screenshots"
] += ["experiments/screenshots/api.js", "experiments/screenshots/schema.json"]
FINAL_TARGET_FILES.features["screenshots@mozilla.org"]["icons"] += [
"icons/cancel.svg",
"icons/copied-notification.svg",
"icons/copy.svg",
"icons/download-white.svg",
"icons/download.svg",
"icons/icon-welcome-face-without-eyes.svg",
"icons/menu-fullpage.svg",
"icons/menu-visible.svg",
]
FINAL_TARGET_FILES.features["screenshots@mozilla.org"]["selector"] += [
"selector/callBackground.js",
"selector/documentMetadata.js",

View File

@ -411,20 +411,14 @@ this.ui = (function() {
<div class="preview-image">
<div class="preview-buttons">
<button class="highlight-button-cancel" title="${cancelTitle}">
<img src="${browser.runtime.getURL(
"icons/cancel.svg"
)}" />
<img src="chrome://browser/content/screenshots/cancel.svg"/>
</button>
<button class="highlight-button-copy" title="${copyTitle}">
<img src="${browser.runtime.getURL(
"icons/copy.svg"
)}" />
<img src="chrome://browser/content/screenshots/copy.svg"/>
<span data-l10n-id="screenshots-copy-button"/>
</button>
<button class="highlight-button-download" title="${downloadTitle}">
<img src="${browser.runtime.getURL(
"icons/download-white.svg"
)}" />
<img src="chrome://browser/content/screenshots/download-white.svg"/>
<span data-l10n-id="screenshots-download-button"/>
</button>
</div>
@ -731,7 +725,7 @@ this.ui = (function() {
const buttons = makeEl("div", "highlight-buttons");
const cancel = makeEl("button", "highlight-button-cancel");
const cancelImg = makeEl("img");
cancelImg.src = browser.runtime.getURL("icons/cancel.svg");
cancelImg.src = "chrome://browser/content/screenshots/cancel.svg";
cancel.title = cancelTitle;
cancel.appendChild(cancelImg);
buttons.appendChild(cancel);
@ -741,14 +735,15 @@ this.ui = (function() {
const copyImg = makeEl("img");
const copyString = makeEl("span");
copyString.textContent = copyText;
copyImg.src = browser.runtime.getURL("icons/copy.svg");
copyImg.src = "chrome://browser/content/screenshots/copy.svg";
copy.appendChild(copyImg);
copy.appendChild(copyString);
buttons.appendChild(copy);
const download = makeEl("button", "highlight-button-download");
const downloadImg = makeEl("img");
downloadImg.src = browser.runtime.getURL("icons/download-white.svg");
downloadImg.src =
"chrome://browser/content/screenshots/download-white.svg";
download.appendChild(downloadImg);
download.append(downloadText);
download.title = downloadTitle;