Closed Bug 1692224 Opened 5 years ago Closed 5 years ago

Select elements use same foreground/background color in devtools with dark theme and NNT enabled, or on all content with widget.content.allow-gtk-dark-theme=true

Categories

(Core :: Widget, defect)

Firefox 87
defect

Tracking

()

RESOLVED FIXED
87 Branch
Tracking Status
firefox87 --- fixed

People

(Reporter: sdk, Assigned: emilio)

References

Details

Attachments

(3 files)

STR

  1. Open devtools (ctrl+shift+i)
  2. Press F1 to open the settings panel
  3. Enable dark theme

EB

Select elements should use a black text on a white background

AB

Select elements use a white text on a white background

Blocks: 1691538

It was an explicit decision for non-native form controls to not detect and/or respond to dark mode. Presumably, the text for the select elements is CSS styled, correct? I'd suggest either styling the select itself, or not changing the font color to white when the non-native theme is enabled.

Flags: needinfo?(contact)

(In reply to Stephen A Pohl [:spohl] from comment #1)

Presumably, the text for the select elements is CSS styled, correct? I'd suggest either styling the select itself, or not changing the font color to white when the non-native theme is enabled.

I don't know. You'll have to ask that to the Firefox Devtools team. Should I change the product/component to Devtools::General?

Flags: needinfo?(contact)

Yes, let's reassign this to get some eyes on this. Thank you!

Component: Widget → General
Product: Core → DevTools
See Also: → 1692306

So this seems a more general issue with any code that runs in the parent process with a dark GTK theme.

The ultimate issue is, on one hand, that widget.content.allow-gtk-dark-theme effectively only works at the content process boundary, and not for content documents that run in the parent process. But even with that fixed, it'd be an issue if you flip that pref on for regular content.

Two options:

  • The first, which is easier, is: Disable non-native theme on the parent process altogether, disable allow_gtk_dark_theme if non-native-theme is enabled.

  • The second, which should be easy too, would be to make the system colors that we use on forms.css account for non-native-theme (which I think would be relatively trivial too)...

I think I want to try the second one, but we'll see. Anyhow this is not devtools-specific.

Component: General → Widget
Flags: needinfo?(emilio)
Product: DevTools → Core
Summary: Select elements use same foreground/background color in devtools with dark theme and NNT enabled → Select elements use same foreground/background color in devtools with dark theme and NNT enabled, or on all content with widget.content.allow-gtk-dark-theme=true
Assignee: nobody → emilio
Status: NEW → ASSIGNED

It's not set to false anywhere and the browser would be quite broken
with it set to false.

Depends on D104905

Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3b1604a7313a Use standins for system colors pairs that paint over non-native theme widgets to guarantee contrast. r=spohl https://hg.mozilla.org/integration/autoland/rev/530980f4a015 Remove ui.use_native_colors. r=spohl
Flags: needinfo?(emilio)
Pushed by abutkovits@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b9f69753275d make test anonymous-button-content-box.html and test propagate-text-decoration.html pass on linux r=test-only. CLOSED TREE

Hi Emilio, your changes cased web platform reftest failures and we set the tests to pass. If that's not the way you want to fix it, please revert the changes. Thank you.
Failure log: https://treeherder.mozilla.org/logviewer?job_id=329733210&repo=autoland&lineNumber=19121

[task 2021-02-12T04:20:17.409Z] 04:20:17 INFO - TEST-START | /html/rendering/widgets/button-layout/anonymous-button-content-box.html
[task 2021-02-12T04:20:17.478Z] 04:20:17 INFO - PID 3366 | 1613103617476 Marionette INFO Testing http://web-platform.test:8000/html/rendering/widgets/button-layout/anonymous-button-content-box.html == http://web-platform.test:8000/html/rendering/widgets/button-layout/anonymous-button-content-box-ref.html
[task 2021-02-12T04:20:18.426Z] 04:20:18 INFO - PID 3366 | 1613103618425 Marionette INFO No differences allowed
[task 2021-02-12T04:20:18.471Z] 04:20:18 INFO - TEST-UNEXPECTED-PASS | /html/rendering/widgets/button-layout/anonymous-button-content-box.html | Testing http://web-platform.test:8000/html/rendering/widgets/button-layout/anonymous-button-content-box.html == http://web-platform.test:8000/html/rendering/widgets/button-layout/anonymous-button-content-box-ref.html

[task 2021-02-12T04:20:22.935Z] 04:20:22 INFO - TEST-START | /html/rendering/widgets/button-layout/propagate-text-decoration.html
[task 2021-02-12T04:20:22.941Z] 04:20:22 INFO - PID 3891 | 1613103622939 Marionette INFO Testing http://web-platform.test:8000/html/rendering/widgets/button-layout/propagate-text-decoration.html == http://web-platform.test:8000/html/rendering/widgets/button-layout/propagate-text-decoration-ref.html
[task 2021-02-12T04:20:23.257Z] 04:20:23 INFO - PID 3891 | 1613103623256 Marionette INFO No differences allowed
[task 2021-02-12T04:20:23.318Z] 04:20:23 INFO - TEST-UNEXPECTED-PASS | /html/rendering/widgets/button-layout/propagate-text-decoration.html | Testing http://web-platform.test:8000/html/rendering/widgets/button-layout/propagate-text-decoration.html == http://web-platform.test:8000/html/rendering/widgets/button-layout/propagate-text-decoration-ref.html

Flags: needinfo?(emilio)

No, that's awesome, thank you!

Flags: needinfo?(emilio)

Ah, probably will need to add a and non_native_theme: to the expectation so they don't fail on beta.

Flags: needinfo?(emilio)
Flags: needinfo?(emilio)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: