Bug 1443561 - Part 1b: Move #navigator-toolbox rule back to browser/base/content to avoid CSP issues. r=me
☠☠ backed out by a92aacd177b5 ☠ ☠
authorTim Nguyen <ntim.bugs@gmail.com>
Wed, 22 Aug 2018 09:01:38 +0100
changeset 432751 054c113b5cb1
parent 432750 c3bb26f98555
child 432752 a92aacd177b5
push id106856
push userntim.bugs@gmail.com
push dateWed, 22 Aug 2018 08:02:59 +0000
treeherdermozilla-inbound@054c113b5cb1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs1443561
milestone63.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 1443561 - Part 1b: Move #navigator-toolbox rule back to browser/base/content to avoid CSP issues. r=me
browser/base/content/browser.css
browser/components/syncedtabs/sidebar.js
browser/components/syncedtabs/sidebar.xhtml
browser/themes/shared/browser.inc.css
--- a/browser/base/content/browser.css
+++ b/browser/base/content/browser.css
@@ -23,16 +23,24 @@
   background-image: var(--lwt-header-image) !important;
   background-position: right top !important;
 }
 
 :root:-moz-lwtheme:-moz-window-inactive {
   background-color: var(--lwt-accent-color-inactive, var(--lwt-accent-color)) !important;
 }
 
+/* Set additional backgrounds alignment relative to toolbox */
+
+#navigator-toolbox:-moz-lwtheme {
+  background-image: var(--lwt-additional-images);
+  background-position: var(--lwt-background-alignment);
+  background-repeat: var(--lwt-background-tiling);
+}
+
 #main-window:not([chromehidden~="toolbar"]) {
 %ifdef XP_MACOSX
   min-width: 335px;
 %else
   min-width: 300px;
 %endif
 }
 
--- a/browser/components/syncedtabs/sidebar.js
+++ b/browser/components/syncedtabs/sidebar.js
@@ -2,27 +2,36 @@
  * 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";
 
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 ChromeUtils.import("resource://services-sync/SyncedTabs.jsm");
 ChromeUtils.import("resource:///modules/syncedtabs/SyncedTabsDeckComponent.js");
+ChromeUtils.import("resource:///actors/LightweightThemeChild.jsm");
 
 ChromeUtils.defineModuleGetter(this, "fxAccounts",
                                "resource://gre/modules/FxAccounts.jsm");
 
 var syncedTabsDeckComponent = new SyncedTabsDeckComponent({window, SyncedTabs, fxAccounts});
 
+let themeListener;
+
 let onLoaded = () => {
+  themeListener = new LightweightThemeChild({
+    content: window,
+    chromeOuterWindowID: window.top.windowUtils.outerWindowID,
+    docShell: window.docShell,
+  });
   syncedTabsDeckComponent.init();
   document.getElementById("template-container").appendChild(syncedTabsDeckComponent.container);
 };
 
 let onUnloaded = () => {
+  themeListener.cleanup();
   removeEventListener("DOMContentLoaded", onLoaded);
   removeEventListener("unload", onUnloaded);
   syncedTabsDeckComponent.uninit();
 };
 
 addEventListener("DOMContentLoaded", onLoaded);
 addEventListener("unload", onUnloaded);
--- a/browser/components/syncedtabs/sidebar.xhtml
+++ b/browser/components/syncedtabs/sidebar.xhtml
@@ -12,16 +12,17 @@
   %globalDTD;
   <!ENTITY % syncBrandDTD
     SYSTEM "chrome://browser/locale/syncBrand.dtd">
   %syncBrandDTD;
 ]>
 <html xmlns="http://www.w3.org/1999/xhtml"
       xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
   <head>
+    <script src="chrome://browser/content/contentTheme.js"></script>
     <script src="chrome://browser/content/syncedtabs/sidebar.js" type="application/javascript"></script>
     <script type="application/javascript" src="chrome://browser/content/utilityOverlay.js"/>
 
     <link rel="stylesheet" type="text/css" media="all" href="chrome://browser/skin/syncedtabs/sidebar.css"/>
     <link rel="stylesheet" type="text/css" media="all" href="chrome://global/skin/"/>
     <link rel="stylesheet" type="text/css" media="all" href="chrome://global/skin/textbox.css"/>
     <link rel="stylesheet" type="text/css" media="all" href="chrome://browser/content/browser.css"/>
     <title>&syncedTabs.sidebar.label;</title>
--- a/browser/themes/shared/browser.inc.css
+++ b/browser/themes/shared/browser.inc.css
@@ -24,24 +24,16 @@
 }
 
 /* Increase contrast of UI links on dark themes */
 
 :root[lwt-popup-brighttext] panel .text-link {
   color: @lwtPopupBrighttextLinkColor@;
 }
 
-/* Set additional backgrounds alignment relative to toolbox*/
-
-#navigator-toolbox:-moz-lwtheme {
-  background-image: var(--lwt-additional-images);
-  background-position: var(--lwt-background-alignment);
-  background-repeat: var(--lwt-background-tiling);
-}
-
 /* Toolbar / content area border */
 
 #navigator-toolbox::after {
   content: "";
   display: -moz-box;
   border-bottom: 1px solid var(--toolbox-border-bottom-color);
 }