Closed Bug 1794577 Opened 2 years ago Closed 2 years ago

[wayland] Picture-in-picture window height gets 52px smaller each time it is opened

Categories

(Core :: Widget: Gtk, defect, P3)

Firefox 84
defect

Tracking

()

VERIFIED FIXED
112 Branch
Tracking Status
firefox-esr102 --- wontfix
firefox105 --- wontfix
firefox106 --- wontfix
firefox107 --- wontfix
firefox108 --- wontfix
firefox110 --- wontfix
firefox111 --- wontfix
firefox112 --- verified
firefox113 --- verified

People

(Reporter: ke5trel, Assigned: emilio)

References

(Blocks 2 open bugs, Regressed 1 open bug, Regression)

Details

(Keywords: regression)

Attachments

(5 files)

STR:

  1. Start with MOZ_ENABLE_WAYLAND=1 on Ubuntu 22.04.
  2. Open a video in Picture-in-Picture.
  3. Close it and reopen it multiple times.

The video height shrinks by 52px each time it is opened with the width following the aspect ratio of the video. It stops shrinking when the window height reaches 80px.

Does not happen with X11/XWayland.

Regression window:
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=2977d4891ceeed019dc906dff3feb6c9f530213c&tochange=5278acfcd8344d6cd0a3f5bfb6cab6d68a9e93bc

Likely regressed by Bug 1578985.

I guess it's wrong size calculation related to CSD border size.

Priority: -- → P3

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

Duplicate of this bug: 1818338

The following field has been copied from a duplicate bug:

Field Value Source
Regressed by bug 1749174 bug 1818338

For more information, please visit auto_nag documentation.

Regressed by: 1749174
Assignee: nobody → emilio
Status: NEW → ASSIGNED

What is going on here is a bad interaction between the
aspect-ratio-locking that PiP uses and CSD.

The Wayland window starts off with CSD decorations. That adds some
margin to our windows. When we un-decorate the window then eventually
GDK removes those margins, which means that we end up with a different
size, due to the aspect ratio.

PiP is special enough that is probably ok to just do this.

Depends on D171074

This prevents the system titlebar from showing up in Plasma+Wayland.

Depends on D171075

Seems to work nicely.

Depends on D171076

Attachment #9319993 - Attachment description: WIP: Bug 1794577 - Clear decorations from PiP window earlier during creation. → Bug 1794577 - Clear decorations from PiP window earlier during creation. r=stransky
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2bbe62fb0734 Minor clean-up to CSD code. r=stransky https://hg.mozilla.org/integration/autoland/rev/bcea4f6871b4 Clear decorations from PiP window earlier during creation. r=stransky https://hg.mozilla.org/integration/autoland/rev/5eef5f5abf22 Set dummy titlebar for always-undecorated windows. r=stransky https://hg.mozilla.org/integration/autoland/rev/d330f257bf95 Enable aspect-ratio locking on KDE too. r=stransky
Regressions: 1820203
QA Whiteboard: [qa-112b-p2]
Regressions: 1823406
Regressions: 1823350

Reproduced this issue on an affected Nightly build from 2022-10-11, on Ubuntu 22.04 on Wayland.
Verified as fixed on Firefox 112.0 (20230403163424) and Firefox 113.0a1 (20230403092724) on the above platform. The Picture-in-picture window no longer shrinks.

Status: RESOLVED → VERIFIED
Regressions: 1858767
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: