Closed Bug 626976 Opened 14 years ago Closed 11 years ago

Firefox shows empty window on opening a link from external in minimized grouped tab view.

Categories

(Firefox Graveyard :: Panorama, defect, P3)

x86_64
Windows 7

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: notuptoyou, Unassigned)

References

Details

(Whiteboard: [ux][not-ready])

Attachments

(6 files, 8 obsolete files)

(deleted), image/png
Details
(deleted), video/ogg
Details
(deleted), image/jpeg
Details
(deleted), text/plain
Details
(deleted), patch
Details | Diff | Splinter Review
(deleted), image/png
sensemann.jb
: feedback+
Details
User-Agent:       Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b9) Gecko/20100101 Firefox/4.0b9
Build Identifier: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b9) Gecko/20100101 Firefox/4.0b9

Firefox is minimized to tray showing the "Tab Groups". The content of the window will be empty if you open a link in firefox from a external programm like skype or Word...

Reproducible: Always

Steps to Reproduce:
1. Verify Firefox is default Browser
2. Open new Firefox Window (Session)
3. Create second Tab
4. Click "Grouping Tabs"
5. Minimize View
6. Open a link from external (e.g. Skype conversation)
Actual Results:  
Firefox showing up without content.

Expected Results:  
Firefox showing up and opens the link in new tab

-
Component: Tabbed Browser → TabCandy
QA Contact: tabbed.browser → tabcandy
Version: unspecified → Trunk
Attached image Screenshot (deleted) —
I am observing the same problem. Windows 7, 32 bit. FF4b9
FWIW, this doesn't happen on Mac.

Marking confirmed based on comment 2.

Can someone check Linux?

Nominating for softblocker status.
Status: UNCONFIRMED → NEW
blocking2.0: --- → ?
Ever confirmed: true
Cannot reproduce on linux.
In retrospect, what was I thinking? Un-nominating blocker status. Would be nice to have, but we can definitely ship without this.
blocking2.0: ? → ---
Keywords: qawanted
Priority: -- → P3
Whiteboard: [nice-to-have][ux][good first bug]
(In reply to comment #5)
> In retrospect, what was I thinking?

"Massive fail when executing a standard browser operation is bad"?
(In reply to comment #6)
> (In reply to comment #5)
> > In retrospect, what was I thinking?
> 
> "Massive fail when executing a standard browser operation is bad"?

Oh wait, massive fail indeed. My apologies, I think I confused this with another bug. :(
blocking2.0: --- → ?
Attached video Video (works for me) (deleted) —
Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:2.0b10pre) Gecko/20110119 Firefox/4.0b10pre

I just tried to reproduce this, and am unable to. I tried it both with minimizing the window (I assume that means minimizing it and putting it in the taskbar) and not, but it's the same... it works for me.
Whiteboard: [nice-to-have][ux][good first bug] → [ux][good first bug]
Can you reproduce with beta9?

Can the reporter reproduce with a recent nightly?
Please don't add "good first bug" to bugs with unknown scope.
Whiteboard: [ux][good first bug] → [ux]
I checked on 4.0b10pre 1/23 windows 7 32 bit. Seems fixed.
Can we close this then?
Status: NEW → RESOLVED
blocking2.0: ? → ---
Closed: 14 years ago
Keywords: qawanted
Resolution: --- → WORKSFORME
The Problem is not solved in Beta 10. But I have to extend the Steps to reproduce as follows:

Steps to Reproduce:
1. Verify Firefox is default Browser
2. Open new Firefox Window (Session)
--> 4.1 Maxmize Window <--
3. Create second Tab
4. Click "Grouping Tabs"
5. Minimize View
6. Open a link from external (e.g. Skype conversation)
Actual Results:  
Firefox showing up without content (Screenshot attached).

Expected Results:  
Firefox showing up and opens the link in new tab
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
(In reply to comment #13)
> Created attachment 507827 [details]
> Reopened Window after open a link from external

Is that an ubuntu persona you're using, or is that your wallpaper?
(In reply to comment #15)
> (In reply to comment #13)
> > Created attachment 507827 [details]
> > Reopened Window after open a link from external
> Is that an ubuntu persona you're using, or is that your wallpaper?

it's an Ubuntu persona, not my Wallpaper. I will try it without using it, but i din't think that solves the Problem...
Attached file Video - linux (Work for me) (deleted) —
I've run the STR in comment 14 on ubuntu, windows XP and mac (4.012pre 2011-02-08) and I couldn't reproduce it.
Attachment #510965 - Attachment is patch: false
It's possible then that this is really limited to win7?
Keywords: qawanted
Whiteboard: [ux] → [ux][WFM?]
(In reply to comment #18)
> It's possible then that this is really limited to win7?

Can anyone with win7 verify that please?
I've managed to get a pc with Vista and tested it.  I can reproduce the STR in comment 0 if the menu bar is hidden the orange app menu is displayed).  If the menu bar is visible, the problem doesn't exist.

Do we do things differently when the menu bar is hidden?
Whiteboard: [ux][WFM?] → [ux]
I've used the DOM inspector to view the DOM and I've noticed that when Firefox is showing empty content, the titlebar has margin-bottom is bigger than 30000px.  It's probably something to do with code which set the margin-bottom for titlebar.
(In reply to comment #21)
> I've used the DOM inspector to view the DOM and I've noticed that when Firefox
> is showing empty content, the titlebar has margin-bottom is bigger than
> 30000px.  It's probably something to do with code which set the margin-bottom
> for titlebar.

Yep, somehow the bottom margin is not correctly calculated (probably because panorama is not taken into account). Verifying this on Win7.

http://mxr.mozilla.org/mozilla-central/source/browser/base/content/browser.js#5089
Blocks: 626527
Component: TabCandy → General
QA Contact: tabcandy → general
Assignee: nobody → tim.taubert
No longer blocks: 626527
Component: General → TabCandy
QA Contact: general → tabcandy
Attached patch patch v1 (obsolete) (deleted) — Splinter Review
Is there any way we can test this automatically? I verified this solution on my win 7 VM.
Attachment #512190 - Flags: review?(ian)
Passed try. Works on Windows 7.

http://tbpl.mozilla.org/?tree=MozillaTry&pusher=tim.taubert@gmx.de&rev=6be97d800dd9
Comment on attachment 512190 [details] [diff] [review]
patch v1

I don't know how you simulate an external link in a test. Perhaps this is a job for litmus?
Attachment #512190 - Flags: review?(ian) → review+
Has anyone sorted out what exactly is going on here? What exactly is the setTimeout waiting for and why is it a reliable solution?
Attached patch patch v2 (obsolete) (deleted) — Splinter Review
(In reply to comment #26)
> Has anyone sorted out what exactly is going on here? What exactly is the
> setTimeout waiting for and why is it a reliable solution?

Thanks for probing into, Dão. While searching for a good explanation I came up with a more reliable solution:

The problem is: when the browser windows is minimized we get window.screenX/Y = -30000px. So when minimized we'll have to wait until the browser window got activated again and trigger the calculation afterwards.
Attachment #512190 - Attachment is obsolete: true
Attachment #512743 - Flags: review?(ian)
Attached patch patch v3 (with test) (obsolete) (deleted) — Splinter Review
Test added. Sent to try with and without fix to verify the test is working as expected.
Attachment #512743 - Attachment is obsolete: true
Attachment #512755 - Flags: review?(ian)
Attachment #512743 - Flags: review?(ian)
Comment on attachment 512755 [details] [diff] [review]
patch v3 (with test)

Looks good to me; thanks for digging in deeper!
Attachment #512755 - Flags: review?(ian) → review+
Attached patch patch v4 (obsolete) (deleted) — Splinter Review
Try run with test and fix:

http://tbpl.mozilla.org/?tree=MozillaTry&pusher=tim.taubert@gmx.de&rev=cddeb88f95b1

Try run with test (but without fix):

http://tbpl.mozilla.org/?tree=MozillaTry&pusher=tim.taubert@gmx.de&rev=f80f8c5738df
Attachment #512755 - Attachment is obsolete: true
Attachment #513905 - Flags: review?(ian)
Comment on attachment 513905 [details] [diff] [review]
patch v4

>+  registerCleanupFunction(function () {
>+    window.restore();
>+    window.restore();
>+  });

Do we really need both of these restores?

>+  window.maximize();
>+  window.minimize();

Can you explain how this simulates the STR for this bug? I would think you would minimize and then restore, just based on the description of the bug.
(In reply to comment #31)
> Do we really need both of these restores?

The first restores the maximized state. The second the normal state.

> Can you explain how this simulates the STR for this bug? I would think you
> would minimize and then restore, just based on the description of the bug.

The test window is in normal state. So we first need to maximize it (tabs are drawn to the titlebar only in maximized state). After that we need to minimize it.
I think this should probably fixed in TabsInTitlebar in browser.js. It checks the sizemode attribute, but it looks like it should check window.windowState instead.
(In reply to comment #32)
> (In reply to comment #31)
> > Do we really need both of these restores?
> 
> The first restores the maximized state. The second the normal state.
> 
> > Can you explain how this simulates the STR for this bug? I would think you
> > would minimize and then restore, just based on the description of the bug.
> 
> The test window is in normal state. So we first need to maximize it (tabs are
> drawn to the titlebar only in maximized state). After that we need to minimize
> it.

Cool, thanks for explaining. 

Please address Dao's comment.
Attachment #513905 - Flags: feedback?(mitcho)
Attachment #513905 - Flags: review?(ian)
Attachment #513905 - Flags: feedback?(mitcho)
Attached patch patch v5 (obsolete) (deleted) — Splinter Review
(In reply to comment #33)
> I think this should probably fixed in TabsInTitlebar in browser.js. It checks
> the sizemode attribute, but it looks like it should check window.windowState
> instead.

Done. Passed try:

http://tbpl.mozilla.org/?tree=MozillaTry&pusher=tim.taubert@gmx.de&rev=c72c5c85cfbd
Attachment #513905 - Attachment is obsolete: true
Attachment #514446 - Flags: review?(dao)
Comment on attachment 514446 [details] [diff] [review]
patch v5

>-    // Don't trust the initial value of the sizemode attribute; wait for the resize event.
>+    // Don't trust the initial value of windowState; wait for the resize event.
>+    this.allowedBy("maximized", false);

Did you check if this is still necessary?

>   _update: function () {
>-    if (!this._initialized || window.fullScreen)
>+    if (!this._initialized)
>       return;

This doesn't regress bug 624123?
[bugspam: betaN -> final]

My instinct is to punt on this, but Dāo would have a better idea of whether we could land this post-betaN. Dāo, can you weigh in here? Should we punt at this time?
Blocks: 585689
No longer blocks: 627096
(In reply to comment #36)
> Did you check if this is still necessary?

Removed it and still passes.

> This doesn't regress bug 624123?

No, added a test for this bug.

(In reply to comment #37)
> My instinct is to punt on this, but Dāo would have a better idea of whether we
> could land this post-betaN. Dāo, can you weigh in here? Should we punt at this
> time?

I don't know if we get approval for this but I have a patch (still waiting for try) that I will attach later that fixes this and also bug 633816. It includes tests for both of them and a test for bug 624123. And the patch itself is rather small - I think we should give it a try...
Attached patch patch v6 (obsolete) (deleted) — Splinter Review
This also fixes bug 633816. Includes tests for bug 633816, bug 624123 and of course this bug.

Passed try:

http://tbpl.mozilla.org/?tree=MozillaTry&pusher=tim.taubert@gmx.de&rev=3e6b9f9e3f23
Attachment #514446 - Attachment is obsolete: true
Attachment #514615 - Flags: review?(dao)
Attachment #514446 - Flags: review?(dao)
Comment on attachment 514615 [details] [diff] [review]
patch v6

>-    // Don't trust the initial value of the sizemode attribute; wait for the resize event.
>-    this.allowedBy("sizemode", false);

>+    window.addEventListener("resize", function () {
>+      TabsInTitlebar.allowedBy("maximized",
>+                               window.windowState == window.STATE_MAXIMIZED);
>     }, false);

I think you need to call either TabsInTitlebar.allowedBy("maximized", false); or TabsInTitlebar.allowedBy("maximized", window.WindowState == ...); immediately, otherwise this effectively allows tabs in the titlebar until the resize event occurs the first time.
Attached patch patch v7 (obsolete) (deleted) — Splinter Review
(In reply to comment #40)
> I think you need to call either TabsInTitlebar.allowedBy("maximized", false);
> or TabsInTitlebar.allowedBy("maximized", window.WindowState == ...);
> immediately, otherwise this effectively allows tabs in the titlebar until the
> resize event occurs the first time.

Fixed. Passed try, too :)

http://tbpl.mozilla.org/?tree=MozillaTry&pusher=tim.taubert@gmx.de&rev=70484aae1dbf
Attachment #514615 - Attachment is obsolete: true
Attachment #514637 - Flags: review?(dao)
Attachment #514615 - Flags: review?(dao)
Comment on attachment 514637 [details] [diff] [review]
patch v7

Pushed to try to make sure the tests for bug 633816 and this one fail without the fix:

http://tbpl.mozilla.org/?tree=MozillaTry&pusher=tim.taubert@gmx.de&rev=3ad63326eea0
Comment on attachment 514637 [details] [diff] [review]
patch v7

>-    window.addEventListener("resize", function (event) {
>-      if (event.target != window)
>-        return;
>+    window.addEventListener("resize", function () {

You need to add a comment here that you're relying on the resize event for content windows for maximized<->fullscreen transitions.
Attachment #514637 - Flags: review?(dao) → review+
Comment on attachment 514637 [details] [diff] [review]
patch v7

> var TabsInTitlebar = {
>   init: function () {
> #ifdef CAN_DRAW_IN_TITLEBAR
>     this._readPref();
>     Services.prefs.addObserver(this._prefName, this, false);
> 
>-    // Don't trust the initial value of the sizemode attribute; wait for the resize event.
>-    this.allowedBy("sizemode", false);
>-    window.addEventListener("resize", function (event) {
>-      if (event.target != window)
>-        return;
>-      let sizemode = document.documentElement.getAttribute("sizemode");
>-      TabsInTitlebar.allowedBy("sizemode",
>-                               sizemode == "maximized" || sizemode == "fullscreen");
>+    this.allowedBy("maximized", window.windowState == window.STATE_MAXIMIZED);
>+    window.addEventListener("resize", function () {
>+      TabsInTitlebar.allowedBy("maximized",
>+                               window.windowState == window.STATE_MAXIMIZED);
>     }, false);
> 
>     this._initialized = true;

Oh, and you need to set this._initialized before calling this.allowedBy("maximized", window.windowState == window.STATE_MAXIMIZED).
Attached patch patch v8 (obsolete) (deleted) — Splinter Review
Passed try:

http://tbpl.mozilla.org/?tree=MozillaTry&pusher=tim.taubert@gmx.de&rev=836054423677

Thanks Dão for your reviews!

Note to approvers:

Very lightweight patch that fixes TabsOnTop display bugs for windows users. It includes two tests (for this bug and bug 633816). It includes a third test to make sure we don't regress bug 624123.
Attachment #514637 - Attachment is obsolete: true
Attachment #515141 - Flags: approval2.0?
Comment on attachment 515141 [details] [diff] [review]
patch v8

We can evaluate an approval after we ship, but for now any touching browser.js makes me nervous.
Attachment #515141 - Flags: approval2.0? → approval2.0-
Blocks: 603789
No longer blocks: 585689
Target Milestone: --- → Future
Comment on attachment 515141 [details] [diff] [review]
patch v8

>+    // this will also handle maximized <-> fullscreen transitions
>+    window.addEventListener("resize", function () {

The comment should be inside of the handler and mention how and why this handles maximized<->fullscreen.
Attached patch patch v9 (deleted) — Splinter Review
(In reply to comment #47)
> The comment should be inside of the handler and mention how and why this
> handles maximized<->fullscreen.

Done.
Attachment #515141 - Attachment is obsolete: true
(In reply to comment #48)
> Created attachment 516300 [details] [diff] [review]
> patch v9
> 
> (In reply to comment #47)
> > The comment should be inside of the handler and mention how and why this
> > handles maximized<->fullscreen.
> 
> Done.

Nope... You're still not saying what exactly is going on there. Specifically, when going from maximized to fullscreen, the event isn't dispatched to the global window, it merely bubbles up to it. This only works because you removed the (event.target != window) check.
I've a similar problem / effect, and I can give you an alternate way to reproduce.

I used FirefoxPortableTest_4.0_RC_1_English.paf from http://portableapps.com/
User Agent: Mozilla/5.0 (Windows NT 5.1; rv:2.0) Gecko/20100101 Firefox/4.0
OS: Windows XP SP3 professional, German.
Should I file a new Bug, because it's a different OS?

Reproducible: Always

Steps to Reproduce:
1. Verify Firefox is default Browser.
2. Start only one and new Firefox process (with or without -safe-mode don't makes differences).
3. Have only one tab open (Firefox default welcome site).
4. Hide Menu bar so you only have the new small orange Firefox menu button.
5. Disable "always show the tab bar" in options -> tabs.
5. Minimize Firefox window to task bar.
6. Open a link from external (e.g. Skype conversation, Thunderbird) 
Actual Results:  
Firefox showing up without content.

Expected Results:  
Firefox showing up and opens the link in new tab.

Differences to here shown Win7 screenshot: My Firefox window is not transparent it has complete grey background.
see screenshot WindowsXP_empty_window.png

PS:
Whiteboard: [ux] → [ux][not-ready]
bugspam
Target Milestone: Future → ---
No longer blocks: 603789
bugspam
No longer blocks: 653099
bugspam
Blocks: 660175
bugspam

(Fx7 was branched, removing open bugs from Fx7 meta bug, we won't create new meta bugs for upcoming Fx versions)
No longer blocks: 660175
Assignee: ttaubert → nobody
Is this still an issue for anyone?
Keywords: qawanted
Comment on attachment 520172 [details]
Empty Firefox window after opening url from external application

No longer problems with version 22.0 (and some previous too).
Attachment #520172 - Flags: feedback+
Thanks sensemann, resolving WORKSFORME based on comment 58.
Status: REOPENED → RESOLVED
Closed: 14 years ago11 years ago
Resolution: --- → WORKSFORME
Product: Firefox → Firefox Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: