Closed Bug 1739767 Opened 3 months ago Closed 2 months ago

close the Firefox window while the PiP window is running, the PiP window remains and freezes. It seems that the PiP window should be closed as well.

Categories

(Toolkit :: Video/Audio Controls, defect)

Firefox 96
Unspecified
All
defect

Tracking

()

VERIFIED FIXED
96 Branch
Tracking Status
firefox-esr91 --- unaffected
firefox94 --- unaffected
firefox95 --- unaffected
firefox96 --- verified

People

(Reporter: lunamoth, Assigned: kpatenio)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression)

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4688.3 Safari/537.36

Steps to reproduce:

Firefox 96.0a1 (2021-11-05) (64-bit)

  1. Play video
  2. Activate PiP
  3. Quit Firefox

Actual results:

  1. Play video
  2. Activate PiP
  3. Quit Firefox
  4. PiP window remains

Expected results:

  1. Play video
  2. Activate PiP
  3. Quit Firefox
  4. Quit the PiP window and Firefox together

The Bugbug bot thinks this bug should belong to the 'Core::Audio/Video: Playback' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → Audio/Video: Playback
Product: Firefox → Core

I can reproduce the issue in Nightly96.0a1 Windows10 and Ubuntu20.04.

Component: Audio/Video: Playback → Video/Audio Controls
Product: Core → Toolkit
OS: Unspecified → All

It was a problem on Windows 10 21H1 Build 19043.1266

I can confirm that this is also a reproducible issue with MacOS Big Sur on Nightly 96.0a1.

I suspect this is happening after a fix for Bug 1687808, which aimed to fix issues with focus after closing a pip window. The problem occurs here. Apparently, it's possible that browser.ownerGlobal (and thus browser.ownerGlobal.gBrowser) return null/undefined, causing the pip window to stall after the browser window is closed.

To fix this issue, we should add a condition to not move further with _focusPipBrowserWindow() if browser, browser.ownerGlobal and/or browser.ownerGlobal.gBrowser are null or undefined.

Blocks: videopip
Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee: nobody → kpatenio
Status: NEW → ASSIGNED

(In reply to kpatenio from comment #4)

I can confirm that this is also a reproducible issue with MacOS Big Sur on Nightly 96.0a1.

I suspect this is happening after a fix for Bug 1687808, which aimed to fix issues with focus after closing a pip window. The problem occurs here. Apparently, it's possible that browser.ownerGlobal (and thus browser.ownerGlobal.gBrowser) return null/undefined, causing the pip window to stall after the browser window is closed.

To fix this issue, we should add a condition to not move further with _focusPipBrowserWindow() if browser, browser.ownerGlobal and/or browser.ownerGlobal.gBrowser are null or undefined.

Nice find! I agree it seems like Bug 1687808 likely regressed this. Do you think you can get a mozregression log to confirm this?

Flags: needinfo?(kpatenio)

(In reply to [:mtigley] (she/her) from comment #6)

(In reply to kpatenio from comment #4)

I can confirm that this is also a reproducible issue with MacOS Big Sur on Nightly 96.0a1.

I suspect this is happening after a fix for Bug 1687808, which aimed to fix issues with focus after closing a pip window. The problem occurs here. Apparently, it's possible that browser.ownerGlobal (and thus browser.ownerGlobal.gBrowser) return null/undefined, causing the pip window to stall after the browser window is closed.

To fix this issue, we should add a condition to not move further with _focusPipBrowserWindow() if browser, browser.ownerGlobal and/or browser.ownerGlobal.gBrowser are null or undefined.

Nice find! I agree it seems like Bug 1687808 likely regressed this. Do you think you can get a mozregression log to confirm this?

From this mozregression log, I can confirm that Bug 1687808 regressed this.

Flags: needinfo?(kpatenio)
Regressed by: 1687808
Has Regression Range: --- → yes

Set release status flags based on info from the regressing bug 1687808

Pushed by kpatenio@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1a246320d9aa
fixed issue with PiP window freezing after closing browser. r=mtigley,mhowell
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 96 Branch
Flags: qe-verify+

I was able to reproduce the issue on Win10 using 96.0a1 (20211105214712).
Verified as fixed on Win10/Ubuntu 20.4 /Mac 10.13 using 96.0b4 (20211212185725).

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.