Bug 591853 - Optimize chrome layer size with lightweight themes with transparent or no footer images. r=enn
authorDão Gottwald <dao@mozilla.com>
Sat, 04 Sep 2010 10:46:14 +0200
changeset 52007 fdf0111f1a56ac11da9f7f0dcbd44035f366d3f2
parent 52006 2396696f1631b391f50c113ca4064b36e7bda4c3
child 52008 19cd237c24b0079c7a0e4e2be57ec6051b1fe622
push idunknown
push userunknown
push dateunknown
reviewersenn
bugs591853
milestone2.0b6pre
Bug 591853 - Optimize chrome layer size with lightweight themes with transparent or no footer images. r=enn
browser/themes/gnomestripe/browser/browser.css
toolkit/content/LightweightThemeConsumer.jsm
--- a/browser/themes/gnomestripe/browser/browser.css
+++ b/browser/themes/gnomestripe/browser/browser.css
@@ -63,17 +63,17 @@
 }
 
 #navigator-toolbox[inFullscreen="true"],
 #navigator-toolbox[inFullscreen="true"] > #nav-bar {
   border-top: none;
   padding-top: 0;
 }
 
-#browser-bottombox:not([lwthemefooter="true"]) {
+#browser-bottombox {
   /* opaque for layers optimization */
   background-color: -moz-Dialog;
 }
 
 #urlbar:-moz-lwtheme:not([focused="true"]),
 .searchbar-textbox:-moz-lwtheme:not([focused="true"]),
 .tabbrowser-tab:-moz-lwtheme:not([selected="true"]) {
   opacity: .85;
--- a/toolkit/content/LightweightThemeConsumer.jsm
+++ b/toolkit/content/LightweightThemeConsumer.jsm
@@ -84,16 +84,17 @@ LightweightThemeConsumer.prototype = {
       root.style.backgroundColor = "";
       root.removeAttribute("lwthemetextcolor");
       root.removeAttribute("lwtheme");
     }
 
     _setImage(root, active, aData.headerURL);
     if (this._footerId) {
       let footer = this._doc.getElementById(this._footerId);
+      footer.style.backgroundColor = active ? aData.accentcolor || "white" : "";
       _setImage(footer, active, aData.footerURL);
       if (active && aData.footerURL)
         footer.setAttribute("lwthemefooter", "true");
       else
         footer.removeAttribute("lwthemefooter");
     }
 
 #ifdef XP_MACOSX