Collect strongly related codes
This commit is contained in:
parent
1746dbbff6
commit
eda95c427a
@ -2932,31 +2932,29 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
this._closeChildTabs(tab);
|
this._closeChildTabs(tab);
|
||||||
|
|
||||||
var toBeClosedSibling = this._reserveCloseNeedlessGroupTabSibling(tab);
|
var toBeClosedSibling = this._reserveCloseNeedlessGroupTabSibling(tab);
|
||||||
|
|
||||||
var firstChild = this.getFirstChildTab(tab);
|
|
||||||
var parentTab = this.getParentTab(tab);
|
|
||||||
var nextFocusedTab = null;
|
var nextFocusedTab = null;
|
||||||
|
|
||||||
this._saveAndUpdateReferenceTabsInfo(tab);
|
this._saveAndUpdateReferenceTabsInfo(tab);
|
||||||
|
|
||||||
var indentModifiedTabs = [];
|
var firstChild = this.getFirstChildTab(tab);
|
||||||
|
|
||||||
if (firstChild) {
|
if (firstChild) {
|
||||||
let children = this.getChildTabs(tab);
|
let children = this.getChildTabs(tab);
|
||||||
indentModifiedTabs = indentModifiedTabs.concat(
|
|
||||||
closeParentBehavior == this.kCLOSE_PARENT_BEHAVIOR_PROMOTE_FIRST_CHILD ?
|
|
||||||
[children[0]] :
|
|
||||||
children
|
|
||||||
);
|
|
||||||
this.detachAllChildren(tab, {
|
this.detachAllChildren(tab, {
|
||||||
behavior : closeParentBehavior,
|
behavior : closeParentBehavior,
|
||||||
dontUpdateIndent : true
|
dontUpdateIndent : true
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (closeParentBehavior == this.kCLOSE_PARENT_BEHAVIOR_PROMOTE_FIRST_CHILD)
|
||||||
|
this.updateTabsIndentWithDelay(children.slice(0, 1));
|
||||||
|
else
|
||||||
|
this.updateTabsIndentWithDelay(children);
|
||||||
|
|
||||||
if (closeParentBehavior == this.kCLOSE_PARENT_BEHAVIOR_PROMOTE_ALL_CHILDREN ||
|
if (closeParentBehavior == this.kCLOSE_PARENT_BEHAVIOR_PROMOTE_ALL_CHILDREN ||
|
||||||
closeParentBehavior == this.kCLOSE_PARENT_BEHAVIOR_PROMOTE_FIRST_CHILD)
|
closeParentBehavior == this.kCLOSE_PARENT_BEHAVIOR_PROMOTE_FIRST_CHILD)
|
||||||
nextFocusedTab = firstChild;
|
nextFocusedTab = firstChild;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var parentTab = this.getParentTab(tab);
|
||||||
if (parentTab) {
|
if (parentTab) {
|
||||||
let firstSibling = this.getFirstChildTab(parentTab);
|
let firstSibling = this.getFirstChildTab(parentTab);
|
||||||
let lastSibling = this.getLastChildTab(parentTab);
|
let lastSibling = this.getLastChildTab(parentTab);
|
||||||
@ -2995,8 +2993,6 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
nextFocusedTab = this.getNextFocusedTab(tab);
|
nextFocusedTab = this.getNextFocusedTab(tab);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (indentModifiedTabs.length)
|
|
||||||
this.updateTabsIndentWithDelay(indentModifiedTabs);
|
|
||||||
this.checkTabsIndentOverflow();
|
this.checkTabsIndentOverflow();
|
||||||
|
|
||||||
this._restoreTabAttributes(tab, backupAttributes);
|
this._restoreTabAttributes(tab, backupAttributes);
|
||||||
|
Loading…
Reference in New Issue
Block a user