diff --git a/content/treestyletab/res/tabFx2Compatible.css b/content/treestyletab/res/tabFx2Compatible.css index b6590ae0..a9d5e4cc 100644 --- a/content/treestyletab/res/tabFx2Compatible.css +++ b/content/treestyletab/res/tabFx2Compatible.css @@ -1,10 +1,10 @@ @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); -tabbrowser[tabFx2Compatible="true"] .tabbrowser-tab { +:root[tabFx2Compatible="true"] .tabbrowser-tab { -moz-binding: url(tabFx2Compatible.xml#tabbrowser-tab) !important; } -tabbrowser[tabFx2Compatible="true"] .tabbrowser-tab[busy] > hbox > stack > .tab-icon-image { +:root[tabFx2Compatible="true"] .tabbrowser-tab[busy] > hbox > stack > .tab-icon-image { list-style-image: url("chrome://global/skin/throbber/Throbber-small.gif") !important; opacity: 0.6; } diff --git a/content/treestyletab/res/tabFx2Compatible.xul b/content/treestyletab/res/tabFx2Compatible.xul index d010a705..2b17002a 100644 --- a/content/treestyletab/res/tabFx2Compatible.xul +++ b/content/treestyletab/res/tabFx2Compatible.xul @@ -12,7 +12,7 @@ window.addEventListener('DOMContentLoaded', function() { switch (window.getComputedStyle(b.selectedTab, '').getPropertyValue('-moz-binding')) { case 'url(chrome://browser/content/tabbrowser.xml#tabbrowser-tab)': - b.setAttribute('tabFx2Compatible', true); + document.documentElement.setAttribute('tabFx2Compatible', true); break; } }, true); diff --git a/content/treestyletab/treestyletabbrowser.js b/content/treestyletab/treestyletabbrowser.js index 7121e36f..7edb7617 100644 --- a/content/treestyletab/treestyletabbrowser.js +++ b/content/treestyletab/treestyletabbrowser.js @@ -418,13 +418,6 @@ TreeStyleTabBrowser.prototype = { initTabContents : function(aTab) { var icon = document.getAnonymousElementByAttribute(aTab, 'class', 'tab-icon'); - if (!icon) { // retry after a while - window.setTimeout(function(aSelf, aTab) { - aSelf.initTabContents(aTab); - }, 100, this, aTab); - return; - } - var label = this.getTabLabel(aTab); var close = this.getTabClosebox(aTab); var counter = document.getAnonymousElementByAttribute(aTab, 'class', this.kCOUNTER_CONTAINER); @@ -470,12 +463,6 @@ TreeStyleTabBrowser.prototype = { var label = this.getTabLabel(aTab); var close = this.getTabClosebox(aTab); var counter = document.getAnonymousElementByAttribute(aTab, 'class', this.kCOUNTER_CONTAINER); - if (!counter) { // retry after a while - window.setTimeout(function(aSelf, aTab) { - aSelf.initTabContentsOrder(aTab); - }, 100, this, aTab); - return; - } var nodes = document.getAnonymousNodes(aTab); for (var i = nodes.length-1; i > -1; i--)