Bug 1314091 - Expose 'compact' themes instead of the Dev Edition theme;r=Gijs draft
authorBrian Grinstead <bgrinstead@mozilla.com>
Tue, 10 Jan 2017 16:08:12 -0800
changeset 458749 cc5b9f87dc9acfbc96fcf712228b4759d651b068
parent 458748 353f6d4f5251de7543785870662306fe4f5e0907
child 458750 28f124784d81b384efe8292b90595c99d048d27f
push id41047
push userbgrinstead@mozilla.com
push dateWed, 11 Jan 2017 00:17:40 +0000
reviewersGijs
bugs1314091
milestone53.0a1
Bug 1314091 - Expose 'compact' themes instead of the Dev Edition theme;r=Gijs This commit does the following: * Install two lightweight themes instead of one * Introduce a build config to install the themes instead of relying on channel: INSTALL_COMPACT_THEMES * Change browser-compacttheme to use the new themes instead of the old one * Remove inferBrightness since the lwt colors are part of the compact theme definision, as opposed to the devedition theme which could be light or MozReview-Commit-ID: 4gKU68drlE2
browser/app/profile/firefox.js
browser/base/content/browser-compacttheme.js
browser/base/content/defaultthemes/compact.header.png
browser/base/content/defaultthemes/compactdark.icon.svg
browser/base/content/defaultthemes/compactlight.icon.svg
browser/base/content/defaultthemes/devedition.header.png
browser/base/content/defaultthemes/devedition.icon.png
browser/base/content/test/general/browser_compacttheme.js
browser/base/jar.mn
browser/components/nsBrowserGlue.js
browser/installer/allowed-dupes.mn
browser/locales/en-US/chrome/browser/browser.properties
toolkit/modules/AppConstants.jsm
toolkit/modules/moz.build
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -1127,17 +1127,17 @@ pref("services.sync.prefs.sync.xpinstall
 // fetching these icons to show remote tabs may leak information about that
 // user's tabs and bookmarks. Note this pref is also synced.
 pref("services.sync.syncedTabs.showRemoteIcons", true);
 
 pref("services.sync.sendTabToDevice.enabled", true);
 
 // Developer edition preferences
 #ifdef MOZ_DEV_EDITION
-sticky_pref("lightweightThemes.selectedThemeID", "firefox-devedition@mozilla.org");
+sticky_pref("lightweightThemes.selectedThemeID", "firefox-compact-dark@mozilla.org");
 #else
 sticky_pref("lightweightThemes.selectedThemeID", "");
 #endif
 
 // Whether the character encoding menu is under the main Firefox button. This
 // preference is a string so that localizers can alter it.
 pref("browser.menu.showCharacterEncoding", "chrome://browser/locale/browser.properties");
 
--- a/browser/base/content/browser-compacttheme.js
+++ b/browser/base/content/browser-compacttheme.js
@@ -13,17 +13,19 @@ var CompactTheme = {
   initialized: false,
 
   get isStyleSheetEnabled() {
     return this.styleSheet && !this.styleSheet.sheet.disabled;
   },
 
   get isThemeCurrentlyApplied() {
     let theme = LightweightThemeManager.currentTheme;
-    return theme && theme.id == "firefox-devedition@mozilla.org";
+    return theme && (
+           theme.id == "firefox-compact-dark@mozilla.org" ||
+           theme.id == "firefox-compact-light@mozilla.org");
   },
 
   init() {
     this.initialized = true;
     Services.prefs.addObserver(this._devtoolsThemePrefName, this, false);
     Services.obs.addObserver(this, "lightweight-theme-styling-update", false);
     this._updateDevtoolsThemeAttribute();
 
@@ -39,77 +41,69 @@ var CompactTheme = {
     this.styleSheet.addEventListener("load", this);
     document.insertBefore(this.styleSheet, document.documentElement);
     this.styleSheet.sheet.disabled = true;
   },
 
   observe(subject, topic, data) {
     if (topic == "lightweight-theme-styling-update") {
       let newTheme = JSON.parse(data);
-      if (newTheme && newTheme.id == "firefox-devedition@mozilla.org") {
+      if (newTheme && (
+          newTheme.id == "firefox-compact-light@mozilla.org" ||
+          newTheme.id == "firefox-compact-dark@mozilla.org")) {
+        // We are using the theme ID on this object instead of always referencing
+        // LightweightThemeManager.currentTheme in case this is a preview
         this._toggleStyleSheet(true);
       } else {
         this._toggleStyleSheet(false);
       }
+
     }
 
     if (topic == "nsPref:changed" && data == this._devtoolsThemePrefName) {
       this._updateDevtoolsThemeAttribute();
     }
   },
 
-  _inferBrightness() {
-    ToolbarIconColor.inferFromText();
-    // Get an inverted full screen button if the dark theme is applied.
-    if (this.isStyleSheetEnabled &&
-        document.documentElement.getAttribute("devtoolstheme") == "dark") {
-      document.documentElement.setAttribute("brighttitlebarforeground", "true");
-    } else {
-      document.documentElement.removeAttribute("brighttitlebarforeground");
-    }
-  },
-
   _updateDevtoolsThemeAttribute() {
     // Set an attribute on root element to make it possible
     // to change colors based on the selected devtools theme.
     let devtoolsTheme = Services.prefs.getCharPref(this._devtoolsThemePrefName);
     if (devtoolsTheme != "dark") {
       devtoolsTheme = "light";
     }
     document.documentElement.setAttribute("devtoolstheme", devtoolsTheme);
-    this._inferBrightness();
   },
 
   handleEvent(e) {
     if (e.type === "load") {
       this.styleSheet.removeEventListener("load", this);
       this.refreshBrowserDisplay();
     }
   },
 
   refreshBrowserDisplay() {
     // Don't touch things on the browser if gBrowserInit.onLoad hasn't
     // yet fired.
     if (this.initialized) {
       gBrowser.tabContainer._positionPinnedTabs();
-      this._inferBrightness();
     }
   },
 
-  _toggleStyleSheet(deveditionThemeEnabled) {
+  _toggleStyleSheet(enabled) {
     let wasEnabled = this.isStyleSheetEnabled;
-    if (deveditionThemeEnabled && !wasEnabled) {
+    if (enabled) {
       // The stylesheet may not have been created yet if it wasn't
       // needed on initial load.  Make it now.
       if (!this.styleSheet) {
         this.createStyleSheet();
       }
       this.styleSheet.sheet.disabled = false;
       this.refreshBrowserDisplay();
-    } else if (!deveditionThemeEnabled && wasEnabled) {
+    } else if (!enabled && wasEnabled) {
       this.styleSheet.sheet.disabled = true;
       this.refreshBrowserDisplay();
     }
   },
 
   uninit() {
     Services.prefs.removeObserver(this._devtoolsThemePrefName, this);
     Services.obs.removeObserver(this, "lightweight-theme-styling-update", false);
@@ -118,12 +112,12 @@ var CompactTheme = {
     }
     this.styleSheet = null;
   }
 };
 
 // If the compact theme is going to be applied in gBrowserInit.onLoad,
 // then preload it now.  This prevents a flash of unstyled content where the
 // normal theme is applied while the compact theme stylesheet is loading.
-if (!AppConstants.RELEASE_OR_BETA &&
+if (AppConstants.INSTALL_COMPACT_THEMES &&
     this != Services.appShell.hiddenDOMWindow && CompactTheme.isThemeCurrentlyApplied) {
   CompactTheme.createStyleSheet();
 }
rename from browser/base/content/defaultthemes/devedition.header.png
rename to browser/base/content/defaultthemes/compact.header.png
new file mode 100644
--- /dev/null
+++ b/browser/base/content/defaultthemes/compactdark.icon.svg
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 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/. -->
+<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32">
+    <rect fill="#727780" x="1" y="1" width="30" height="30" rx="2" ry="2"/>
+    <path fill="#393f4c" d="M3 1h26a2 2 0 0 1 2 2v14H1V3a2 2 0 0 1 2-2z"/>
+    <rect fill="#171b1f" x="3.5" y="3.5" width="25" height="11" rx="1" ry="1"/>
+    <path fill="#252c33" d="M4.5 3.5h12v11h-12a1 1 0 0 1-1-1v-9a1 1 0 0 1 1-1z"/>
+    <rect stroke="#1d2328" fill="none" stroke-width="2" x="1" y="1" width="30" height="30" rx="2" ry="2"/>
+    <path class="icon-line-2px" d="M10 6L7 9l3 3M7.5 9H13"/>
+    <path stroke="#1d2328" d="M1.5 16.5h29"/>
+    <path class="separator-toolbar-items" d="M16.5 3.5v11"/>
+    <rect fill="none" stroke="#171b1f" x="3.5" y="3.5" width="25" height="11" rx="1" ry="1"/>
+    <path fill="#f0f1f2" d="M13 8H9.4l1.3-1.3a1 1 0 0 0-1.4-1.4l-3 3a1 1 0 0 0 0 1.4l3 3a1 1 0 0 0 1.4-1.4L9.4 10H13a1 1 0 0 0 0-2z"/>
+</svg>
new file mode 100644
--- /dev/null
+++ b/browser/base/content/defaultthemes/compactlight.icon.svg
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 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/. -->
+<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32">
+    <rect fill="#fff" x="1" y="1" width="30" height="30" rx="2" ry="2"/>
+    <path fill="#e3e3e3" d="M3 1h26a2 2 0 0 1 2 2v14H1V3a2 2 0 0 1 2-2z"/>
+    <rect fill="#fff" x="3.5" y="3.5" width="25" height="11" rx="1" ry="1"/>
+    <path fill="#fcfcfc" d="M4.5 3.5h12v11h-12a1 1 0 0 1-1-1v-9a1 1 0 0 1 1-1z"/>
+    <rect fill="none" stroke="#999" stroke-width="2" x="1" y="1" width="30" height="30" rx="2" ry="2"/>
+    <path stroke="#999" d="M1.5 16.5h29"/>
+    <path stroke="#b3b3b3" d="M16.5 3.5v11"/>
+    <rect fill="none" stroke="#b3b3b3" x="3.5" y="3.5" width="25" height="11" rx="1" ry="1"/>
+    <path fill="#595959" d="M13 8H9.4l1.3-1.3a1 1 0 0 0-1.4-1.4l-3 3a1 1 0 0 0 0 1.4l3 3a1 1 0 0 0 1.4-1.4L9.4 10H13a1 1 0 0 0 0-2z"/>
+</svg>
deleted file mode 100644
index 04cfba796dc6aa0bac6b3b368e929009bf01af52..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
--- a/browser/base/content/test/general/browser_compacttheme.js
+++ b/browser/base/content/test/general/browser_compacttheme.js
@@ -1,129 +1,90 @@
 /*
- * Testing changes for Developer Edition theme.
+ * Testing changes for compact themes.
  * A special stylesheet should be added to the browser.xul document
- * when the firefox-devedition@mozilla.org lightweight theme
- * is applied.
+ * when the firefox-compact-light and firefox-compact-dark lightweight
+ * themes are applied.
  */
 
 const PREF_LWTHEME_USED_THEMES = "lightweightThemes.usedThemes";
-const PREF_DEVTOOLS_THEME = "devtools.theme";
+const COMPACT_LIGHT_ID = "firefox-compact-light@mozilla.org";
+const COMPACT_DARK_ID = "firefox-compact-dark@mozilla.org";
+const SKIP_TEST = !AppConstants.INSTALL_COMPACT_THEMES;
 const {LightweightThemeManager} = Components.utils.import("resource://gre/modules/LightweightThemeManager.jsm", {});
 
-LightweightThemeManager.clearBuiltInThemes();
-LightweightThemeManager.addBuiltInTheme(dummyLightweightTheme("firefox-devedition@mozilla.org"));
-
 registerCleanupFunction(() => {
   // Set preferences back to their original values
   LightweightThemeManager.currentTheme = null;
-  Services.prefs.clearUserPref(PREF_DEVTOOLS_THEME);
   Services.prefs.clearUserPref(PREF_LWTHEME_USED_THEMES);
-
-  LightweightThemeManager.currentTheme = null;
-  LightweightThemeManager.clearBuiltInThemes();
 });
 
 add_task(function* startTests() {
-  Services.prefs.setCharPref(PREF_DEVTOOLS_THEME, "dark");
+  if (SKIP_TEST) {
+    ok(true, "No need to run this test since themes aren't installed");
+    return;
+  }
 
   info("Setting the current theme to null");
   LightweightThemeManager.currentTheme = null;
-  ok(!CompactTheme.isStyleSheetEnabled, "There is no devedition style sheet when no lw theme is applied.");
+  ok(!CompactTheme.isStyleSheetEnabled, "There is no compact style sheet when no lw theme is applied.");
 
   info("Adding a lightweight theme.");
   LightweightThemeManager.currentTheme = dummyLightweightTheme("preview0");
-  ok(!CompactTheme.isStyleSheetEnabled, "The devedition stylesheet has been removed when a lightweight theme is applied.");
+  ok(!CompactTheme.isStyleSheetEnabled, "The compact stylesheet has been removed when a lightweight theme is applied.");
+
+  info("Applying the dark compact theme.");
+  LightweightThemeManager.currentTheme = LightweightThemeManager.getUsedTheme(COMPACT_DARK_ID);
+  ok(CompactTheme.isStyleSheetEnabled, "The compact stylesheet has been added when the compact lightweight theme is applied");
 
-  info("Applying the devedition lightweight theme.");
-  let onAttributeAdded = waitForBrightTitlebarAttribute();
-  LightweightThemeManager.currentTheme = LightweightThemeManager.getUsedTheme("firefox-devedition@mozilla.org");
-  ok(CompactTheme.isStyleSheetEnabled, "The devedition stylesheet has been added when the devedition lightweight theme is applied");
-  yield onAttributeAdded;
-  is(document.documentElement.getAttribute("brighttitlebarforeground"), "true",
-     "The brighttitlebarforeground attribute is set on the window.");
+  info("Applying the light compact theme.");
+  LightweightThemeManager.currentTheme = LightweightThemeManager.getUsedTheme(COMPACT_LIGHT_ID);
+  ok(CompactTheme.isStyleSheetEnabled, "The compact stylesheet has been added when the compact lightweight theme is applied");
+
+  info("Adding a different lightweight theme.");
+  LightweightThemeManager.currentTheme = dummyLightweightTheme("preview1");
+  ok(!CompactTheme.isStyleSheetEnabled, "The compact stylesheet has been removed when a lightweight theme is applied.");
 
   info("Unapplying all themes.");
   LightweightThemeManager.currentTheme = null;
-  ok(!CompactTheme.isStyleSheetEnabled, "There is no devedition style sheet when no lw theme is applied.");
-
-  info("Applying the devedition lightweight theme.");
-  onAttributeAdded = waitForBrightTitlebarAttribute();
-  LightweightThemeManager.currentTheme = LightweightThemeManager.getUsedTheme("firefox-devedition@mozilla.org");
-  ok(CompactTheme.isStyleSheetEnabled, "The devedition stylesheet has been added when the devedition lightweight theme is applied");
-  yield onAttributeAdded;
-  ok(document.documentElement.hasAttribute("brighttitlebarforeground"),
-     "The brighttitlebarforeground attribute is set on the window with dark devtools theme.");
-});
-
-add_task(function* testDevtoolsTheme() {
-  info("Checking stylesheet and :root attributes based on devtools theme.");
-  Services.prefs.setCharPref(PREF_DEVTOOLS_THEME, "light");
-  is(document.documentElement.getAttribute("devtoolstheme"), "light",
-    "The documentElement has an attribute based on devtools theme.");
-  ok(CompactTheme.isStyleSheetEnabled, "The devedition stylesheet is still there with the light devtools theme.");
-  ok(!document.documentElement.hasAttribute("brighttitlebarforeground"),
-     "The brighttitlebarforeground attribute is not set on the window with light devtools theme.");
-
-  Services.prefs.setCharPref(PREF_DEVTOOLS_THEME, "dark");
-  is(document.documentElement.getAttribute("devtoolstheme"), "dark",
-    "The documentElement has an attribute based on devtools theme.");
-  ok(CompactTheme.isStyleSheetEnabled, "The devedition stylesheet is still there with the dark devtools theme.");
-  is(document.documentElement.getAttribute("brighttitlebarforeground"), "true",
-     "The brighttitlebarforeground attribute is set on the window with dark devtools theme.");
-
-  Services.prefs.setCharPref(PREF_DEVTOOLS_THEME, "foobar");
-  is(document.documentElement.getAttribute("devtoolstheme"), "light",
-    "The documentElement has 'light' as a default for the devtoolstheme attribute");
-  ok(CompactTheme.isStyleSheetEnabled, "The devedition stylesheet is still there with the foobar devtools theme.");
-  ok(!document.documentElement.hasAttribute("brighttitlebarforeground"),
-     "The brighttitlebarforeground attribute is not set on the window with light devtools theme.");
+  ok(!CompactTheme.isStyleSheetEnabled, "There is no compact style sheet when no lw theme is applied.");
 });
 
 function dummyLightweightTheme(id) {
   return {
     id,
     name: id,
-    headerURL: "resource:///chrome/browser/content/browser/defaultthemes/devedition.header.png",
-    iconURL: "resource:///chrome/browser/content/browser/defaultthemes/devedition.icon.png",
+    headerURL: "resource:///chrome/browser/content/browser/defaultthemes/compact.header.png",
+    iconURL: "resource:///chrome/browser/content/browser/defaultthemes/compactlight.icon.svg",
     textcolor: "red",
     accentcolor: "blue"
   };
 }
 
 add_task(function* testLightweightThemePreview() {
-  info("Setting devedition to current and the previewing others");
-  LightweightThemeManager.currentTheme = LightweightThemeManager.getUsedTheme("firefox-devedition@mozilla.org");
-  ok(CompactTheme.isStyleSheetEnabled, "The devedition stylesheet is enabled.");
+  if (SKIP_TEST) {
+    ok(true, "No need to run this test since themes aren't installed");
+    return;
+  }
+  info("Setting compact to current and previewing others");
+  LightweightThemeManager.currentTheme = LightweightThemeManager.getUsedTheme(COMPACT_LIGHT_ID);
+  ok(CompactTheme.isStyleSheetEnabled, "The compact stylesheet is enabled.");
   LightweightThemeManager.previewTheme(dummyLightweightTheme("preview0"));
-  ok(!CompactTheme.isStyleSheetEnabled, "The devedition stylesheet is not enabled after a lightweight theme preview.");
+  ok(!CompactTheme.isStyleSheetEnabled, "The compact stylesheet is not enabled after a lightweight theme preview.");
   LightweightThemeManager.resetPreview();
   LightweightThemeManager.previewTheme(dummyLightweightTheme("preview1"));
-  ok(!CompactTheme.isStyleSheetEnabled, "The devedition stylesheet is not enabled after a second lightweight theme preview.");
+  ok(!CompactTheme.isStyleSheetEnabled, "The compact stylesheet is not enabled after a second lightweight theme preview.");
   LightweightThemeManager.resetPreview();
-  ok(CompactTheme.isStyleSheetEnabled, "The devedition stylesheet is enabled again after resetting the preview.");
+  ok(CompactTheme.isStyleSheetEnabled, "The compact stylesheet is enabled again after resetting the preview.");
   LightweightThemeManager.currentTheme = null;
-  ok(!CompactTheme.isStyleSheetEnabled, "The devedition stylesheet is gone after removing the current theme.");
-
-  info("Previewing the devedition theme");
-  LightweightThemeManager.previewTheme(LightweightThemeManager.getUsedTheme("firefox-devedition@mozilla.org"));
-  ok(CompactTheme.isStyleSheetEnabled, "The devedition stylesheet is enabled.");
-  LightweightThemeManager.previewTheme(dummyLightweightTheme("preview2"));
-  LightweightThemeManager.resetPreview();
-  ok(!CompactTheme.isStyleSheetEnabled, "The devedition stylesheet is now disabled after resetting the preview.");
-});
+  ok(!CompactTheme.isStyleSheetEnabled, "The compact stylesheet is gone after removing the current theme.");
 
-// Use a mutation observer to wait for the brighttitlebarforeground
-// attribute to change.  Using this instead of waiting for the load
-// event on the DevEdition styleSheet.
-function waitForBrightTitlebarAttribute() {
-  return new Promise((resolve, reject) => {
-    let mutationObserver = new MutationObserver(function(mutations) {
-      for (let mutation of mutations) {
-        if (mutation.attributeName == "brighttitlebarforeground") {
-          mutationObserver.disconnect();
-          resolve();
-        }
-      }
-    });
-    mutationObserver.observe(document.documentElement, { attributes: true });
-  });
-}
+  info("Previewing the compact theme");
+  LightweightThemeManager.previewTheme(LightweightThemeManager.getUsedTheme(COMPACT_LIGHT_ID));
+  ok(CompactTheme.isStyleSheetEnabled, "The compact stylesheet is enabled.");
+  LightweightThemeManager.previewTheme(LightweightThemeManager.getUsedTheme(COMPACT_DARK_ID));
+  ok(CompactTheme.isStyleSheetEnabled, "The compact stylesheet is enabled.");
+
+  LightweightThemeManager.previewTheme(dummyLightweightTheme("preview2"));
+  ok(!CompactTheme.isStyleSheetEnabled, "The compact stylesheet is now disabled after previewing a new sheet.");
+  LightweightThemeManager.resetPreview();
+  ok(!CompactTheme.isStyleSheetEnabled, "The compact stylesheet is now disabled after resetting the preview.");
+});
--- a/browser/base/jar.mn
+++ b/browser/base/jar.mn
@@ -112,18 +112,19 @@ browser.jar:
         content/browser/defaultthemes/4.footer.png    (content/defaultthemes/4.footer.png)
         content/browser/defaultthemes/4.header.png    (content/defaultthemes/4.header.png)
         content/browser/defaultthemes/4.icon.png      (content/defaultthemes/4.icon.png)
         content/browser/defaultthemes/4.preview.png   (content/defaultthemes/4.preview.png)
         content/browser/defaultthemes/5.footer.png    (content/defaultthemes/5.footer.png)
         content/browser/defaultthemes/5.header.png    (content/defaultthemes/5.header.png)
         content/browser/defaultthemes/5.icon.jpg      (content/defaultthemes/5.icon.jpg)
         content/browser/defaultthemes/5.preview.jpg   (content/defaultthemes/5.preview.jpg)
-        content/browser/defaultthemes/devedition.header.png   (content/defaultthemes/devedition.header.png)
-        content/browser/defaultthemes/devedition.icon.png     (content/defaultthemes/devedition.icon.png)
+        content/browser/defaultthemes/compact.header.png    (content/defaultthemes/compact.header.png)
+        content/browser/defaultthemes/compactdark.icon.svg  (content/defaultthemes/compactdark.icon.svg)
+        content/browser/defaultthemes/compactlight.icon.svg (content/defaultthemes/compactlight.icon.svg)
         content/browser/gcli_sec_bad.svg              (content/gcli_sec_bad.svg)
         content/browser/gcli_sec_good.svg             (content/gcli_sec_good.svg)
         content/browser/gcli_sec_moderate.svg         (content/gcli_sec_moderate.svg)
         content/browser/newtab/newTab.xhtml           (content/newtab/newTab.xhtml)
 *       content/browser/newtab/newTab.js              (content/newtab/newTab.js)
         content/browser/newtab/newTab.css             (content/newtab/newTab.css)
         content/browser/newtab/newTab.inadjacent.json         (content/newtab/newTab.inadjacent.json)
         content/browser/newtab/alternativeDefaultSites.json   (content/newtab/alternativeDefaultSites.json)
--- a/browser/components/nsBrowserGlue.js
+++ b/browser/components/nsBrowserGlue.js
@@ -647,25 +647,37 @@ BrowserGlue.prototype = {
     ReaderParent.init();
     URLBarZoom.init();
 
     SelfSupportBackend.init();
 
     // Ensure we keep track of places/pw-mananager undo by init'ing this early.
     Cu.import("resource:///modules/AutoMigrate.jsm");
 
-    if (!AppConstants.RELEASE_OR_BETA) {
-      let themeName = gBrowserBundle.GetStringFromName("deveditionTheme.name");
+    if (AppConstants.INSTALL_COMPACT_THEMES) {
       let vendorShortName = gBrandBundle.GetStringFromName("vendorShortName");
 
       LightweightThemeManager.addBuiltInTheme({
-        id: "firefox-devedition@mozilla.org",
-        name: themeName,
-        headerURL: "resource:///chrome/browser/content/browser/defaultthemes/devedition.header.png",
-        iconURL: "resource:///chrome/browser/content/browser/defaultthemes/devedition.icon.png",
+        id: "firefox-compact-light@mozilla.org",
+        name: gBrowserBundle.GetStringFromName("compactLightTheme.name"),
+        description: gBrowserBundle.GetStringFromName("compactLightTheme.description"),
+        headerURL: "resource:///chrome/browser/content/browser/defaultthemes/compact.header.png",
+        iconURL: "resource:///chrome/browser/content/browser/defaultthemes/compactlight.icon.svg",
+        textcolor: "black",
+        accentcolor: "white",
+        author: vendorShortName,
+      });
+      LightweightThemeManager.addBuiltInTheme({
+        id: "firefox-compact-dark@mozilla.org",
+        name: gBrowserBundle.GetStringFromName("compactDarkTheme.name"),
+        description: gBrowserBundle.GetStringFromName("compactDarkTheme.description"),
+        headerURL: "resource:///chrome/browser/content/browser/defaultthemes/compact.header.png",
+        iconURL: "resource:///chrome/browser/content/browser/defaultthemes/compactdark.icon.svg",
+        textcolor: "white",
+        accentcolor: "black",
         author: vendorShortName,
       });
     }
 
     TabCrashHandler.init();
     if (AppConstants.MOZ_CRASHREPORTER) {
       PluginCrashReporter.init();
       UnsubmittedCrashHandler.init();
@@ -1714,17 +1726,17 @@ BrowserGlue.prototype = {
       if (topic != "alertclickcallback")
         return;
       this._openPreferences("sync");
     }
     AlertsService.showAlertNotification(null, title, body, true, null, clickCallback);
   },
 
   _migrateUI: function BG__migrateUI() {
-    const UI_VERSION = 42;
+    const UI_VERSION = 43;
     const BROWSER_DOCURL = "chrome://browser/content/browser.xul";
 
     let currentUIVersion;
     if (Services.prefs.prefHasUserValue("browser.migration.version")) {
       currentUIVersion = Services.prefs.getIntPref("browser.migration.version");
     } else {
       // This is a new profile, nothing to migrate.
       Services.prefs.setIntPref("browser.migration.version", UI_VERSION);
@@ -2047,16 +2059,25 @@ BrowserGlue.prototype = {
     }
 
     if (currentUIVersion < 42) {
       let backupFile = Services.dirsvc.get("ProfD", Ci.nsIFile);
       backupFile.append("tabgroups-session-backup.json");
       OS.File.remove(backupFile.path, {ignoreAbsent: true}).catch(ex => Cu.reportError(ex));
     }
 
+    if (currentUIVersion < 43) {
+      let currentTheme = Services.prefs.getCharPref("lightweightThemes.selectedThemeID");
+      if (currentTheme == "firefox-devedition@mozilla.org") {
+        let newTheme = Services.prefs.getCharPref("devtools.theme") == "dark" ?
+          "firefox-compact-dark@mozilla.org" : "firefox-compact-light@mozilla.org";
+        Services.prefs.setCharPref("lightweightThemes.selectedThemeID", newTheme);
+      }
+    }
+
     // Update the migration version.
     Services.prefs.setIntPref("browser.migration.version", UI_VERSION);
   },
 
   _hasExistingNotificationPermission: function BG__hasExistingNotificationPermission() {
     let enumerator = Services.perms.enumerator;
     while (enumerator.hasMoreElements()) {
       let permission = enumerator.getNext().QueryInterface(Ci.nsIPermission);
--- a/browser/installer/allowed-dupes.mn
+++ b/browser/installer/allowed-dupes.mn
@@ -214,11 +214,10 @@ modules/commonjs/sdk/ui/state/events.js
 plugin-container.app/Contents/PkgInfo
 res/table-remove-column-active.gif
 res/table-remove-column-hover.gif
 res/table-remove-column.gif
 res/table-remove-row-active.gif
 res/table-remove-row-hover.gif
 res/table-remove-row.gif
 # Aurora branding
-browser/chrome/browser/content/browser/defaultthemes/devedition.icon.png
 browser/chrome/browser/content/branding/icon64.png
 browser/chrome/devtools/content/framework/dev-edition-promo/dev-edition-logo.png
--- a/browser/locales/en-US/chrome/browser/browser.properties
+++ b/browser/locales/en-US/chrome/browser/browser.properties
@@ -101,19 +101,23 @@ addonInstallErrorIncompatible=%3$S could
 
 # LOCALIZATION NOTE (addonInstallErrorBlocklisted): %S is add-on name
 addonInstallErrorBlocklisted=%S could not be installed because it has a high risk of causing stability or security problems.
 
 unsignedAddonsDisabled.message=One or more installed add-ons cannot be verified and have been disabled.
 unsignedAddonsDisabled.learnMore.label=Learn More
 unsignedAddonsDisabled.learnMore.accesskey=L
 
-# LOCALIZATION NOTE (deveditionTheme.name): This should be nearly the brand name for aurora.
-# See browser/branding/aurora/locales/*/brand.properties
-deveditionTheme.name=Developer Edition
+# LOCALIZATION NOTE (compactLightTheme.name): This is displayed in about:addons -> Appearance
+compactLightTheme.name=Compact Light
+compactLightTheme.description=A compact theme with a light color scheme.
+
+# LOCALIZATION NOTE (compactDarkTheme.name): This is displayed in about:addons -> Appearance
+compactDarkTheme.name=Compact Dark
+compactDarkTheme.description=A compact theme with a dark color scheme.
 
 # LOCALIZATION NOTE (lwthemeInstallRequest.message): %S will be replaced with
 # the host name of the site.
 lwthemeInstallRequest.message=This site (%S) attempted to install a theme.
 lwthemeInstallRequest.allowButton=Allow
 lwthemeInstallRequest.allowButton.accesskey=a
 
 lwthemePostInstallNotification.message=A new theme has been installed.
--- a/toolkit/modules/AppConstants.jsm
+++ b/toolkit/modules/AppConstants.jsm
@@ -255,16 +255,23 @@ this.AppConstants = Object.freeze({
 
   MOZ_REQUIRE_SIGNING:
 #ifdef MOZ_REQUIRE_SIGNING
   true,
 #else
   false,
 #endif
 
+  INSTALL_COMPACT_THEMES:
+#ifdef INSTALL_COMPACT_THEMES
+  true,
+#else
+  false,
+#endif
+
   MENUBAR_CAN_AUTOHIDE:
 #ifdef MENUBAR_CAN_AUTOHIDE
   true,
 #else
   false,
 #endif
 
   CAN_DRAW_IN_TITLEBAR:
--- a/toolkit/modules/moz.build
+++ b/toolkit/modules/moz.build
@@ -98,16 +98,17 @@ EXTRA_JS_MODULES += [
     'UpdateUtils.jsm',
     'WebChannel.jsm',
     'WindowDraggingUtils.jsm',
     'ZipUtils.jsm',
 ]
 EXTRA_JS_MODULES.third_party.jsesc += ['third_party/jsesc/jsesc.js']
 EXTRA_JS_MODULES.sessionstore += ['sessionstore/Utils.jsm']
 
+DEFINES['INSTALL_COMPACT_THEMES'] = 1
 if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'cocoa'):
     DEFINES['CAN_DRAW_IN_TITLEBAR'] = 1
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'gtk2', 'gtk3'):
     DEFINES['MENUBAR_CAN_AUTOHIDE'] = 1
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'gtk2', 'gtk3', 'cocoa'):
     DEFINES['HAVE_SHELL_SERVICE'] = 1