[CSD] The CSD rendered by GTK have sharp corners
Categories
(Core :: Widget: Gtk, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox64 | --- | fixed |
People
(Reporter: stransky, Assigned: stransky)
References
(Blocks 1 open bug)
Details
Attachments
(6 files)
8.71 KB,
image/png
|
Details | |
46 bytes,
text/x-phabricator-request
|
jhorak
:
review+
|
Details | Review |
46 bytes,
text/x-phabricator-request
|
jhorak
:
review+
|
Details | Review |
46 bytes,
text/x-phabricator-request
|
jhorak
:
review+
|
Details | Review |
46 bytes,
text/x-phabricator-request
|
dao
:
review+
|
Details | Review |
162.87 KB,
image/png
|
Details |
Comment 1•7 years ago
|
||
Assignee | ||
Comment 2•7 years ago
|
||
Assignee | ||
Comment 3•7 years ago
|
||
Assignee | ||
Updated•7 years ago
|
Comment 4•7 years ago
|
||
Updated•7 years ago
|
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 10•6 years ago
|
||
Assignee | ||
Comment 11•6 years ago
|
||
Assignee | ||
Comment 12•6 years ago
|
||
Assignee | ||
Comment 13•6 years ago
|
||
Comment 14•6 years ago
|
||
Assignee | ||
Comment 15•6 years ago
|
||
Comment 16•6 years ago
|
||
Assignee | ||
Comment 17•6 years ago
|
||
Comment 18•6 years ago
|
||
Assignee | ||
Comment 19•6 years ago
|
||
Comment 20•6 years ago
|
||
Comment 21•6 years ago
|
||
Comment 22•6 years ago
|
||
Comment 24•6 years ago
|
||
Comment 25•6 years ago
|
||
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 26•6 years ago
|
||
Comment 27•6 years ago
|
||
Comment 28•6 years ago
|
||
Comment 29•6 years ago
|
||
Comment 30•6 years ago
|
||
Comment 31•6 years ago
|
||
bugherder |
Updated•6 years ago
|
Comment 32•6 years ago
|
||
Comment 34•6 years ago
|
||
Assignee | ||
Comment 35•6 years ago
|
||
Comment 36•6 years ago
|
||
This appears to have regressed between 65b11 and 65b12. I've seeing this on two computers running Ubuntu 18.04.
Name Firefox
Version 65.0b12
Build ID 20190117232427
Update Channel beta
User Agent Mozilla/5.0 (X11; Linux x86_64; rv:65.0) Gecko/20100101 Firefox/65.0
OS Linux 4.15.0-43-generic
Comment 37•5 years ago
|
||
This is happening again in Ubuntu 19.04 with Firefox 67.0.1
Comment 38•5 years ago
|
||
For a while I noticed this apparent regression, but then realized it only happens when you're using a theme other than the default one. I can only assume this has to be implemented per-theme with the @media (-moz-gtk-csd-transparent-background)
rule?
Comment 39•5 years ago
|
||
@Xerz,
I can only assume this has to be implemented per-theme with the @media (-moz-gtk-csd-transparent-background) rule?
can you give me more insight on this? Where I can find info about this rule?
I just tested Fedora 30 with Xorgkkk with default Adwaita theme and Firefox 69, the bug is reproducible
Comment 40•5 years ago
|
||
(In reply to c.lobrano from comment #39)
can you give me more insight on this? Where I can find info about this rule?
I just tested Fedora 30 with Xorgkkk with default Adwaita theme and Firefox 69, the bug is reproducible
That rule is used within the browser's CSS, and I suspect the background is not properly set to transparent in themes other than the default, or that addons are allowed to draw over the corner in any other way. I know very little about how theming works, so that's as much as I can quickly figure out.
I've been able to reproduce this behavior with both Firefox 69 and the latest 71 nightly, see the following gallery: https://imgur.com/a/aJFYXNV
Comment 41•5 years ago
|
||
Thanks, this is interesting.
I can speak for Yaru theme only, but we reuse a very large part of the default GNOME theme, with basic color only modifications. I saw this problem fixed only using Wayland in both Fedora and Ubuntu with default theme.
Is this browser css loaded only under some circumstances?
Comment 42•5 years ago
|
||
OK, so here's what seem to be the relevant parts on enabling the CSD and the required transparency:
https://hg.mozilla.org/mozilla-central/file/c969a93/widget/gtk/nsWindow.cpp#l3652
https://hg.mozilla.org/mozilla-central/file/c969a93/widget/gtk/nsWindow.cpp#l6862
https://hg.mozilla.org/mozilla-central/file/c969a93/widget/gtk/nsWindow.cpp#l6923
Notice a disclaimer which points out to #1516224 as well as #, which justify GNOME on Xorg still not having rounded corners, but the tickets are closed so it should be no longer an issue.
From here on, @media (-moz-gtk-csd-transparent-background)
is used to determine if the CSS is applied, as implemented here: https://hg.mozilla.org/mozilla-central/file/c969a93/widget/gtk/nsLookAndFeel.cpp#l680
From what the source code seems to show, this should work just by having a working GNOME desktop, and shouldn't be disabled or enabled in any way due to your specific GTK theme.
Assignee | ||
Comment 43•5 years ago
|
||
Can you try to find a regression range by https://mozilla.github.io/mozregression/ ? Also which desktop environment do you use? I'm comfused if that's something new or not. Also we don't enable titlebar by default on some systems due to Gtk/Xorg bugs (like Bug 1530252) so when you enable it there are some bugs we can't fix.
Thanks.
Comment 44•5 years ago
|
||
(In reply to Martin Stránský [:stransky] from comment #43)
Can you try to find a regression range by https://mozilla.github.io/mozregression/ ? Also which desktop environment do you use? I'm comfused if that's something new or not.
I don't think this is a regression at all, but more of a misunderstood bug on its own - I can reproduce the exact same behavior I found with the 71 nightly on Firefox 64.0. If I just use the default Firefox theme the CSD is rendered just as expected, with rounded corners from Adwaita - however, any other Firefox theme will have its background overlaying all of the top, including the parts which are expected to be transparent.
I currently use GNOME Shell 3.30.2.
Assignee | ||
Comment 45•5 years ago
|
||
(In reply to Xerz from comment #44)
(In reply to Martin Stránský [:stransky] from comment #43)
Can you try to find a regression range by https://mozilla.github.io/mozregression/ ? Also which desktop environment do you use? I'm comfused if that's something new or not.
I don't think this is a regression at all, but more of a misunderstood bug on its own - I can reproduce the exact same behavior I found with the 71 nightly on Firefox 64.0. If I just use the default Firefox theme the CSD is rendered just as expected, with rounded corners from Adwaita - however, any other Firefox theme will have its background overlaying all of the top, including the parts which are expected to be transparent.
Can you give me come example? For instance I use Yaru (Ubuntu default) and it works as expected, i.e. corners are rounded.
Comment 46•5 years ago
|
||
(In reply to Martin Stránský [:stransky] from comment #45)
Can you give me come example? For instance I use Yaru (Ubuntu default) and it works as expected, i.e. corners are rounded.
It's not related to the GTK theme, but to the Firefox theme. Just use any Firefox theme, like Light or Dark or an external add-on like any at https://addons.mozilla.org/firefox/themes. A corner that should look fine (as in this example) will not look as expected (as here with "Gradient Sunset").
Comment 47•5 years ago
|
||
(In reply to Martin Stránský [:stransky] from comment #45)
Can you give me come example? For instance I use Yaru (Ubuntu default) and it works as expected, i.e. corners are rounded.
Can you tell me if you're using Xorg or Wayland session?
As said, I can reproduce the bug in both Fedora 30 and Ubuntu 19.04 using default gtk themes (Adwaita and Yaru) in a Xorg session, and Firefox default theme in version 69 as shown here
Assignee | ||
Comment 48•5 years ago
|
||
(In reply to Xerz from comment #46)
(In reply to Martin Stránský [:stransky] from comment #45)
Can you give me come example? For instance I use Yaru (Ubuntu default) and it works as expected, i.e. corners are rounded.
It's not related to the GTK theme, but to the Firefox theme. Just use any Firefox theme, like Light or Dark or an external add-on like any at https://addons.mozilla.org/firefox/themes. A corner that should look fine (as in this example) will not look as expected (as here with "Gradient Sunset").
Please file a new bug for it. This is a bit different issue than this one and it happens with Firefox internal themes, not the system ones. Thanks.
Comment 49•5 years ago
|
||
A user in Yaru's repository, reported the following
Found that layers.acceleration.force-enabled in about:config removes the white corners (for me) and also shows content with more than 60 FPS too
https://github.com/ubuntu/yaru/issues/179#issuecomment-533831546
I honestly don't know what this means, but I can confirm that in my machine works as well.
Comment 50•5 years ago
|
||
(In reply to c.lobrano from comment #49)
A user in Yaru's repository, reported the following
Found that layers.acceleration.force-enabled in about:config removes the white corners (for me) and also shows content with more than 60 FPS too
https://github.com/ubuntu/yaru/issues/179#issuecomment-533831546
I honestly don't know what this means, but I can confirm that in my machine works as well.
This also worked for me in Firefox 70. Also fixed grayscale antialiasing issue here. A bit strange!
Comment 51•3 years ago
|
||
This is happening again for me with Firefox 98.0 on Manjaro GNOME using X11. I've tried enabling layers.acceleration.force-enabled but it didn't fix it. Just to be clear, this is using the default Firefox theme, with Manjaro's package of Firefox 98.0 (I disabled Manjaro's customizations too, that didn't change anything). It happens with any rounded GTK theme, including the default Adwaita theme.
Description
•