Dragging and dropping a bookmark in Chevron makes wrong order.

RESOLVED FIXED in Firefox 15

Status

()

Firefox
Bookmarks & History
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: Alice0775 White, Assigned: mak)

Tracking

({regression})

13 Branch
Firefox 15
regression
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 1 obsolete attachment)

(Reporter)

Description

5 years ago
Build Identifier:
http://hg.mozilla.org/releases/mozilla-beta/rev/168f3814b32e
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20100101 Firefox/13.0 ID:20120501201020

Dragging and dropping a bookmark in Chevron makes wrong order.

Bug 731563 and bug 734646 triggered this problem.

Reproducible: Always

Steps to Reproduce:
1. Add bookmarks and shrink window width so that chevron popup contains as follows
aaaaaaaaaaaaaaaaaaaaaaa
bbbbbbbbbbbbbbbbbbbbbbb
ccccccccccccccccccccccc

2. Drag and drop ccccccccccccccccccccccc to between aaaaaaaaaaaaaaaaaaaaaaa and bbbbbbbbbbbbbbbbbbbbbbb

Actual Results:
bbbbbbbbbbbbbbbbbbbbbbb
ccccccccccccccccccccccc
aaaaaaaaaaaaaaaaaaaaaaa

Expand window width, you can see correct order.
aaaaaaaaaaaaaaaaaaaaaaa ccccccccccccccccccccccc bbbbbbbbbbbbbbbbbbbbbbb


Expected Results:  
aaaaaaaaaaaaaaaaaaaaaaa
ccccccccccccccccccccccc
bbbbbbbbbbbbbbbbbbbbbbb
(Reporter)

Comment 1

5 years ago
This problem also exists in Aurora14.0a2 and Nigtly15.0a1.
(Reporter)

Comment 2

5 years ago
Created attachment 622651 [details]
json backup if necessary
(Assignee)

Updated

5 years ago
Assignee: nobody → mak77
(Assignee)

Comment 3

5 years ago
The problem is this code:
http://mxr.mozilla.org/mozilla-central/source/browser/components/places/content/browserPlacesViews.js#1245
that is using wrong indices (with the _startMarker those should be increased by 1), making a patch that uses the right indices is trivial.

Though, the fact is that I don't see why we need that code at all, the chevron view should update quite fine by itself, indeed commenting it out everything works like a charm. I wonder if it's just something inherited from a past where the chevron was not a view. Taking a deeper look at old blame, but I think I'll just remove that code...
(Assignee)

Comment 4

5 years ago
Funny, I added that code in bug 418671, like 4 years ago.  The reason is updateChevron was synchronous at that time, the toolbar gets the nodeMoved before the chevron, and calls updateChevron, then the menu gets nodeMoved and does the actual nodes exchange, at this point in the old code updateChevron had made its work already, so the visible/hidden nodes status was out of sync.

Now instead, updateChevron is fired on a 100ms timer, this means by the time it runs the menu already got nodeMoved, so the proper nodes are made visible/hidden.
I don't really think we plan to go back to the synchronous behavior, so I'll remove the code and stick a nice comment about what we should do and why we don't need to.
(Assignee)

Comment 5

5 years ago
Created attachment 622956 [details] [diff] [review]
patch v1.0

I think this is actually even better than the old approach, the menu view has better knowledge of itself than someone else.
I also think making a test here would be tricky, not impossible but the time to make it proper is not worth it.
Attachment #622956 - Flags: review?
(Assignee)

Comment 6

5 years ago
Created attachment 622957 [details] [diff] [review]
patch v1.0

sorry, attached the queue patch instead of the 8 lines of context ones.
Attachment #622956 - Attachment is obsolete: true
Attachment #622956 - Flags: review?
Attachment #622957 - Flags: review?
(Assignee)

Updated

5 years ago
Attachment #622957 - Flags: review? → review?(mano)
Attachment #622957 - Flags: review?(mano) → review+
(Assignee)

Comment 7

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/d80c83eefc1f
OS: Windows 7 → All
Hardware: x86 → All
Target Milestone: --- → Firefox 15
(Assignee)

Comment 8

5 years ago
I'm not going to ask approval here, even if this would be a safe fix, there is not need to rush it since there is dataloss, just some broken ordering (and it's easy to fix the order in the library or sidebar)
(Assignee)

Comment 9

5 years ago
"since there is NO dataloss"
https://hg.mozilla.org/mozilla-central/rev/d80c83eefc1f
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.