typo修正+無駄な条件分岐を削除
git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@1872 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
parent
cfcd1e512d
commit
1a7b63afc9
@ -1830,29 +1830,27 @@ TreeStyleTabBrowser.prototype = {
|
||||
MultipleTabService.allowMoveMultipleTabs
|
||||
);
|
||||
|
||||
if (ownerWindow != window || moveSelection) {
|
||||
if (moveSelection) {
|
||||
draggedTabs = moveSelection ? ownerWindow.MultipleTabService.getSelectedTabs(ownerBrowser);
|
||||
if (!(aInfo.action & this.kACTION_DUPLICATE)) {
|
||||
draggedRoots = [];
|
||||
draggedTabs.forEach(function(aTab) {
|
||||
var parent = aTab,
|
||||
current;
|
||||
do {
|
||||
current = parent;
|
||||
parent = ownerBrowser.treeStyleTab.getParentTab(parent)
|
||||
if (parent && ownerWindow.MultipleTabService.isSelected(parent)) continue;
|
||||
draggedRoots.push(current);
|
||||
return;
|
||||
}
|
||||
while (parent);
|
||||
});
|
||||
}
|
||||
}
|
||||
else {
|
||||
draggedTabs = draggedTabs.concat(ownerBrowser.treeStyleTab.getDescendantTabs(aDraggedTab));
|
||||
if (moveSelection) {
|
||||
draggedTabs = ownerWindow.MultipleTabService.getSelectedTabs(ownerBrowser);
|
||||
if (!(aInfo.action & this.kACTION_DUPLICATE)) {
|
||||
draggedRoots = [];
|
||||
draggedTabs.forEach(function(aTab) {
|
||||
var parent = aTab,
|
||||
current;
|
||||
do {
|
||||
current = parent;
|
||||
parent = ownerBrowser.treeStyleTab.getParentTab(parent)
|
||||
if (parent && ownerWindow.MultipleTabService.isSelected(parent)) continue;
|
||||
draggedRoots.push(current);
|
||||
return;
|
||||
}
|
||||
while (parent);
|
||||
});
|
||||
}
|
||||
}
|
||||
else if (ownerWindow != window) {
|
||||
draggedTabs = draggedTabs.concat(ownerBrowser.treeStyleTab.getDescendantTabs(aDraggedTab));
|
||||
}
|
||||
|
||||
if (aDraggedTab && aInfo.action & this.kACTION_PART) {
|
||||
if (!(aInfo.action & this.kACTION_DUPLICATE))
|
||||
|
Loading…
Reference in New Issue
Block a user