マルチプルタブハンドラなどで複数のタブを一括で閉じた後、インデントが崩れる問題を修正
git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@4348 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
parent
3fbc76f2ba
commit
d795802474
@ -1949,6 +1949,7 @@ catch(e) {
|
||||
{
|
||||
var newTabs = [];
|
||||
aTabs.forEach(function(aTab) {
|
||||
if (!aTab.parentNode) return; // ignore removed tabs
|
||||
if (newTabs.indexOf(aTab) < 0) newTabs.push(aTab);
|
||||
});
|
||||
newTabs.sort(function(aA, aB) {
|
||||
@ -1993,7 +1994,11 @@ catch(e) {
|
||||
}
|
||||
|
||||
var currentTabInfo;
|
||||
var tabsInfo = Array.slice(aTabs).map(function(aTab) {
|
||||
var tabsInfo = Array.slice(aTabs)
|
||||
.filter(function(aTab) {
|
||||
return aTab.parentNode; // ignore removed tabs
|
||||
})
|
||||
.map(function(aTab) {
|
||||
var webNav = aTab.linkedBrowser.webNavigation;
|
||||
var url = webNav.currentURI.spec;
|
||||
var name = '';
|
||||
|
@ -2587,6 +2587,7 @@ TreeStyleTabBrowser.prototype = {
|
||||
{
|
||||
this.mTabBrowser.movingSelectedTabs = true; // Multiple Tab Handler
|
||||
aTabs.forEach(function(aTab) {
|
||||
if (!aTab.parentNode) return; // ignore removed tabs
|
||||
if (aParent)
|
||||
this.attachTabTo(aTab, aParent);
|
||||
else
|
||||
@ -2600,6 +2601,7 @@ TreeStyleTabBrowser.prototype = {
|
||||
{
|
||||
this.mTabBrowser.movingSelectedTabs = true; // Multiple Tab Handler
|
||||
aTabs.forEach(function(aTab) {
|
||||
if (!aTab.parentNode) return; // ignore removed tabs
|
||||
this.partTab(aTab);
|
||||
this.collapseExpandTab(aTab, false);
|
||||
}, this);
|
||||
@ -2806,6 +2808,7 @@ TreeStyleTabBrowser.prototype = {
|
||||
var maxIndent = parseInt(aTabs[0].boxObject.height / 2);
|
||||
|
||||
Array.slice(aTabs).forEach(function(aTab) {
|
||||
if (!aTab.parentNode) return; // ignore removed tabs
|
||||
if (multirow) {
|
||||
indent = Math.min(aLevel * 3, maxIndent);
|
||||
var colors = '-moz-border-top-colors:'+(function(aNum) {
|
||||
@ -2842,7 +2845,7 @@ TreeStyleTabBrowser.prototype = {
|
||||
this.updateTabsIndentWithDelayTimer = window.setTimeout(function(aSelf) {
|
||||
var tabs = [];
|
||||
aSelf.updateTabsIndentWithDelayTabs.forEach(function(aTab) {
|
||||
if (tabs.indexOf(aTab) < 0) tabs.push(aTab);
|
||||
if (tabs.indexOf(aTab) < 0 && aTab.parentNode) tabs.push(aTab);
|
||||
});
|
||||
aSelf.updateTabsIndentWithDelayTabs = [];
|
||||
aSelf.updateTabsIndent(tabs);
|
||||
|
Loading…
Reference in New Issue
Block a user