Bug 2040877 - Firefox 96 window (without title-bar) shrinks on cinnamon when exiting full-screen video
Summary: Firefox 96 window (without title-bar) shrinks on cinnamon when exiting full-s...
Alias: None
Product: Fedora
Classification: Fedora
Component: firefox
Version: 35
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Gecko Maintainer
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2022-01-14 20:04 UTC by Jonathan S
Modified: 2022-01-20 08:24 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2022-01-20 08:24:47 UTC
Type: Bug

Attachments (Terms of Use)
After exiting full-screen video (1.68 MB, image/png)
2022-01-14 20:04 UTC, Jonathan S
no flags Details
Before going to full-screen video (1.62 MB, image/png)
2022-01-14 20:05 UTC, Jonathan S
no flags Details
After exiting full-screen video and maximizing - note offset (1.28 MB, image/png)
2022-01-14 20:07 UTC, Jonathan S
no flags Details

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?

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:

That appears to be:
Red HatBug 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

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:

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:
was intended to solve.

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

Note You need to log in before you can comment on or make changes to this bug.