Middle-clicking a folder doesn't work, unless the bookmark items have been shown

VERIFIED FIXED in Firefox 3 beta3

Status

()

Firefox
Bookmarks & History
VERIFIED FIXED
10 years ago
8 years ago

People

(Reporter: Martijn Wargers (dead), Assigned: mano)

Tracking

({regression})

Trunk
Firefox 3 beta3
x86
Windows XP
regression
Points:
---
Bug Flags:
blocking-firefox3 +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 2 obsolete attachments)

(Reporter)

Description

10 years ago
When middle-clicking on a bookmark folder, the bookmark items don't open in new tabs, unless the contents of that bookmark folder has been shown before.

Regression range:
http://bonsai.mozilla.org/cvsquery.cgi?module=PhoenixTinderbox&date=explicit&mindate=1199859180&maxdate=1199861339
I guess a regression from bug 409998.
Flags: blocking-firefox3?
Created attachment 296450 [details] [diff] [review]
patch
Assignee: nobody → mano
Status: NEW → ASSIGNED
Attachment #296450 - Flags: review?(dietrich)
Target Milestone: --- → Firefox 3 M11
Created attachment 296453 [details] [diff] [review]
v1.1
Attachment #296450 - Attachment is obsolete: true
Attachment #296453 - Flags: review?(dietrich)
Attachment #296450 - Flags: review?(dietrich)

Comment 3

10 years ago
Comment on attachment 296453 [details] [diff] [review]
v1.1

A drive-by comment:

>       try {
>         let wasOpen = aNode.containerOpen;
> [...]
>       }
>       finally {
>+        if (!wasOpen)

wasOpen doesn't exist at this point, as it's restricted to the try block.
Created attachment 296591 [details] [diff] [review]
v1.2

Thanks Simon.
Attachment #296453 - Attachment is obsolete: true
Attachment #296591 - Flags: review?(dietrich)
Attachment #296453 - Flags: review?(dietrich)
Comment on attachment 296591 [details] [diff] [review]
v1.2

>Index: browser/components/places/content/utils.js
>===================================================================
>RCS file: /cvsroot/mozilla/browser/components/places/content/utils.js,v
>retrieving revision 1.94
>diff -u -p -8 -r1.94 utils.js
>--- browser/components/places/content/utils.js	9 Jan 2008 06:32:30 -0000	1.94
>+++ browser/components/places/content/utils.js	11 Jan 2008 20:52:19 -0000
>@@ -1599,36 +1599,45 @@ var PlacesUtils = {
>       let contents = this.getFolderContents(aNode.itemId, false, false).root;
>       for (let i = 0; i < contents.childCount; ++i) {
>         let child = contents.getChild(i);
>         if (this.nodeIsURI(child))
>           urls.push({uri: child.uri, isBookmark: this.nodeIsBookmark(child)});
>       }
>     }
>     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 collpaseDuplicates property,

nit: s/collpase/collapse/

r=me otherwise
Attachment #296591 - Flags: review?(dietrich) → review+

Updated

10 years ago
Flags: blocking-firefox3? → blocking-firefox3+
mozilla/browser/components/places/content/utils.js 1.95
Status: ASSIGNED → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED

Comment 7

10 years ago
verified fix in Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.9b3) Gecko/2008020514 Firefox/3.0b3
Status: RESOLVED → VERIFIED
Bug 451915 - move Firefox/Places bugs to Firefox/Bookmarks and History. Remove all bugspam from this move by filtering for the string "places-to-b-and-h".

In Thunderbird 3.0b, you do that as follows:
Tools | Message Filters
Make sure the correct account is selected. Click "New"
Conditions: Body   contains   places-to-b-and-h
Change the action to "Delete Message".
Select "Manually Run" from the dropdown at the top.
Click OK.

Select the filter in the list, make sure "Inbox" is selected at the bottom, and click "Run Now". This should delete all the bugspam. You can then delete the filter.

Gerv
Component: Places → Bookmarks & History
QA Contact: places → bookmarks
You need to log in before you can comment on or make changes to this bug.