Bug 581813 - Firefox with Tab Candy caused the Title and Tab Bars or the Menu and Tab Bars to appear black in colour
authorEdward Lee <edilee@mozilla.com>
Thu, 12 Aug 2010 09:38:21 -0700
changeset 50343 874090a047df65424fecb72ddba91a9b119f158f
parent 50342 7e54fcbcd2afccec273d2db1ac9843af2ed61ce7
child 50344 afc8db64e5bcb1fe297d108eb6220553432251b3
push idunknown
push userunknown
push dateunknown
bugs581813, 586679
milestone2.0b4pre
Bug 581813 - Firefox with Tab Candy caused the Title and Tab Bars or the Menu and Tab Bars to appear black in colour Push the TabView iframe down behind the tabbrowser when hiding TabView and restore the max height on show. This has slight issues in that it squishes the iframe contents as well as flashes black as we animate. Followup in bug 586679.
browser/base/content/tabview/ui.js
--- a/browser/base/content/tabview/ui.js
+++ b/browser/base/content/tabview/ui.js
@@ -297,16 +297,20 @@ var UIManager = {
     var currentTab = this._currentTab;
     var item = null;
 
     this._reorderTabItemsOnShow.forEach(function(groupItem) {
       groupItem.reorderTabItemsBasedOnTabOrder();
     });
     this._reorderTabItemsOnShow = [];
 
+#ifdef XP_WIN
+    // Restore the full height when showing TabView
+    gTabViewFrame.style.marginTop = 0;
+#endif
     gTabViewDeck.selectedIndex = 1;
     gTabViewFrame.contentWindow.focus();
 
     gBrowser.updateTitlebar();
 #ifdef XP_MACOSX
     this._setActiveTitleColor(true);
 #endif
     let event = document.createEvent("Events");
@@ -349,16 +353,22 @@ var UIManager = {
 
     TabItems.pausePainting();
 
     this._reorderTabsOnHide.forEach(function(groupItem) {
       groupItem.reorderTabsBasedOnTabItemOrder();
     });
     this._reorderTabsOnHide = [];
 
+#ifdef XP_WIN
+    // Push the top of TabView frame to behind the tabbrowser, so glass can show
+    // XXX bug 586679: avoid shrinking the iframe and squishing iframe contents
+    // as well as avoiding the flash of black as we animate out
+    gTabViewFrame.style.marginTop = gBrowser.boxObject.y + "px";
+#endif
     gTabViewDeck.selectedIndex = 0;
     gBrowser.contentWindow.focus();
 
     // set the close button on tab
     gBrowser.tabContainer.adjustTabstrip();
 
     gBrowser.updateTitlebar();
 #ifdef XP_MACOSX