Closed Bug 881331 Opened 12 years ago Closed 10 years ago

Popup notifications added in a background window don't show the anchor icon until the window is brought to the front

Categories

(Toolkit Graveyard :: Notifications and Alerts, defect)

defect
Not set
normal

Tracking

(firefox22-, firefox23-, firefox24-, firefox38 verified)

VERIFIED FIXED
mozilla38
Tracking Status
firefox22 - ---
firefox23 - ---
firefox24 - ---
firefox38 --- verified

People

(Reporter: jsmith, Assigned: florian)

References

Details

(Whiteboard: [getUserMedia][blocking-gum-][CTPDefault:P3])

Attachments

(1 file, 1 obsolete file)

Build: 6/10/2013 Nightly STR 1. In window #1, go to http://mozilla.github.io/webrtc-landing/gum_test.html 2. Request video 3. Accept permissions 4. In window #2, go to http://mozilla.github.io/webrtc-landing/gum_test.html 5. Request video 6. Accept permissions Expected The visible indicator should be present on both windows. Actual The visible indicator disappears on the non-focused window. Additionally, Firefox begins to flash in the toolbar.
Version: 23 Branch → Trunk
Definitely a recent regression. Easy to recover from though.
Keywords: regression
Whiteboard: [getUserMedia][android-gum+]
Whiteboard: [getUserMedia][android-gum+] → [getUserMedia][blocking-gum-]
Not sure whether this a UI or core bug. A regression window would be useful.
Regression window(m-c) Good: http://hg.mozilla.org/mozilla-central/rev/993d7aff3109 Mozilla/5.0 (Windows NT 6.1; WOW64; rv:22.0) Gecko/20130228 Firefox/22.0 ID:20130228192921 Bad: http://hg.mozilla.org/mozilla-central/rev/3362afba690e Mozilla/5.0 (Windows NT 6.1; WOW64; rv:22.0) Gecko/20130301 Firefox/22.0 ID:20130301154349 Pushlog: http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=993d7aff3109&tochange=3362afba690e Regression window(m-i) Good: http://hg.mozilla.org/integration/mozilla-inbound/rev/4e7646d14797 Mozilla/5.0 (Windows NT 6.1; WOW64; rv:22.0) Gecko/20130228 Firefox/22.0 ID:20130301003322 Bad: http://hg.mozilla.org/integration/mozilla-inbound/rev/7df619463b43 Mozilla/5.0 (Windows NT 6.1; WOW64; rv:22.0) Gecko/20130228 Firefox/22.0 ID:20130301031827 Pushlog: http://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=4e7646d14797&tochange=7df619463b43 regressed by: da75867527dd Dão Gottwald — Bug 843971 - Update browser-specific indicators when content gains or releases access to devices. r=dolske
So the underlying problem (that isn't a recent regression) is that popup notifications added in a background window don't show the icon until the window is brought to the front.
Keywords: regression
Product: Firefox → Toolkit
Not blocking-gum and specific to gUM, so not tracking.
The "window starts flashing" part is bug 882188.
Blocks: doorhanger
Summary: Requesting gUM across two different windows causes the visible indicator to be lost and the window to start flashing in the windows toolbar until focus is returned back to the window → Popup notifications added in a background window don't show the anchor icon until the window is brought to the front
Hmm, I guess perhaps the activeWindow check in show() should be moved into _update, and only influence the popup-opening (and not the anchor-showing). That might throw off some tests that expect backgroundShow to fire in that case, though.
Gavin, is comment 7 the approach we want? This would be nice to have for CtP plugins.
Flags: needinfo?(gavin.sharp)
Whiteboard: [getUserMedia][blocking-gum-] → [getUserMedia][blocking-gum-][CTPDefault:P3]
Yes, I think so.
Flags: needinfo?(gavin.sharp)
Sankha said he'll try get to it this week.
Assignee: nobody → sankha93
Status: NEW → ASSIGNED
Attached patch patch v1 (obsolete) — Splinter Review
Attachment #831987 - Flags: review?(gavin.sharp)
(In reply to Sankha Narayan Guria [:sankha93] from comment #12) > Created attachment 831987 [details] [diff] [review] > patch v1 Hey Sankha, do the tests all pass without modification?
(In reply to Matthew N. [:MattN] (catching up on reviews) from comment #13) > Hey Sankha, do the tests all pass without modification? I just tested browser/base/content/test/general/browser_popupNotification.js, and all tests are passing as long as the browser window of the test is in focus. If the focus is taken to another window, the tests fail, is that normal behavior? I could push to try to check it once more.
(In reply to Sankha Narayan Guria [:sankha93] from comment #14) > (In reply to Matthew N. [:MattN] (catching up on reviews) from comment #13) > If the focus is taken to another window, the tests fail, is that normal > behavior? That's normal for some mochitests like this where panels are involved. > I could push to try to check it once more. That would be good since there are other tests which exercise PopupNotifications. I've pushed a run for you: https://tbpl.mozilla.org/?tree=Try&rev=a125072533ae
Patch looks good, but can you also write a test to cover this case? If you find me or Matt on IRC we can give you some pointers.
Comment on attachment 831987 [details] [diff] [review] patch v1 Needs a test (per last comments).
Attachment #831987 - Flags: review?(gavin.sharp)
Sankha, any update on tests?
Flags: needinfo?(jsmith)
What do you mean specifically?
Flags: needinfo?(jsmith)
Oops, sorry, wrong person. I meant to flag the assignee, not the reporter. Sankha, any update on tests?
Flags: needinfo?(sankha93)
Yeah, I had some questions regarding the tests. I'll ping you on IRC for it.
Flags: needinfo?(sankha93)
Bulk move to Toolkit::Notifications and Alerts Filter on notifications-and-alerts-component.
Component: General → Notifications and Alerts
Flags: firefox-backlog+
No recent activity here, so I updated the patch (it bitrotted mostly due to the refactoring in bug 1085691) and wrote a test. https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=33a89829ac0e
Assignee: sankha93 → florian
Attachment #831987 - Attachment is obsolete: true
Attachment #8545282 - Flags: review?(MattN+bmo)
Iteration: --- → 37.3 - 12 Jan
Flags: qe-verify?
Comment on attachment 8545282 [details] [diff] [review] Updated patch with test Review of attachment 8545282 [details] [diff] [review]: ----------------------------------------------------------------- I get a failure while running the test directory (OS X Debug): 831 INFO TEST-UNEXPECTED-FAIL | browser/base/content/test/popupNotifications/browser_popupNotification_4.js | A promise chain failed to handle a rejection: - at chrome://mochitests/content/browser/browser/base/content/test/popupNotifications/head.js:119 - TypeError: Assert is null ::: toolkit/modules/PopupNotifications.jsm @@ -314,5 @@ > if (!notification.dismissed) { > this.window.getAttention(); > } > - if (notification.anchorElement.parentNode != this.iconBox) { > - this._updateAnchorIcon(notifications, notification.anchorElement); Can you explain why the deletion of the `if` fixes this?
Attachment #8545282 - Flags: review?(MattN+bmo)
(In reply to Matthew N. [:MattN] (away until Jan. 7) from comment #25) > I get a failure while running the test directory (OS X Debug): > 831 INFO TEST-UNEXPECTED-FAIL | > browser/base/content/test/popupNotifications/browser_popupNotification_4.js > | A promise chain failed to handle a rejection: - at > chrome://mochitests/content/browser/browser/base/content/test/ > popupNotifications/head.js:119 - TypeError: Assert is null Never mind this part since it happens without your patch too :(
Comment on attachment 8545282 [details] [diff] [review] Updated patch with test (In reply to Matthew N. [:MattN] from comment #25) > ::: toolkit/modules/PopupNotifications.jsm > @@ -314,5 @@ > > if (!notification.dismissed) { > > this.window.getAttention(); > > } > > - if (notification.anchorElement.parentNode != this.iconBox) { > > - this._updateAnchorIcon(notifications, notification.anchorElement); > > Can you explain why the deletion of the `if` fixes this? This test checks that the notification is not attached to the location bar. Another way to phrase this is: "if (SocialAPI) ...". This test was added by Shane in bug 1085691 when we mistakenly thought the issue was SocialAPI-only, and didn't want to change the non-SocialAPI behavior at all to reduce risk for a patch we wanted to uplift.
Attachment #8545282 - Flags: review?(MattN+bmo)
Hi Florian, can you provide a point value.
Flags: needinfo?(florian)
Points: --- → 3
Flags: qe-verify?
Flags: qe-verify+
Flags: needinfo?(florian)
Comment on attachment 8545282 [details] [diff] [review] Updated patch with test Review of attachment 8545282 [details] [diff] [review]: ----------------------------------------------------------------- (In reply to Florian Quèze [:florian] [:flo] from comment #27) > Comment on attachment 8545282 [details] [diff] [review] > Updated patch with test > > (In reply to Matthew N. [:MattN] from comment #25) > > > ::: toolkit/modules/PopupNotifications.jsm > > @@ -314,5 @@ > > > if (!notification.dismissed) { > > > this.window.getAttention(); > > > } > > > - if (notification.anchorElement.parentNode != this.iconBox) { > > > - this._updateAnchorIcon(notifications, notification.anchorElement); > > > > Can you explain why the deletion of the `if` fixes this? > > This test checks that the notification is not attached to the location bar. > Another way to phrase this is: "if (SocialAPI) ...". This test was added by > Shane in bug 1085691 when we mistakenly thought the issue was > SocialAPI-only, and didn't want to change the non-SocialAPI behavior at all > to reduce risk for a patch we wanted to uplift. Ah, ok, I'm not surprised that it didn't make sense to me as I wasn't thinking of SocialAPI
Attachment #8545282 - Flags: review?(MattN+bmo) → review+
Iteration: 37.3 - 12 Jan → 38.1 - 26 Jan
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
Reproduced the initial issue on a nightly before the fix and verified on latest Nightly that the indicator is visible on all opened windows across all platforms, Windows 7 64bit, Mac OS X 10.9.5 and Ubuntu 14.04 32bit.
Status: RESOLVED → VERIFIED
Product: Toolkit → Toolkit Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: