ダミーのタブかどうかの判別を別メソッドに

git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@4633 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
piro 2009-07-06 03:07:44 +00:00
parent b0a80ab2f4
commit b236986fb0
3 changed files with 12 additions and 4 deletions

View File

@ -1058,6 +1058,14 @@ var TreeStyleTabService = {
XPathResult.NUMBER_TYPE
).numberValue;
},
isGroupTab : function(aTab)
{
return (
aTab.linkedBrowser.sessionHistory.count == 1 &&
aTab.linkedBrowser.currentURI.spec.indexOf('about:treestyletab-group') > -1
);
},
/* Session Store API */

View File

@ -1491,11 +1491,9 @@ TreeStyleTabBrowser.prototype = {
this.partTab(tab, true);
if (parentTab.linkedBrowser.sessionHistory.count == 1 &&
parentTab.linkedBrowser.currentURI.spec.indexOf('about:treestyletab-group') > -1 &&
!this.getDescendantTabs(parentTab).length) {
if (this.isGroupTab(parentTab) && !this.getDescendantTabs(parentTab).length) {
if (nextFocusedTab == parentTab)
nextFocusedTab = null;
nextFocusedTab = this.getNextSiblingTab(parentTab) || this.getPreviousSiblingTab(parentTab);
b.removeTab(parentTab);
}
}

View File

@ -240,5 +240,7 @@ function test_cleanUpTabsArray()
sv.registerTabFocusAllowance(func)
sv.registerExpandTwistyAreaAllowance(func)
sv.isGroupTab(tab)
*/