Add a comment to describe its design around promoting of children

This commit is contained in:
YUKI Hiroshi 2015-11-18 19:15:26 +09:00
parent 0ed972459b
commit ffd7c26150

View File

@ -5621,6 +5621,8 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
(!parentTab && closeParentBehavior == this.kCLOSE_PARENT_BEHAVIOR_PROMOTE_ALL_CHILDREN) ?
closeRootBehavior :
closeParentBehavior ;
// Promote all children to upper level, if this is the last child of the parent.
// This is similar to "taking by representation".
if (behavior == this.kCLOSE_PARENT_BEHAVIOR_PROMOTE_FIRST_CHILD &&
parentTab &&
this.getChildTabs(parentTab).length == 1)