Closed Bug 1683075 Opened 2 years ago Closed 2 years ago

Rendering issue on pip window top corners on resize using a certain configuration

Categories

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

Unspecified
Linux
defect

Tracking

()

VERIFIED FIXED
87 Branch
Tracking Status
firefox84 --- wontfix
firefox85 --- wontfix
firefox86 --- wontfix
firefox87 --- verified

People

(Reporter: Anca, Assigned: stransky)

References

(Blocks 1 open bug, Regressed 1 open bug)

Details

Attachments

(2 files)

Attached file about:support content

Affected versions

  • 84.0
  • 85.0b2
  • 86.0a1 (2020-12-16)

Affected platforms

  • Ubuntu 18.04

Steps to reproduce

  1. Open any video in pip mode (eg. https://www.facebook.com/watch/?ref=search&v=779776489522577&external_log_id=24a6b03b-375f-4116-98b8-50cac768d4f9&q=recipes%20video)
  2. Resize the pip window
  3. Observe the top corners of the pip window

Expected result

  • No rendering issue occurs on pip window resizing

Actual result

  • The border is disrupted and poorly rendered

Regression range

  • Not a regression reproducible way back to 72.0a1

Additional notes

  • Attached screencast
  • I couldn't reproduce the issue on Chrome from the same configuration
  • Not reproducible with other Ubuntu 18.04 (Intel® HD Graphics 515 or NVA8)

Suggested severity

  • S3
Has STR: --- → yes

I can see it once I drag the window, without resizing the window.

Hi Mike,
Would you mind taking a look? It might be a gfx issue but I am not sure.

Component: Audio/Video → Video/Audio Controls
Flags: needinfo?(mconley)
Product: Core → Toolkit

This is likely a graphics or video decoding issue, but it's hard to say because I can't access the screencast. Would it be possible to adjust the permissions to that it's publicly viewable?

Flags: needinfo?(mconley) → needinfo?(anca.soncutean)

(In reply to Mike Conley (:mconley) (:⚙️) (Catching up on needinfos) from comment #3)

This is likely a graphics or video decoding issue, but it's hard to say because I can't access the screencast. Would it be possible to adjust the permissions to that it's publicly viewable?

Sorry about that, it should be visible now.

Flags: needinfo?(anca.soncutean)

Ah, okay, I see what you mean. I suspect this is actually a widget layer thing. Moving to that component.

Component: Video/Audio Controls → Widget: Gtk
Product: Toolkit → Core

Yes, this is widget/gtk issue. It may be fixed by Bug 1681356 but that fails on try. I'll check if I can deliver a partial fix here.

Assignee: nobody → stransky
Blocks: gtktitlebar
Priority: -- → P2

Can you tell me which Gtk theme so you use? Looks like we apply a toplevel theme to PIP window.

Flags: needinfo?(anca.soncutean)

(In reply to Martin Stránský [:stransky] from comment #7)

Can you tell me which Gtk theme so you use? Looks like we apply a toplevel theme to PIP window.

Adwaita-dark

Flags: needinfo?(anca.soncutean)

Looks like we render the video smaller than actual GtkWindow size so window background/border is rendered. I checked Chromium and it has the same issue but renders the video a bit bigger (+ 2 pixels on all sides) so the artifacts are not visible.

We can use a little trick to set a different style to mShell toplevel window. Unfortunately that works in CSD mode only, in non-csd mode the decoration is painted by window manager. So I may have a partial fix and let's see if we can switch PIP to CSD in Gnome.

Hm, I'm afraid the only solution here is to turn off decorations by gtk_window_set_decorated() and handle window resize on our own. I'm unable to convince Gtk to use popup window style for the toplevel window and also the tiled trick is not sufficient.

  • This patch is based on patches created by Andrew Comminos [:acomminos] at But 1283299.
  • Draw PIP window without decoration so we don't have to deal with different Gtk themes
    and rounded corners.
  • Handle window resize on our own as undecorated windows can't be resized by Gtk.
Pushed by stransky@redhat.com:
https://hg.mozilla.org/integration/autoland/rev/3511277c8942
[Linux] Draw PIP window without decorations and use custom resizers, r=jhorak
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 87 Branch
Regressions: 1689958
Flags: qe-verify+
Regressions: 1696876

Reproduced this issue on an affected Nightly build on Ubuntu 18.04 and on Ubuntu 21.04 with Dark theme enabled.
Verified as fixed on Firefox 87.0 (20210318103112) on the above OSs.

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