Open Bug 1268618 Opened 4 years ago Updated 27 days ago

[GTK3] Webpage backgrounds appear grey instead of white with GTK3 3.20+

Categories

(Core :: Layout, defect)

46 Branch
x86_64
Linux
defect
Not set

Tracking

()

UNCONFIRMED

People

(Reporter: badshah400, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:46.0) Gecko/20100101 Firefox/46.0
Build ID: 2016042500

Steps to reproduce:

Tested with ffx compiled against gtk3 v3.20.3 on openSUSE. This issue is not seen with default ffx binaries from mozilla.com (which is built with gtk3 < 3.20 I believe), nor with default openSUSE ffx 46.0 built against gtk2.

1. Go to http://www.slate.com/ or http://www.msnbc.com/ for example.


Actual results:

You will see grey bars on the sides and/or at the top (you may have to zoom out for them to show up). 


Expected results:

These bkg regions ought to be white, and they are when ffx is built against gtk2 or gtk3 < 3.20.
OS: Unspecified → Linux
Hardware: Unspecified → x86_64
Component: Untriaged → Widget: Gtk
Product: Firefox → Core
The computed value of background-color is transparent.
I don't see any CSS rules, so I guess this is the default and the color is a background color from the theme, which may have changed with a different version of GTK.

I see grey background with GTK+ 3.16 and Adwaita.

I guess layout code chooses to get a background color from nsLookAndFeel, but I'm not clear there is a bug here.
Component: Widget: Gtk → Layout
(In reply to Karl Tomlinson (ni?:karlt) from comment #1)
> The computed value of background-color is transparent.
> I don't see any CSS rules, so I guess this is the default and the color is a
> background color from the theme, which may have changed with a different
> version of GTK.
> 
> I see grey background with GTK+ 3.16 and Adwaita.

Yes, I see your point regarding how the background colouring works, but nonetheless, I should mention that using the default mozilla.com binaries I still cannot reproduce the grey background; it still appears white. Only when I compile firefox against gtk3 >= 3.20 does it appear grey.

> 
> I guess layout code chooses to get a background color from nsLookAndFeel,
> but I'm not clear there is a bug here.

Well, I suppose firefox intends to achieve consistency between how web pages look when built with gtk2 and gtk3. Fwiw, I have noted above that epiphany also shows the background as white although it is built with gtk3 (3.20+ for good measure). So there is probably a bug here.
The problem here is that the user is being put through some tech nonsense blah pain. I would vote for defaulting to white instead of transparent.
Sorry, I stick around with firefox for all the good reasons, but it gets beat at basic stuff like rendering a web-page by *every* other browser (including epiphany, google chrome, opera), and that is just painful to see. I would post side-by-side screenshots of how singularly terrible firefox makes the web-pages (and there are numerous sites where this is the issue) look because of this one problem, but apparently the devs have long stopped caring.

Still present in SeaMonkey 2.49.5. Workaround is to add a rule to userContent.css:

/* Work around mozilla snobbery https://bugzilla.mozilla.org/show_bug.cgi?id=1268618 */
html>body {background-color: white;}

Attached patch Simplistic patchSplinter Review

Here's a better (albeit still simplistic) fix which should also work on pages that explicitly set a transparent background color. Tested with SeaMonkey 2.49.5.

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