Backed out 2 changesets (bug 1717486, bug 1718713) for causng eslint failures. CLOSED TREE

Backed out changeset 57c50b132961 (bug 1718713)
Backed out changeset 00b064dbf950 (bug 1717486)
This commit is contained in:
Sandor Molnar 2021-07-15 22:07:54 +03:00
Родитель ddbe972bac
Коммит e1f7148a90
9 изменённых файлов: 2 добавлений и 73 удалений

Просмотреть файл

@ -106,7 +106,6 @@
Services.scriptloader.loadSubScript("chrome://browser/content/places/places-menupopup.js", this);
Services.scriptloader.loadSubScript("chrome://browser/content/search/autocomplete-popup.js", this);
Services.scriptloader.loadSubScript("chrome://browser/content/search/searchbar.js", this);
Services.scriptloader.loadSubScript("chrome://browser/content/screenshots/screenshots.js", this);
window.onload = gBrowserInit.onLoad.bind(gBrowserInit);
window.onunload = gBrowserInit.onUnload.bind(gBrowserInit);

Просмотреть файл

@ -1291,9 +1291,7 @@ class nsContextMenu {
}
takeScreenshot() {
if (SCREENSHOT_BROWSER_COMPONENT) {
Services.obs.notifyObservers(window, "menuitem-screenshot", true);
} else {
if (!SCREENSHOT_BROWSER_COMPONENT) {
Services.obs.notifyObservers(null, "menuitem-screenshot-extension", true);
}
}

Просмотреть файл

@ -77,7 +77,6 @@ XPCOMUtils.defineLazyModuleGetters(this, {
SafeBrowsing: "resource://gre/modules/SafeBrowsing.jsm",
Sanitizer: "resource:///modules/Sanitizer.jsm",
SaveToPocket: "chrome://pocket/content/SaveToPocket.jsm",
ScreenshotsUtils: "resource:///modules/ScreenshotsUtils.jsm",
SearchSERPTelemetry: "resource:///modules/SearchSERPTelemetry.jsm",
SessionStartup: "resource:///modules/sessionstore/SessionStartup.jsm",
SessionStore: "resource:///modules/sessionstore/SessionStore.jsm",
@ -2396,14 +2395,6 @@ BrowserGlue.prototype = {
},
},
{
task: () => {
if(Services.prefs.getBoolPref("screenshots.browser.component.enabled")) {
ScreenshotsUtils.initialize();
}
},
},
{
task: () => {
UrlbarQuickSuggest.maybeShowOnboardingDialog();

Просмотреть файл

@ -483,9 +483,7 @@ if (!screenshotsDisabled) {
id: "screenshot-button",
l10nId: "screenshot-toolbarbutton",
onCommand(aEvent) {
if (SCREENSHOT_BROWSER_COMPONENT) {
Services.obs.notifyObservers(window, "menuitem-screenshot");
} else {
if (!SCREENSHOT_BROWSER_COMPONENT) {
Services.obs.notifyObservers(null, "menuitem-screenshot-extension");
}
},

Просмотреть файл

@ -48,7 +48,6 @@ DIRS += [
"protections",
"protocolhandler",
"resistfingerprinting",
"screenshots",
"search",
"sessionstore",
"shell",

Просмотреть файл

@ -1,19 +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/. */
"use strict";
var EXPORTED_SYMBOLS = ["ScreenshotsUtils"];
const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
var ScreenshotsUtils = {
initialize() {
Services.obs.addObserver(this, "menuitem-screenshot");
},
observe(subj, topic, data) {
let document = subj.document;
document.createXULElement("screenshots-div");
},
};

Просмотреть файл

@ -1,17 +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/. */
"use strict";
class ScreenshotsUI extends MozXULElement {
constructor() {
super();
}
get markup() {
return `
`;
}
}
customElements.define("screenshots-div", ScreenshotsUI);

Просмотреть файл

@ -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/.
browser.jar:
content/browser/screenshots/screenshots.js (content/screenshots.js)

Просмотреть файл

@ -1,14 +0,0 @@
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# 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/.
EXTRA_JS_MODULES += [
"ScreenshotsUtils.jsm",
]
JAR_MANIFESTS += ["jar.mn"]
with Files("**"):
BUG_COMPONENT = ("Firefox", "Screenshots")