Closed Bug 451499 Opened 16 years ago Closed 16 years ago

wrong folder icon appears on smart bookmarks

Categories

(Firefox :: Bookmarks & History, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED
Firefox 3.5

People

(Reporter: bugmozz, Assigned: mak)

Details

(Whiteboard: [has patch])

Attachments

(3 files)

Attached image screenshot
similar bug, bug 411966

no STR, the icon turns into a different one suddenly.
but this is fixed after restart.
do you have any tag or is that container empty?
Attached image screenshot
nothing.

this happens with new/clean profile.
i cant' reproduce... hwv this can't be due to redirects, appear related only to smart bookmarks, that's quite strange since they should have a null favicon_id and icon assigned through an attribute :\
this happens after browsing some bookmarked sites.
but I have no idea when this happens, after one site, after ten sites ....
I'm suffering from this occasionally and I tried to find STR with similarly nothing came up.
BUT two observations:

1. The favicon changes at exactly the same moment when page is added to history

2. According to DOMi, the menu node (class "menu-iconic bookmark-item") gets a new attribute "image" whose value becomes (icon from w3 schools bookmark) "moz-anno:favicon:http://www.w3schools.com/favicon.ico".

Neighbouring "recent tags", which by random chance did not get a favicon this time around, doesn't have this "image" attribute at all. 

Hopefully that helps.
(In reply to comment #5)
> 1. The favicon changes at exactly the same moment when page is added to history

yes i see this, it happens on lazy timer (so after about 3s a visit is added)

> 2. According to DOMi, the menu node (class "menu-iconic bookmark-item") gets a
> new attribute "image" whose value becomes (icon from w3 schools bookmark)
> "moz-anno:favicon:http://www.w3schools.com/favicon.ico".

and that should not happen

i clearly see this, i'm trying to get some consistent STR. for now i've seen this often when visiting feed children from bookmarks menu.
this *could* be a regression from bug 433317.

My theory is that when nsNavHistoryQueryResultNode::OnItemChanged is called we call nsNavHistoryResultNode::OnItemChanged. if property is favicon of an itemId inside the container we do mFaviconURI = aValue and the place: query favicon changes.

The problem is finding why this happens for favicons
Assignee: nobody → mak77
Status: NEW → ASSIGNED
Not exactly a regression but that change made this visible.

When opening a nsNavHistoryQueryResultNode QUERY_TYPE_BOOKMARKS we add an AllBookmarksObserver. 

If a favicon lazy messages is executed while the container is open the nsNavHistoryQueryResultNode, as an AllBookmarksObserver, gets a onItemChanged with ATTRIBUTE_FAVICON, this request is forwarded to the underlying nsNavHistoryResult and the query gets the favicon.

I created the testcase before, finding the problem and reproducing it took some time, but the test is working (failing) as expected.

My fix is making nsNavHistoryResultNode::itemChanged working only for aItemId = mItemId, changing queryResultNode globals (favicon, title, and so on) because one of its child has changed does not appear correct.

PS: bug 433317 is missing the testcase check-in, i've however tested this patch against that test too.
Attachment #336398 - Flags: review?(dietrich)
asking blocking for possible view corruptions
Flags: blocking-firefox3.1?
OS: Windows XP → All
Hardware: PC → All
Whiteboard: [has patch][needs review dietrich]
Attachment #336398 - Flags: review?(dietrich) → review+
Comment on attachment 336398 [details] [diff] [review]
patch + unit test

r=me thanks
Flags: in-testsuite?
Whiteboard: [has patch][needs review dietrich] → [has patch]
Target Milestone: --- → Firefox 3.1
Summary: wrong folder icon appears [Recently Bookmarked/Recent Tags] → wrong folder icon appears on smart bookmarks
http://hg.mozilla.org/mozilla-central/rev/3065c0039e4d
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Flags: in-testsuite?
Flags: in-testsuite+
Flags: blocking-firefox3.1?
Resolution: --- → FIXED
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b1pre) Gecko/20080907032646 Minefield/3.1b1pre

seems to be fine.
verified: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.1b2pre) Gecko/20081112 Minefield/3.1b2pre
Status: RESOLVED → VERIFIED
Target Milestone: Firefox 3.1 → Firefox 3.5
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.

Attachment

General

Creator:
Created:
Updated:
Size: