Bug 1314091 - We don't need to use inferBrightness anymore since the lwt colors are part of the definition draft
authorBrian Grinstead <bgrinstead@mozilla.com>
Thu, 05 Jan 2017 14:27:40 -0600
changeset 456496 dfe08342e757cb749148e017f31442f21f937e13
parent 456495 a73b36a68e2cc4ad4b03efc7a3ed96687fd6416a
child 541248 db36f93466512356b7c3922a3726077d2e15a74c
push id40521
push userbgrinstead@mozilla.com
push dateThu, 05 Jan 2017 20:28:43 +0000
bugs1314091
milestone53.0a1
Bug 1314091 - We don't need to use inferBrightness anymore since the lwt colors are part of the definition This is the same reason we can back out the _updateLWTBrightness patch earlier in the series. The compact themes are now split into two, instead of the devedition theme which was a single lwt that could be either dark or light. MozReview-Commit-ID: 4gKU68drlE2
browser/base/content/browser-compacttheme.js
--- a/browser/base/content/browser-compacttheme.js
+++ b/browser/base/content/browser-compacttheme.js
@@ -58,41 +58,28 @@ var CompactTheme = {
         this._toggleStyleSheet(newTheme.id);
       } else {
         this._toggleStyleSheet(null);
       }
 
     }
   },
 
-  _inferBrightness() {
-    ToolbarIconColor.inferFromText();
-
-    if (this.isStyleSheetEnabled) {
-      if (this.isCurrentThemeIdDark) {
-        document.documentElement.setAttribute("brighttitlebarforeground", "true");
-      } else {
-        document.documentElement.removeAttribute("brighttitlebarforeground");
-      }
-    }
-  },
-
   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(currentThemeId) {
     let wasEnabled = this.isStyleSheetEnabled;
     if (currentThemeId) {
       // If this is called at startup, we haven't had a chance to set currentThemeId.
       // We only get here in this case if LightweightThemeManager.currentTheme is already