Closed Bug 1710122 Opened 3 years ago Closed 3 years ago

White-on-white text in sheet windows with System Dark + Firefox Light theme, if widget.macos.respect-system-appearance is true - Inherit lwtheme-based ColorScheme into sheet windows

Categories

(Core :: Widget: Cocoa, defect, P2)

All
macOS
defect

Tracking

()

VERIFIED FIXED
Tracking Status
firefox91 --- verified

People

(Reporter: mstange, Unassigned)

References

Details

(Whiteboard: [mac:darkmode][proton-cleanups])

Attachments

(1 file)

This is continued from bug 1704016, which landed a workaround for the pref-off state.

Steps to reproduce:

  1. Enable widget.macos.respect-system-appearance.
  2. Set macOS to Dark Mode and Firefox to the light theme.
  3. Go to about:profiles.
  4. Click "Create a New Profile".

Expected results:
The dialog should have a bright background and dark text, because it's shown within a Light Firefox window.

Actual results:
The text is unreadable white-on-white.


This happens because the dialog is a document which does not have lwtheme attributes. So the system color ColorScheme is picked based on the system appearance, which is dark. However, the dialog background is drawn by the parent window, which uses the Light window appearance. So there's a mismatch between the foreground colors used in the dialog document, and the background which comes from the parent window.

Attached image screenshot

One way to fix this would be to make the widget do the inheriting, and then to pick the document's ColorScheme by asking the widget. For example, we could set the appearanceSource for sheet windows to the sheetParent, and then use the document's window widget's NSWindow's effectiveAppearance to determine the document's ColorScheme. Then the widget would also need the ability to let the document know when its effectiveAppearance changes, so that the document can do a restyle and update everything that uses a CSS system color.

Another way to fix this would be to stop supporting per-window ColorSchemes / appearances, and have the Firefox theme influence the rendering of all windows. For example, if a dark lwtheme is picked but the system is set to Light mode, we would render a dark Page Info window.

Severity: -- → S2
Priority: -- → P2
Whiteboard: [mac:darkmode]
Whiteboard: [mac:darkmode] → [mac:darkmode][proton-cleanups]

(In reply to Markus Stange [:mstange] from comment #2)

Another way to fix this would be to stop supporting per-window ColorSchemes / appearances, and have the Firefox theme influence the rendering of all windows. For example, if a dark lwtheme is picked but the system is set to Light mode, we would render a dark Page Info window.

Bug 1715145 will implement this approach.

Depends on: 1715145

This is fixed for me now that bug 1715145 has landed.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED

Reproduced the issue with 90.0a1 (20210507214625) on macOS 11.4. Verified fixed with 91.0a1 (20210623214552) on macOS 11.4. Create a new profile window is displayed as expected when following STR from comment 0.

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

Attachment

General

Created:
Updated:
Size: