Closed Bug 1786226 Opened 3 years ago Closed 3 years ago

Browser window's height shrinks and Y position shifts down after exiting full screen

Categories

(Core :: Window Management, defect)

Unspecified
macOS
defect

Tracking

()

VERIFIED FIXED
106 Branch
Tracking Status
firefox-esr91 --- unaffected
firefox-esr102 --- unaffected
firefox104 --- unaffected
firefox105 + verified
firefox106 + verified

People

(Reporter: cpeterson, Assigned: rkraesig)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file, 1 obsolete file)

@ Ray, his bug is a regression from your fix for full screen video bug 1776895. I bisected this regression to this pushlog:

https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=f137b1bb235f1a6d4bcf4732fc3ba7ca40045f5a&tochange=cde5393917c483a3516f4c883af02834ddbf11d8

Steps to reproduce

  1. Load any YouTube video (such as https://youtu.be/AU4S2efc_B0) or any other web page that uses the requestFullscreen() API (such as https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_element_requestfullscreen).
  2. Zoom or maximize the screen, i.e. make the window as big as the screen without making it full screen.
  3. Make the video full screen by pressing the F key or clicking the video player's "Full screen" button.
  4. Exit full screen by pressing the F or Esc key or clicking the the video player's "Exit full screen".

Expected result

The browser window should return to its previous window dimensions.

Actual result

The browser window's height shrinks and its Y position shifts down the screen.

I'm testing Firefox on macOS 12.5.1 on a MacBook Air. I haven't tested Windows or Linux.

Flags: needinfo?(rkraesig)
Summary: Exiting → Browser window's height is reduced and Y position is shift down after exiting full screen
Summary: Browser window's height is reduced and Y position is shift down after exiting full screen → Browser window's height shrinks and Y position shifts down after exiting full screen

Lovely. Well, time to revert, and probably also uplift.

If you see this before that happens, can you post a log of that test-case with MOZ_LOG=BaseWidget:5?

Flags: needinfo?(rkraesig) → needinfo?(cpeterson)

This reverts the following commits:

  • 21f1ada7ee6ad5839fc0d9bc98e1ff2d558ef6e7
  • cde5393917c483a3516f4c883af02834ddbf11d8
  • 3d2dc8de0e7147d0d991c16c29ad9a8678a25635
  • 4b17fb88efc581522c0edf0740da4c54c539d39a
  • 7b0893449764054af7795df66c0c2e83a370d620
  • bcc0fa996f5fd7cc677ca2a5e97329dcd6b74a04
  • 9547ab55535d9713c95bc3344d1cc1357520ba92
Assignee: nobody → rkraesig
Status: NEW → ASSIGNED

FWIW, I wasn't able to reproduce this bug on Windows 11, just macOS. (I still haven't tested Linux.)

Flags: needinfo?(cpeterson)
OS: Unspecified → macOS

(In reply to Chris Peterson [:cpeterson] from comment #3)

FWIW, I wasn't able to reproduce this bug on Windows 11, just macOS. (I still haven't tested Linux.)

Yeah, this is almost certainly due to the unified menu bar on Mac not properly being accounted for -- a similar effect previously caused a mochitest to fail, but I thought I'd handled it. I suspect that the amount the window shifts down is either exactly the size of the menu bar or very slightly less, depending on which code path gets taken.

It's unlikely to manifest on Linux, although I admit I have no idea what GNOME's been up to lately. It almost certainly wouldn't under KDE.

This reverts the following commits:

  • 21f1ada7ee6ad5839fc0d9bc98e1ff2d558ef6e7
  • cde5393917c483a3516f4c883af02834ddbf11d8
  • 3d2dc8de0e7147d0d991c16c29ad9a8678a25635
  • 4b17fb88efc581522c0edf0740da4c54c539d39a
  • 7b0893449764054af7795df66c0c2e83a370d620
  • bcc0fa996f5fd7cc677ca2a5e97329dcd6b74a04
  • 9547ab55535d9713c95bc3344d1cc1357520ba92

Original Revision: https://phabricator.services.mozilla.com/D155237

Attachment #9290972 - Attachment is obsolete: true

Comment on attachment 9290933 [details]
Bug 1786226 - Revert all patches for regressing bug 1776895 r=cmartin

Beta/Release Uplift Approval Request

  • User impact if declined: Mac users may have their windows moved out of place when returning from fullscreen video.
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: Bug 1786226 comment 0. (Maximize the window, then check that double-tapping ⌘⇧F leaves it maximized.)
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): It's a straight revert of a recently-applied patch. No merge conflicts were encountered.
  • String changes made/needed: —
  • Is Android affected?: No
Attachment #9290933 - Flags: approval-mozilla-beta?
Flags: qe-verify+

Comment on attachment 9290933 [details]
Bug 1786226 - Revert all patches for regressing bug 1776895 r=cmartin

Approved for 105.0b2.

Attachment #9290933 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 106 Branch
QA Whiteboard: [qa-triaged]

I couldn't manage to reproduce this issue on my end, I tried on macOS 12.5, macOS 15, macOS 11.6, Windows 10/11 and on Ubuntu 20.04 x64.
Chris, could you please help me here with verifying the bug to see if it's fixed on Nightly and Beta.
Thanks.

Flags: needinfo?(cpeterson)

Verified fixed in Nightly 106 builds 2022-08-23 and 2022-08-24.

Surprisingly, I wasn't able to reproduce the bug in Beta 105.0b1, even though the backout was uplifted to 105.0b2. Regardless, the bug is not reproducible in Beta 105, which is all that matters.

I couldn't manage to reproduce this issue on my end, I tried on macOS 12.5, macOS 15, macOS 11.6, Windows 10/11 and on Ubuntu 20.04 x64.

I'm testing on a MacBook Air with a camera screen notch. Maybe the notch affects the screen size calculations?

Status: RESOLVED → VERIFIED
Flags: needinfo?(cpeterson)

I'm testing on a MacBook Air with a camera screen notch. Maybe the notch affects the screen size calculations?

I can confirm this; the 2022-08-21 build exhibits this behavior on a device with a camera notch, but not on one without.

Removing qe+ flag, based on comment 13.

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

Attachment

General

Created:
Updated:
Size: