зеркало из https://github.com/mozilla/pjs.git
Bug 411803 - Middle-clicking a folder doesn't work, unless the bookmark items have been shown. r=dietrich.
This commit is contained in:
Родитель
5cba1a7f6b
Коммит
6c55a1679c
|
@ -1604,26 +1604,35 @@ var PlacesUtils = {
|
|||
}
|
||||
}
|
||||
else {
|
||||
let result, oldViewer;
|
||||
let result, oldViewer, wasOpen;
|
||||
try {
|
||||
let wasOpen = aNode.containerOpen;
|
||||
result = aNode.parentResult;
|
||||
oldViewer = result.viewer;
|
||||
if (!wasOpen) {
|
||||
result = aNode.parentResult;
|
||||
oldViewer = result.viewer;
|
||||
result.viewer = null;
|
||||
aNode.containerOpen = true;
|
||||
}
|
||||
for (let i = 0; i < aNode.childCount; ++i) {
|
||||
// Include visible url nodes only
|
||||
let child = aNode.getChild(i);
|
||||
if (child.viewIndex != -1 && this.nodeIsURI(child))
|
||||
urls.push({uri: child.uri, isBookmark: this.nodeIsBookmark(child)});
|
||||
if (this.nodeIsURI(child)) {
|
||||
// If the node contents is visible, add the uri only if its node is
|
||||
// visible. Otherwise follow viewer's collapseDuplicates property,
|
||||
// default to true
|
||||
if ((wasOpen && oldViewer && child.viewIndex != -1) ||
|
||||
(oldViewer && !oldViewer.collapseDuplicates) ||
|
||||
urls.indexOf(child.uri) == -1) {
|
||||
urls.push({ uri: child.uri,
|
||||
isBookmark: this.nodeIsBookmark(child) });
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!wasOpen)
|
||||
aNode.containerOpen = false;
|
||||
}
|
||||
finally {
|
||||
if (oldViewer)
|
||||
if (!wasOpen)
|
||||
result.viewer = oldViewer;
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче