Bug 1549825 - Create empty about:protections page. r=johannh,baku
authorErica Wright <ewright@mozilla.com>
Tue, 21 May 2019 18:32:32 +0000
changeset 474853 723406ecb5f6063834f416606aea688d3cd56a95
parent 474852 c5488e2770a6273fae9d9ae62ab9bca888354b95
child 474854 a10cdf32fb5a3fe7474a2e3f6a838215863c3c9e
push id113174
push usernerli@mozilla.com
push dateWed, 22 May 2019 03:46:05 +0000
treeherdermozilla-inbound@a1672f31906b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjohannh, baku
bugs1549825
milestone69.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,baku Differential Revision: https://phabricator.services.mozilla.com/D30652
browser/components/about/AboutRedirector.cpp
browser/components/about/components.conf
browser/components/moz.build
browser/components/protections/content/protections.css
browser/components/protections/content/protections.html
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.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',
--- a/browser/components/moz.build
+++ b/browser/components/moz.build
@@ -42,16 +42,17 @@ DIRS += [
     'library',
     'migration',
     'newtab',
     'originattributes',
     'places',
     'pocket',
     'preferences',
     'privatebrowsing',
+    'protections',
     'protocolhandler',
     'resistfingerprinting',
     'search',
     'sessionstore',
     'shell',
     'syncedtabs',
     'uitour',
     'urlbar',
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,21 @@
+<!-- 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.css">
+    <link rel="icon" href="chrome://global/skin/icons/warning.svg">
+    <title>Protection Report</title>
+  </head>
+
+  <body>
+    <div class="under-construction"><div/>
+  </body>
+</html>
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.css                       (content/protections.css)
+    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')