Closed Bug 1422563 Opened 8 years ago Closed 5 years ago

Firefox Ignores browser.display.use_system_colors

Categories

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

57 Branch
defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: carlo, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0 Build ID: 20171130105051 Steps to reproduce: 1. Use Firefox with dark GTK theme 2. Make sure browser.display.use_system_colors is set to false 3. Open the default new tab page Seems to be the same as https://bugzilla.mozilla.org/show_bug.cgi?id=232227 Actual results: 1. The search bar is dark (the color of the GTK theme) Expected results: 1. The search bar should be some default color (presumably white)
Component: Untriaged → Themes
Product: Firefox → Toolkit
See Also: → 1422507
Note that this is not an issue exclusive to the new tab page (which was only an example). The problem occurs for other pages where the the input colors are not specified explicitly e.g. https://jsfiddle.net/yejqL2oz/
Component: Themes → Widget: Gtk
Product: Toolkit → Core
See Also: 1422507

Martin, does it fall into your bucket? This was mentioned recently through our support channels as a still valid bug on Nightly 66 and I wonder if this is not a dupe of https://bugzilla.mozilla.org/show_bug.cgi?id=1283086. Thanks

Flags: needinfo?(stransky)

I'm going to look at it after 65 release.

browser.display.use_system_colors is not ignored, it works but a different way how it's expected. browser.display.use_system_colors affects only [1]:

LookAndFeel::eColorID_WindowForeground
LookAndFeel::eColorID_WindowBackground

but we have many of the text/background colors [2].

A variant of the browser.display.use_system_colors is ui.use_standins_for_native_color/ui.use_native_colors introduced in Bug 232227 which provides more color override values.

The colors can be simply verified at about:blank or about:support pages.

But all those settings don't fix the main issue here that the control background is rendered as system styled widget regardless of the settings. There are usually two error cases when system dark theme is selected:

  • html page does not define any widget background color. Widgets are rendered as text white on black background which looks ugly on the pages. When ui.use_standins_for_native_color is set we have black text on black background.

  • html page defines only background color (usually white/light) - we have white on white unless ui.use_standins_for_native_color is set.

So I'd say that the browser.display.use_system_colors is actually confusing and should go away and we may go with Bug 1527048 until native theming is removed from content.

[1] https://dxr.mozilla.org/mozilla-central/rev/725cc368d14453980d6e0b112edc263a12463ffe/layout/style/PreferenceSheet.cpp#71
[2] https://dxr.mozilla.org/mozilla-central/rev/725cc368d14453980d6e0b112edc263a12463ffe/widget/gtk/nsLookAndFeel.cpp#270

Flags: needinfo?(stransky)

I think we may replace browser.display.use_system_colors with ui.use_standins_for_native_color/ui.use_native_colors at least to override all possible colors when the checkbox is set.

And also set browser.display.use_system_colors to true by default to keep the recent state when browser.display.use_system_colors has no effect. We also should not use eColorID_WindowForeground, eColorID_WindowBackground as base web page colors in any case.

Dao, what do you think?

Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(dao+bmo)

Maybe emilio/morgan will be in a better position to answer this? :)

Flags: needinfo?(mreschenberg)
Flags: needinfo?(emilio)
Flags: needinfo?(dao+bmo)

This should be fixed by the non-native-theme effectively. It should never use system colors except for the accent color.

Comment 0 shouldn't reproduce on Nightly either (even without that) because we have widget.content.allow-gtk-dark-theme=false by default. I don't know when that was implemented.

So unless I'm missing something this is WFM, unless Martin disagrees?

Flags: needinfo?(stransky)
Flags: needinfo?(mreschenberg)
Flags: needinfo?(emilio)

(In reply to Emilio Cobos Álvarez (:emilio) from comment #8)

This should be fixed by the non-native-theme effectively. It should never use system colors except for the accent color.

Comment 0 shouldn't reproduce on Nightly either (even without that) because we have widget.content.allow-gtk-dark-theme=false by default. I don't know when that was implemented.

So unless I'm missing something this is WFM, unless Martin disagrees?

No objections :)

Flags: needinfo?(stransky)
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.