ダミーのタブかどうかの判別を別メソッドに
git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@4633 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
parent
b0a80ab2f4
commit
b236986fb0
@ -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 */
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -240,5 +240,7 @@ function test_cleanUpTabsArray()
|
||||
sv.registerTabFocusAllowance(func)
|
||||
sv.registerExpandTwistyAreaAllowance(func)
|
||||
|
||||
sv.isGroupTab(tab)
|
||||
|
||||
*/
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user