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)
Tracking
()
Tracking | Status | |
---|---|---|
firefox91 | --- | verified |
People
(Reporter: mstange, Unassigned)
References
Details
(Whiteboard: [mac:darkmode][proton-cleanups])
Attachments
(1 file)
769.35 KB,
image/png
|
Details |
This is continued from bug 1704016, which landed a workaround for the pref-off state.
Steps to reproduce:
- Enable
widget.macos.respect-system-appearance
. - Set macOS to Dark Mode and Firefox to the light theme.
- Go to about:profiles.
- 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.
Reporter | ||
Comment 1•3 years ago
|
||
Reporter | ||
Comment 2•3 years ago
•
|
||
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.
Updated•3 years ago
|
Updated•3 years ago
|
Reporter | ||
Comment 3•3 years ago
|
||
(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.
Comment 4•3 years ago
|
||
This is fixed for me now that bug 1715145 has landed.
Comment 5•3 years ago
|
||
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.
Description
•