Bug 1549825 - Create empty about:protections page. r=johannh
☠☠ backed out by b59a173dc59b ☠ ☠
authorErica Wright <ewright@mozilla.com>
Mon, 13 May 2019 18:44:31 +0000
changeset 532480 eb14a49fc4df556927806f4f810329c90f46cd02
parent 532479 d50cc0b641ed30db3353e7131fb06b7129dab548
child 532481 42f2738786c9f27eba201a15214b62b05e99fc67
push id11268
push usercsabou@mozilla.com
push dateTue, 14 May 2019 15:24:22 +0000
treeherdermozilla-beta@5fb7fcd568d6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjohannh
bugs1549825
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1549825 - Create empty about:protections page. r=johannh Differential Revision: https://phabricator.services.mozilla.com/D30652
browser/components/about/AboutRedirector.cpp
browser/components/about/components.conf
browser/components/protections/content/protections.css
browser/components/protections/content/protections.html
browser/components/protections/content/protections.js
browser/components/protections/jar.mn
browser/components/protections/moz.build
--- a/browser/components/about/AboutRedirector.cpp
+++ b/browser/components/about/AboutRedirector.cpp
@@ -110,16 +110,20 @@ static const RedirEntry kRedirMap[] = {
          nsIAboutModule::ALLOW_SCRIPT | nsIAboutModule::URI_MUST_LOAD_IN_CHILD |
          nsIAboutModule::HIDE_FROM_ABOUTABOUT},
     {"restartrequired", "chrome://browser/content/aboutRestartRequired.xhtml",
      nsIAboutModule::ALLOW_SCRIPT | nsIAboutModule::HIDE_FROM_ABOUTABOUT},
     {"newinstall", "chrome://browser/content/newInstallPage.html",
      nsIAboutModule::URI_MUST_LOAD_IN_CHILD |
          nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
          nsIAboutModule::ALLOW_SCRIPT | nsIAboutModule::HIDE_FROM_ABOUTABOUT},
+    {"protections", "chrome://browser/content/protections/protections.html",
+     nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
+         nsIAboutModule::URI_MUST_LOAD_IN_CHILD | nsIAboutModule::ALLOW_SCRIPT |
+         nsIAboutModule::URI_CAN_LOAD_IN_PRIVILEGED_CHILD},
 };
 
 static nsAutoCString GetAboutModuleName(nsIURI* aURI) {
   nsAutoCString path;
   aURI->GetPathQueryRef(path);
 
   int32_t f = path.FindChar('#');
   if (f >= 0) path.SetLength(f);
--- a/browser/components/about/components.conf
+++ b/browser/components/about/components.conf
@@ -14,16 +14,17 @@ pages = [
     'logins',
     'newinstall',
     'newtab',
     'pocket-saved',
     'pocket-signup',
     'policies',
     'preferences',
     'privatebrowsing',
+    'protections',
     'reader',
     'restartrequired',
     'rights',
     'robots',
     'sessionrestore',
     'tabcrashed',
     'welcome',
     'welcomeback',
new file mode 100644
--- /dev/null
+++ b/browser/components/protections/content/protections.css
@@ -0,0 +1,12 @@
+/* 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/. */
+.under-construction {
+    background-image: url("chrome://browser/content/illustrations/under-construction.svg");
+    background-repeat: no-repeat;
+    background-position: center;
+    min-height: 300px;
+    min-width: 300px;
+    /* Move the image down a bit - should be slightly higher than halfway down the page */
+    margin-top: -10%;
+}
new file mode 100644
--- /dev/null
+++ b/browser/components/protections/content/protections.html
@@ -0,0 +1,23 @@
+<!-- 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/. -->
+
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+    <meta http-equiv="Content-Security-Policy" content="default-src chrome: blob:">
+    <link rel="stylesheet" media="screen, projection" type="text/css"
+          href="chrome://global/skin/in-content/info-pages.css" title="infop">
+    <link rel="stylesheet" type="text/css"
+          href="chrome://browser/content/protections/protections.css">
+    <script src="chrome://browser/content/protections/protections.js"></script>
+    <link rel="icon" href="chrome://global/skin/icons/warning.svg">
+    <link rel="localization" href="browser/aboutProtections.ftl">
+    <title>Protection Report</title>
+  </head>
+
+  <body>
+    <div class="under-construction"><div/>
+  </body>
+</html>
new file mode 100644
new file mode 100644
--- /dev/null
+++ b/browser/components/protections/jar.mn
@@ -0,0 +1,7 @@
+# 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/protections.html             (content/protections.html)
+
new file mode 100644
--- /dev/null
+++ b/browser/components/protections/moz.build
@@ -0,0 +1,10 @@
+# -*- 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/.
+
+JAR_MANIFESTS += ['jar.mn']
+
+with Files('**'):
+    BUG_COMPONENT = ('Firefox', 'Tracking Protection')