Closed Bug 449730 Opened 16 years ago Closed 15 years ago

favicon doesn't show up when dragging a tab between browser windows

Categories

(Firefox :: Tabbed Browser, defect, P2)

defect

Tracking

()

VERIFIED FIXED
Firefox 3.6a1

People

(Reporter: smaug, Assigned: john.p.baker)

References

Details

(Keywords: regression, verified1.9.1)

Attachments

(2 files, 6 obsolete files)

Load a page with favicon (for example www.mozilla.org) and drag the tab to
some other window. The tab and location bar have just the default favicon, not
the one which was there in the first window.
Does tabbrowser rely on DOMLinkAdded event to update the favicon?
Blocks: 113934
No longer depends on: 113934
OS: Linux → All
Hardware: PC → All
Version: unspecified → Trunk
Flags: blocking-firefox3.1?
Flags: blocking-firefox3.1? → blocking-firefox3.1+
Works fine in Firefox 3.0.x but fails in Firefox 3.1 nightly builds. Adding missing regression flag.
Keywords: regression
also when we drag or detached tab while its loading the progress bar isnt updated and the tba not look busy
prioritizing at P2 given the high volume of dupes being filed about this.
Priority: -- → P2
Mano: please reassign back to nobody@moz if this isn't going to be part of the fix you're working up already, and if you won't have time to get to it.
Assignee: nobody → mano
Attached patch patch v1 (obsolete) — Splinter Review
This seems to be on the right track.

A couple of points:
1) I am not sure where the various tabs and browsers are valid so there may be a better location for the code.
2) There may be other attributes that need setting.
(In reply to comment #14)
> 1) I am not sure where the various tabs and browsers are valid so there may be
> a better location for the code.

In particular - see comment #2 which I overlooked

> ourBrowser.mIconURL = remoteBrowser.getBrowserForTab(aOtherTab).mIconURL;

should probably be in fieldsToSwap in swapDocShells
Attachment #360281 - Attachment is patch: true
Attached patch patch v2 (obsolete) — Splinter Review
Address my own point (1) apropos code location.

I don't now believe that mIconURL setting should be done in swapDocShells.
Attachment #360281 - Attachment is obsolete: true
Attached patch patch for 1.9.1 branch (obsolete) — Splinter Review
Although I think I am going in the right direction, the time between b3 and RC1 is not the time to be too adventurous [1]. Just implement comment #1 for the 1.9.1 branch.

I have left the check for busy in even though, as the progress listeners have just been set up, I doubt that it will ever be set; But I don't even want the possibility of a loading throbber with a page title.

[1] As well as the correct busy state, there are things like the feed icon and search button glow - but the correct status could easily get lost while dragging a loading tab.
Attached patch patch for 1.9.1 branch (obsolete) — Splinter Review
Sorry!
Attachment #360508 - Attachment is obsolete: true
Blocks: 477014
Attachment #360492 - Attachment is obsolete: true
Is the patch ready? You need to ask review, perhaps from mano.
attachment -> details -> review? <bugzilla-id-of-the-requestee>
Comment on attachment 360510 [details] [diff] [review]
patch for 1.9.1 branch

(In reply to comment #17)
> [1] As well as the correct busy state, there are things like the feed icon and
> search button glow - but the correct status could easily get lost while
> dragging a loading tab.

These have been spun off as bug 477014

(In reply to comment #19)
> Is the patch ready? You need to ask review, perhaps from mano.
> attachment -> details -> review? <bugzilla-id-of-the-requestee>

I wasn't sure what would be a polite delay for a response to comment #13
Attachment #360510 - Flags: review?(mano)
Putting up a patch is always polite. :)

Mano: ETA for review?
That patch doesn't look right to me.  It should update both mIconURLs, no?
Comment on attachment 360510 [details] [diff] [review]
patch for 1.9.1 branch

What Boris said.
Attachment #360510 - Flags: review?(mano) → review-
What other mIconURL is there to update?
Oh, I guess this always closes the other browser.  For some reason I thought that tabbrowser supported swapping two <browser>s in general....

In that case, the patch looks OK for the mIconURL part; no idea about the busy handling.
Comment on attachment 360510 [details] [diff] [review]
patch for 1.9.1 branch

Yes, I realized the context only after marking.

For the "busy" part, where is the "busy" attribute copied (and why isn't mIsBusy set there too).
AFAICT we don't copy the "busy" attribute - has that part been tested? If we did that, I think this patch would be good to go.

John, why don't you think mIconURL belongs in fieldsToSwap? It's not directly tied to the docShell, but it needs to be copied as well, so I think it makes sense to be there (though you might want to adjust the comment).
In reply to comment #27)
> AFAICT we don't copy the "busy" attribute - has that part been tested? If we
> did that, I think this patch would be good to go.

The problem is that there is other state held in tabbrowser (eg mIsBusy, mRequestCount) that might need to be kept in step. Which is why I filed bug 477104

> John, why don't you think mIconURL belongs in fieldsToSwap? It's not directly
> tied to the docShell, but it needs to be copied as well, so I think it makes
> sense to be there (though you might want to adjust the comment).

Mainly as it wasn't tied to the docShell, but I am happy either way.
Ah, right, I forgot about bug 477014. In that case, this bug can just cover adding mIconURL to fieldsToSwap, right? Do you want to write that patch?
Attached patch patch v3 (obsolete) — Splinter Review
Moves copy (now swap) of mIconURL into swapDocShells. This patch is now as described in comment #27 [I'll look at simplified patch, without setting busy attribute, later today]
Attached patch patch for 1.9.1 branch (obsolete) — Splinter Review
I still feel that checking the busy state for setTabTitle/setTabTitleLoading is technically correct - updateIcon will use it to decide between throbber and favicon and I want the title to match correctly - even though we are pretty sure _at the moment_ that it is never set.
Attachment #360510 - Attachment is obsolete: true
Attachment #361490 - Flags: review?(gavin.sharp)
Why isn't mIsBusy also swapped?
I thought we'd agreed to deal with load-related state in bug 477014, rather than in this bug. The fix the case of dragging an already-loaded tab to a new window, the mIconURL change and the addition of the call to updateIcon() is all that's needed, right? I'm trying to simplify this fix so that we can get it landed as soon as possible and fix the common case without having to sort out the more complicated issues related to loading state in bug 477014.

I'll r+ a patch that just includes the mIconURL and updateIcon() changes (as well as the comment change above fieldsToSwap, perhaps just adding "or related to the loaded page").
Attached patch trunk patchSplinter Review
(In reply to comment #33)
>
> I'll r+ a patch that just includes the mIconURL and updateIcon() changes (as
> well as the comment change above fieldsToSwap, perhaps just adding "or related
> to the loaded page").

I'm all for getting this off the radar. Patch as described in comment #1 (trunk).
Attachment #361778 - Flags: review?(gavin.sharp)
Attached patch branch patchSplinter Review
Patch as described in comment #1 (1.9.1 branch).
Attachment #361490 - Attachment is obsolete: true
Attachment #361490 - Flags: review?(gavin.sharp)
Attachment #361778 - Flags: review?(gavin.sharp) → review+
Thanks, John.
Assignee: mano → john.p.baker
http://hg.mozilla.org/mozilla-central/rev/04dfbaa7ed66
http://hg.mozilla.org/releases/mozilla-1.9.1/rev/1af81db46cc5
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 3.2a1
Verified fixed on trunk and 1.9.1 branch with builds on OS X and Windows:

Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b3pre) Gecko/20090213 Shiretoko/3.1b3pre

Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2a1pre) Gecko/20090213 Minefield/3.2a1pre
Status: RESOLVED → VERIFIED
Attachment #361480 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: