Closed Bug 1720874 Opened 3 years ago Closed 3 years ago

Transparent context menu with minwaita theme

Categories

(Core :: Widget: Gtk, defect)

Firefox 90
x86_64
Linux
defect

Tracking

()

VERIFIED FIXED
92 Branch
Tracking Status
firefox90 --- verified
firefox91 --- verified
firefox92 --- verified

People

(Reporter: antheo.lerouzic, Assigned: emilio)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:89.0) Gecko/20100101 Firefox/89.0

Steps to reproduce:

Open a context menu (right click) on firefox 90 or later with "gfx.webrender.compositor.force-enabled" on true

Actual results:

The menu is transparent, like in this picture : https://www.casimages.com/i/210716014609220532.png.html

Expected results:

The context menu should not been transparent.

The problem is still here on the actual nightly.
Here is a link of my about:support : https://pastebin.com/Z1mL80jx

The Bugbug bot thinks this bug should belong to the 'Core::Graphics: WebRender' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: General → Graphics: WebRender
Product: Firefox → Core

Thank you for filing and attaching the about:support!
IIRC, context menus are rendered with software WR. So the issue is either that the output of rendering contains alpha of full transparency, we we don't expect it, or that the alpha compositing mode on the surface (responsible for the context menu) is configured incorrectly, which is more likely what's happening.
Lee, is that reasoning sound? Pinging you since you are involved in the sw-wr.

Severity: -- → S3
Flags: needinfo?(lsalzman)
OS: Unspecified → Linux
Hardware: Unspecified → x86_64

Does the problem only happen if you use the force-enabled pref? Are you using X11, or are you using Wayland?

Flags: needinfo?(lsalzman) → needinfo?(antheo.lerouzic)

From the description and comment 1 this appears to happen with the experimental Wayland compositor backend.

antheo, you seem to have quite a few experimental features enabled. Could you try running with a fresh profile and only gfx.webrender.compositor.force-enabled? And do I understand correctly that the issue only happens with gfx.webrender.compositor.force-enabled?

Hi,
I use wayland, and the problem is still here with a fresh new profile, so it's not gfx.webrender.compositor.force-enabled related, sorry.
Thanks for your help!

Flags: needinfo?(antheo.lerouzic)

Thanks, that's good to know. Do you maybe happen to use a non-standard gtk theme? I recall having seen similar bugs when people do that.

Yes, I was using a non-official theme!
It worked great in 89 though, do you think there is a chance that it will work in future version or do I have to change my theme?
Thanks a lot for your help

(In reply to antheo.lerouzic from comment #8)

Yes, I was using a non-official theme!
It worked great in 89 though, do you think there is a chance that it will work in future version or do I have to change my theme?
Thanks a lot for your help

Emilio, do you have an idea here?

Flags: needinfo?(emilio)
Blocks: wayland

I mean, a transparent context-menu is always a bug, so we should fix it, yeah.

Which gtk theme are you using?

Also, does it work on Nightly? This reminds me of bug 1709719, but it was fixed on time for 90 so...

Flags: needinfo?(emilio) → needinfo?(antheo.lerouzic)

I was using Minwaita, the bug was still here with nightly.
Thanks

Flags: needinfo?(antheo.lerouzic)

Alright, will take a look, thanks!

To be clear with other gtk themes this is not an issue, is that right?

Assignee: nobody → emilio
Status: UNCONFIRMED → NEW
Component: Graphics: WebRender → Widget: Gtk
Ever confirmed: true
Flags: needinfo?(emilio)
Summary: Transparent context menu → Transparent context menu with minwaita theme

It's not an issue with White-sur theme, but maybe other gtk theme have the same problem.

This theme only styles menus with menu:backdrop (which always seems to
match for context menus).

Try that before giving up. Also, fall back to the window background if
that would ever fail (which seems better than just rendering
transparent).

Flags: needinfo?(emilio)

Comment on attachment 9231873 [details]
Bug 1720874 - Try to find menupopup background with :backdrop pseudo-class. r=stransky

Beta/Release Uplift Approval Request

  • User impact if declined: Transparent context menus with some GTK themes.
  • 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: Install Minwaita theme from https://github.com/godlyranchdressing/Minwaita. Right click anywhere.
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Simple fallback rather than ending up with a transparent color.
  • String changes made/needed: none
Attachment #9231873 - Flags: approval-mozilla-beta?
Flags: qe-verify+
Blocks: 1721154
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/0f7a29399878 Try to find menupopup background with :backdrop pseudo-class. r=stransky

I am running a GTK 2.0/3.0 theme under MATE on Arch, and I started noticing this as well with the 90.0 update. (The theme in question is called "Platinum" and is designed to emulate the look of classic Mac OS.) I was wondering if my theme got corrupted or something, but I stumbled across this bug report. I'm glad I did, because I was just looking at the resource files to figure out what happened.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 92 Branch

Comment on attachment 9231873 [details]
Bug 1720874 - Try to find menupopup background with :backdrop pseudo-class. r=stransky

Looks low risk, approved for 91 beta 5, thanks.

Attachment #9231873 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Comment on attachment 9231873 [details]
Bug 1720874 - Try to find menupopup background with :backdrop pseudo-class. r=stransky

Beta/Release Uplift Approval Request

  • User impact if declined: Transparent context menus with some gtk themes.
  • 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: see above
  • List of other uplifts needed: none
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): More fallback colors.
  • String changes made/needed: none
Attachment #9231873 - Flags: approval-mozilla-release?

(If we do a dot-release, this patch might be worth pulling in)

QA Whiteboard: [qa-triaged]

Comment on attachment 9231873 [details]
Bug 1720874 - Try to find menupopup background with :backdrop pseudo-class. r=stransky

approved for 90.0.2

Attachment #9231873 - Flags: approval-mozilla-release? → approval-mozilla-release+

Reproduced with Fx 90.0 and Fx 91.0b4 on Ubuntu 18.04.
Verified fixed with Fx 92.0a1 (21-06-2021), Fx 91.0b5 and Fx 90.0.2 on Ubuntu 18.04.

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

Attachment

General

Created:
Updated:
Size: