Bug 1346825 - Setup build configuration for Firefox Screenshots in Firefox (and disable screenshots by default). r=gps,Mossop a=gchang
☠☠ backed out by 521748d0ac61 ☠ ☠
authorMark Banner <standard8@mozilla.com>
Fri, 10 Mar 2017 12:34:54 +0000
changeset 395966 1f725447ad6ccba41cad2d68a374d97c1c04f218
parent 395965 c20134405d1422d16c383c25439770eb61204810
child 395967 2cfe80d52035722bc820d8ff3ff33b1ad6f6ef13
push id1468
push userasasaki@mozilla.com
push dateMon, 05 Jun 2017 19:31:07 +0000
treeherdermozilla-release@0641fc6ee9d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgps, Mossop, gchang
bugs1346825
milestone54.0
Bug 1346825 - Setup build configuration for Firefox Screenshots in Firefox (and disable screenshots by default). r=gps,Mossop a=gchang Screenshots is a system add-on imported from https://github.com/mozilla-services/screenshots/. This is the initial build system patch for building screenshots. ESLint is ignored since Screenshots currently use their own version (this may change in the future). MozReview-Commit-ID: 4OEcaduaeWE
.eslintignore
.gitignore
browser/app/profile/firefox.js
browser/extensions/moz.build
browser/extensions/screenshots/moz.build
testing/profiles/prefs_general.js
--- a/.eslintignore
+++ b/.eslintignore
@@ -60,16 +60,18 @@ browser/base/content/sanitizeDialog.js
 browser/base/content/test/general/file_csp_block_all_mixedcontent.html
 browser/base/content/test/urlbar/file_blank_but_not_blank.html
 browser/base/content/newtab/**
 browser/components/downloads/**
 browser/components/sessionstore/**
 browser/components/tabview/**
 # generated & special files in cld2
 browser/components/translation/cld2/**
+# Screenshots is imported as a system add-on and has its own lint rules currently.
+browser/extensions/screenshots/**
 browser/extensions/pdfjs/content/build**
 browser/extensions/pdfjs/content/web**
 # generated or library files in pocket
 browser/extensions/pocket/content/panels/js/tmpl.js
 browser/extensions/pocket/content/panels/js/vendor/**
 browser/locales/**
 # imported from chromium
 browser/extensions/mortar/**
--- a/.gitignore
+++ b/.gitignore
@@ -2,16 +2,17 @@
 
 # Filenames that should be ignored wherever they appear
 *~
 *.pyc
 *.pyo
 TAGS
 tags
 ID
+!/browser/extensions/screenshots/webextension/_locales/id/
 .DS_Store*
 *.pdb
 *.egg-info
 
 # Vim swap files.
 .*.sw[a-z]
 
 # Emacs directory variable files.
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -56,16 +56,19 @@ pref("extensions.update.autoUpdateDefaul
 pref("extensions.hotfix.id", "firefox-hotfix@mozilla.org");
 pref("extensions.hotfix.cert.checkAttributes", true);
 pref("extensions.hotfix.certs.1.sha1Fingerprint", "91:53:98:0C:C1:86:DF:47:8F:35:22:9E:11:C9:A7:31:04:49:A1:AA");
 pref("extensions.hotfix.certs.2.sha1Fingerprint", "39:E7:2B:7A:5B:CF:37:78:F9:5D:4A:E0:53:2D:2F:3D:68:53:C5:60");
 
 // Check AUS for system add-on updates.
 pref("extensions.systemAddon.update.url", "https://aus5.mozilla.org/update/3/SystemAddons/%VERSION%/%BUILD_ID%/%BUILD_TARGET%/%LOCALE%/%CHANNEL%/%OS_VERSION%/%DISTRIBUTION%/%DISTRIBUTION_VERSION%/update.xml");
 
+// Disable screenshots for now, Shield will enable this.
+pref("extensions.screenshots.system-disabled", true);
+
 // Disable add-ons that are not installed by the user in all scopes by default.
 // See the SCOPE constants in AddonManager.jsm for values to use here.
 pref("extensions.autoDisableScopes", 15);
 
 // Add-on content security policies.
 pref("extensions.webextensions.base-content-security-policy", "script-src 'self' https://* moz-extension: blob: filesystem: 'unsafe-eval' 'unsafe-inline'; object-src 'self' https://* moz-extension: blob: filesystem:;");
 pref("extensions.webextensions.default-content-security-policy", "script-src 'self'; object-src 'self';");
 
--- a/browser/extensions/moz.build
+++ b/browser/extensions/moz.build
@@ -4,16 +4,17 @@
 # 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/.
 
 DIRS += [
     'aushelper',
     'e10srollout',
     'pdfjs',
     'pocket',
+    'screenshots',
     'webcompat',
 ]
 
 # Only include the following system add-ons if building Aurora or Nightly
 if not CONFIG['RELEASE_OR_BETA']:
     DIRS += [
         'flyweb',
         'formautofill',
new file mode 100644
--- /dev/null
+++ b/browser/extensions/screenshots/moz.build
@@ -0,0 +1,306 @@
+# -*- 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/.
+
+FINAL_TARGET_FILES.features['screenshots@mozilla.org'] += [
+  'bootstrap.js',
+  'install.rdf'
+]
+
+# This file list is automatically generated by Screenshots' export scripts.
+# AUTOMATIC INSERTION START
+FINAL_TARGET_FILES.features['screenshots@mozilla.org']["webextension"] += [
+  'webextension/assertIsTrusted.js',
+  'webextension/catcher.js',
+  'webextension/clipboard.js',
+  'webextension/domainFromUrl.js',
+  'webextension/makeUuid.js',
+  'webextension/manifest.json',
+  'webextension/randomString.js',
+  'webextension/sitehelper.js'
+]
+
+FINAL_TARGET_FILES.features['screenshots@mozilla.org']["webextension"]["_locales"]["ach"] += [
+  'webextension/_locales/ach/messages.json'
+]
+
+FINAL_TARGET_FILES.features['screenshots@mozilla.org']["webextension"]["_locales"]["be"] += [
+  'webextension/_locales/be/messages.json'
+]
+
+FINAL_TARGET_FILES.features['screenshots@mozilla.org']["webextension"]["_locales"]["bg"] += [
+  'webextension/_locales/bg/messages.json'
+]
+
+FINAL_TARGET_FILES.features['screenshots@mozilla.org']["webextension"]["_locales"]["bn_BD"] += [
+  'webextension/_locales/bn_BD/messages.json'
+]
+
+FINAL_TARGET_FILES.features['screenshots@mozilla.org']["webextension"]["_locales"]["cs"] += [
+  'webextension/_locales/cs/messages.json'
+]
+
+FINAL_TARGET_FILES.features['screenshots@mozilla.org']["webextension"]["_locales"]["de"] += [
+  'webextension/_locales/de/messages.json'
+]
+
+FINAL_TARGET_FILES.features['screenshots@mozilla.org']["webextension"]["_locales"]["dsb"] += [
+  'webextension/_locales/dsb/messages.json'
+]
+
+FINAL_TARGET_FILES.features['screenshots@mozilla.org']["webextension"]["_locales"]["el"] += [
+  'webextension/_locales/el/messages.json'
+]
+
+FINAL_TARGET_FILES.features['screenshots@mozilla.org']["webextension"]["_locales"]["en_GB"] += [
+  'webextension/_locales/en_GB/messages.json'
+]
+
+FINAL_TARGET_FILES.features['screenshots@mozilla.org']["webextension"]["_locales"]["en_US"] += [
+  'webextension/_locales/en_US/messages.json'
+]
+
+FINAL_TARGET_FILES.features['screenshots@mozilla.org']["webextension"]["_locales"]["es_AR"] += [
+  'webextension/_locales/es_AR/messages.json'
+]
+
+FINAL_TARGET_FILES.features['screenshots@mozilla.org']["webextension"]["_locales"]["es_CL"] += [
+  'webextension/_locales/es_CL/messages.json'
+]
+
+FINAL_TARGET_FILES.features['screenshots@mozilla.org']["webextension"]["_locales"]["es_ES"] += [
+  'webextension/_locales/es_ES/messages.json'
+]
+
+FINAL_TARGET_FILES.features['screenshots@mozilla.org']["webextension"]["_locales"]["es_MX"] += [
+  'webextension/_locales/es_MX/messages.json'
+]
+
+FINAL_TARGET_FILES.features['screenshots@mozilla.org']["webextension"]["_locales"]["et"] += [
+  'webextension/_locales/et/messages.json'
+]
+
+FINAL_TARGET_FILES.features['screenshots@mozilla.org']["webextension"]["_locales"]["fa"] += [
+  'webextension/_locales/fa/messages.json'
+]
+
+FINAL_TARGET_FILES.features['screenshots@mozilla.org']["webextension"]["_locales"]["fr"] += [
+  'webextension/_locales/fr/messages.json'
+]
+
+FINAL_TARGET_FILES.features['screenshots@mozilla.org']["webextension"]["_locales"]["fy_NL"] += [
+  'webextension/_locales/fy_NL/messages.json'
+]
+
+FINAL_TARGET_FILES.features['screenshots@mozilla.org']["webextension"]["_locales"]["gu_IN"] += [
+  'webextension/_locales/gu_IN/messages.json'
+]
+
+FINAL_TARGET_FILES.features['screenshots@mozilla.org']["webextension"]["_locales"]["he"] += [
+  'webextension/_locales/he/messages.json'
+]
+
+FINAL_TARGET_FILES.features['screenshots@mozilla.org']["webextension"]["_locales"]["hsb"] += [
+  'webextension/_locales/hsb/messages.json'
+]
+
+FINAL_TARGET_FILES.features['screenshots@mozilla.org']["webextension"]["_locales"]["hu"] += [
+  'webextension/_locales/hu/messages.json'
+]
+
+FINAL_TARGET_FILES.features['screenshots@mozilla.org']["webextension"]["_locales"]["hy_AM"] += [
+  'webextension/_locales/hy_AM/messages.json'
+]
+
+FINAL_TARGET_FILES.features['screenshots@mozilla.org']["webextension"]["_locales"]["id"] += [
+  'webextension/_locales/id/messages.json'
+]
+
+FINAL_TARGET_FILES.features['screenshots@mozilla.org']["webextension"]["_locales"]["it"] += [
+  'webextension/_locales/it/messages.json'
+]
+
+FINAL_TARGET_FILES.features['screenshots@mozilla.org']["webextension"]["_locales"]["ja"] += [
+  'webextension/_locales/ja/messages.json'
+]
+
+FINAL_TARGET_FILES.features['screenshots@mozilla.org']["webextension"]["_locales"]["kab"] += [
+  'webextension/_locales/kab/messages.json'
+]
+
+FINAL_TARGET_FILES.features['screenshots@mozilla.org']["webextension"]["_locales"]["kk"] += [
+  'webextension/_locales/kk/messages.json'
+]
+
+FINAL_TARGET_FILES.features['screenshots@mozilla.org']["webextension"]["_locales"]["ko"] += [
+  'webextension/_locales/ko/messages.json'
+]
+
+FINAL_TARGET_FILES.features['screenshots@mozilla.org']["webextension"]["_locales"]["lij"] += [
+  'webextension/_locales/lij/messages.json'
+]
+
+FINAL_TARGET_FILES.features['screenshots@mozilla.org']["webextension"]["_locales"]["lo"] += [
+  'webextension/_locales/lo/messages.json'
+]
+
+FINAL_TARGET_FILES.features['screenshots@mozilla.org']["webextension"]["_locales"]["lt"] += [
+  'webextension/_locales/lt/messages.json'
+]
+
+FINAL_TARGET_FILES.features['screenshots@mozilla.org']["webextension"]["_locales"]["ms"] += [
+  'webextension/_locales/ms/messages.json'
+]
+
+FINAL_TARGET_FILES.features['screenshots@mozilla.org']["webextension"]["_locales"]["nb_NO"] += [
+  'webextension/_locales/nb_NO/messages.json'
+]
+
+FINAL_TARGET_FILES.features['screenshots@mozilla.org']["webextension"]["_locales"]["nl"] += [
+  'webextension/_locales/nl/messages.json'
+]
+
+FINAL_TARGET_FILES.features['screenshots@mozilla.org']["webextension"]["_locales"]["nn_NO"] += [
+  'webextension/_locales/nn_NO/messages.json'
+]
+
+FINAL_TARGET_FILES.features['screenshots@mozilla.org']["webextension"]["_locales"]["pa_IN"] += [
+  'webextension/_locales/pa_IN/messages.json'
+]
+
+FINAL_TARGET_FILES.features['screenshots@mozilla.org']["webextension"]["_locales"]["pl"] += [
+  'webextension/_locales/pl/messages.json'
+]
+
+FINAL_TARGET_FILES.features['screenshots@mozilla.org']["webextension"]["_locales"]["pt_BR"] += [
+  'webextension/_locales/pt_BR/messages.json'
+]
+
+FINAL_TARGET_FILES.features['screenshots@mozilla.org']["webextension"]["_locales"]["pt_PT"] += [
+  'webextension/_locales/pt_PT/messages.json'
+]
+
+FINAL_TARGET_FILES.features['screenshots@mozilla.org']["webextension"]["_locales"]["rm"] += [
+  'webextension/_locales/rm/messages.json'
+]
+
+FINAL_TARGET_FILES.features['screenshots@mozilla.org']["webextension"]["_locales"]["ru"] += [
+  'webextension/_locales/ru/messages.json'
+]
+
+FINAL_TARGET_FILES.features['screenshots@mozilla.org']["webextension"]["_locales"]["sk"] += [
+  'webextension/_locales/sk/messages.json'
+]
+
+FINAL_TARGET_FILES.features['screenshots@mozilla.org']["webextension"]["_locales"]["sl"] += [
+  'webextension/_locales/sl/messages.json'
+]
+
+FINAL_TARGET_FILES.features['screenshots@mozilla.org']["webextension"]["_locales"]["sq"] += [
+  'webextension/_locales/sq/messages.json'
+]
+
+FINAL_TARGET_FILES.features['screenshots@mozilla.org']["webextension"]["_locales"]["sr"] += [
+  'webextension/_locales/sr/messages.json'
+]
+
+FINAL_TARGET_FILES.features['screenshots@mozilla.org']["webextension"]["_locales"]["sv_SE"] += [
+  'webextension/_locales/sv_SE/messages.json'
+]
+
+FINAL_TARGET_FILES.features['screenshots@mozilla.org']["webextension"]["_locales"]["th"] += [
+  'webextension/_locales/th/messages.json'
+]
+
+FINAL_TARGET_FILES.features['screenshots@mozilla.org']["webextension"]["_locales"]["tl"] += [
+  'webextension/_locales/tl/messages.json'
+]
+
+FINAL_TARGET_FILES.features['screenshots@mozilla.org']["webextension"]["_locales"]["tr"] += [
+  'webextension/_locales/tr/messages.json'
+]
+
+FINAL_TARGET_FILES.features['screenshots@mozilla.org']["webextension"]["_locales"]["uk"] += [
+  'webextension/_locales/uk/messages.json'
+]
+
+FINAL_TARGET_FILES.features['screenshots@mozilla.org']["webextension"]["_locales"]["ur"] += [
+  'webextension/_locales/ur/messages.json'
+]
+
+FINAL_TARGET_FILES.features['screenshots@mozilla.org']["webextension"]["_locales"]["zh_CN"] += [
+  'webextension/_locales/zh_CN/messages.json'
+]
+
+FINAL_TARGET_FILES.features['screenshots@mozilla.org']["webextension"]["_locales"]["zh_TW"] += [
+  'webextension/_locales/zh_TW/messages.json'
+]
+
+FINAL_TARGET_FILES.features['screenshots@mozilla.org']["webextension"]["background"] += [
+  'webextension/background/analytics.js',
+  'webextension/background/auth.js',
+  'webextension/background/communication.js',
+  'webextension/background/deviceInfo.js',
+  'webextension/background/main.js',
+  'webextension/background/selectorLoader.js',
+  'webextension/background/senderror.js',
+  'webextension/background/takeshot.js'
+]
+
+FINAL_TARGET_FILES.features['screenshots@mozilla.org']["webextension"]["build"] += [
+  'webextension/build/defaultSentryDsn.js',
+  'webextension/build/inlineSelectionCss.js',
+  'webextension/build/onboardingCss.js',
+  'webextension/build/onboardingHtml.js',
+  'webextension/build/raven.js',
+  'webextension/build/shot.js'
+]
+
+FINAL_TARGET_FILES.features['screenshots@mozilla.org']["webextension"]["icons"] += [
+  'webextension/icons/back.svg',
+  'webextension/icons/cancel.svg',
+  'webextension/icons/copy.png',
+  'webextension/icons/done.svg',
+  'webextension/icons/download.svg',
+  'webextension/icons/icon-128.png',
+  'webextension/icons/icon-16.png',
+  'webextension/icons/icon-19.png',
+  'webextension/icons/icon-256.png',
+  'webextension/icons/icon-32.png',
+  'webextension/icons/icon-38.png',
+  'webextension/icons/icon-48.png',
+  'webextension/icons/icon-64.png',
+  'webextension/icons/icon-highlight-19.png',
+  'webextension/icons/icon-highlight-38.png',
+  'webextension/icons/icon-starred-19.png',
+  'webextension/icons/icon-starred-38.png',
+  'webextension/icons/menu-fullpage.svg',
+  'webextension/icons/menu-myshot.svg',
+  'webextension/icons/menu-visible.svg',
+  'webextension/icons/onboarding-1.png',
+  'webextension/icons/onboarding-2.png',
+  'webextension/icons/onboarding-3.png',
+  'webextension/icons/onboarding-4.png'
+]
+
+FINAL_TARGET_FILES.features['screenshots@mozilla.org']["webextension"]["onboarding"] += [
+  'webextension/onboarding/slides.html',
+  'webextension/onboarding/slides.js'
+]
+
+FINAL_TARGET_FILES.features['screenshots@mozilla.org']["webextension"]["selector"] += [
+  'webextension/selector/callBackground.js',
+  'webextension/selector/documentMetadata.js',
+  'webextension/selector/shooter.js',
+  'webextension/selector/ui.js',
+  'webextension/selector/uicontrol.js',
+  'webextension/selector/util.js'
+]
+
+# AUTOMATIC INSERTION END
+
+BROWSER_CHROME_MANIFESTS += [
+    'test/browser/browser.ini'
+]
--- a/testing/profiles/prefs_general.js
+++ b/testing/profiles/prefs_general.js
@@ -363,8 +363,11 @@ user_pref("signon.rememberSignons", fals
 
 // Enable form autofill feature testing.
 user_pref("browser.formautofill.experimental", true);
 
 // Disable all recommended Marionette preferences for Gecko tests.
 // The prefs recommended by Marionette are typically geared towards
 // consumer automation; not vendor testing.
 user_pref("marionette.prefs.recommended", false);
+
+// Disable Screenshots by default for now
+user_pref("extensions.screenshots.system-disabled", true);