Bug 2040877

Summary: Firefox 96 window (without title-bar) shrinks on cinnamon when exiting full-screen video
Product: [Fedora] Fedora Reporter: Jonathan S <bugzilla_acct_1959>
Component: firefoxAssignee: Gecko Maintainer <gecko-bugs-nobody>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 35CC: erack, gecko-bugs-nobody, jhorak, kai-engert-fedora, klaas, pjasicek, rhughes, rstrode, sandmann, stransky
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-01-20 08:24:47 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
After exiting full-screen video
none
Before going to full-screen video
none
After exiting full-screen video and maximizing - note offset none

Description Jonathan S 2022-01-14 20:04:30 UTC
Created attachment 1850837 [details]
After exiting full-screen video

Description of problem:

Bug with firefox 96.
Under cinnamon, a firefox window with maximum height shrinks by about 1 cm top and 1 cm bottom when exiting a full-screen video.

Version-Release number of selected component (if applicable):

Both Fedora 34 and 35 affected.

Firefox 96 (note that Firefox 95 doesn't show this bug).

Cinnamon 5.2.7, but Firefox 95 worked on this cinnamon version so it's probably irrelevant.

How reproducible:


Steps to Reproduce:
1.First ensure that the Firefox window is maximum height, but not completely maximized (i.e. not maximum width).
2.Now play a video and then go full-screen.
3.Exit full-screen video.

Actual results:

When exiting full-screen, the firefox window has lost about 1 cm from the top and 1 cm from the bottom - in other words, it's no longer maximum height. If you maximize the firefox window now, it appears offset by 1 cm left and 1 cm top. (see attachments).

Expected results:

Window doens't resize.

Additional info:

Bug happens in trouble-shooting mode, and even with a completely new profile once the title bar is hidden.

Works correctly in Gnome. It also works correctly in cinnamon if the title bar is shown.

Comment 1 Jonathan S 2022-01-14 20:05:40 UTC
Created attachment 1850838 [details]
Before going to full-screen video

Comment 2 Jonathan S 2022-01-14 20:07:22 UTC
Created attachment 1850839 [details]
After exiting full-screen video and maximizing - note offset

Comment 3 Jonathan S 2022-01-15 14:07:15 UTC
This is actually worse than I first thought. You can trigger the bug without any reference to video. In cinnamon with no title-bar shown, just do the following:

1: Start in position shown in attachment 'Before going to full-screen video'

2: Maximize firefox window.

3: Unmaximize firefox - you get the position shown in 'After exiting full-screen video'

4: Again maximize and unmaximize and you get 'After exiting full-screen video and maximizing - note offset'

It appears that firefox is not calculating the position on the screen in cinnamon correctly when there is no title bar.

This did not happen in firefox 95. There's also no problem if the title bar is on.

Comment 4 Martin Stransky 2022-01-17 09:26:20 UTC
Can you use mozregression tool to find the broken commit?
https://fedoraproject.org/wiki/How_to_debug_Firefox_problems#Use_Mozregression_tool
Thanks.

Comment 5 Jonathan S 2022-01-17 16:08:54 UTC
Hi Martin

Thanks for looking into this. I ran the mozregression tool - the only change before running each test was setting the title bar off.

The mozregression tool gives:

17:45.40 INFO: No more integration revisions, bisection finished.
17:45.40 INFO: Last good revision: cbdc222a3346371f2f9c60135f18108c2bf1bd91
17:45.40 INFO: First bad revision: e4f54b8aab646425e35ab5a810cb1f3b73f72eca
17:45.40 INFO: Pushlog:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=cbdc222a3346371f2f9c60135f18108c2bf1bd91&tochange=e4f54b8aab646425e35ab5a810cb1f3b73f72eca

That appears to be:
Bug 1746486 - Cinnamon should use GTK_DECORATION_CLIENT r=stransky
and that would explain why it's a cinnamon problem only.

Comment 6 Jonathan S 2022-01-19 00:10:11 UTC
Martin

I noticed that the link you gave for mozregression is more generally about how to debug firefox and in particular there's a section on testing the titlebar:
https://fedoraproject.org/wiki/How_to_debug_Firefox_problems#Testing_Firefox_titlebar

MOZ_GTK_TITLEBAR_DECORATION=system firefox
solves this titlebar problem - it works whether the titlebar is enabled or not. It should be noted though that this gives the sharp corner artifacts in addition to rounded corners, that the original bug:
https://bugzilla.mozilla.org/show_bug.cgi?id=1746486
was intended to solve.


MOZ_GTK_TITLEBAR_DECORATION=client firefox
does NOT work, and still shows the bug.

Hopefully, this extra info might be of use.

Comment 7 Martin Stransky 2022-01-20 08:24:47 UTC
Okay, let's move it upstream - https://bugzilla.mozilla.org/show_bug.cgi?id=1751143
Thanks.