Closed Bug 1702351 Opened 3 years ago Closed 3 years ago

Stop overriding NSApp.appearance, and make native context menus / file picker / emoji picker follow system Dark Mode even if widget.macos.respect-system-appearance is false

Categories

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

All
macOS
task

Tracking

()

RESOLVED FIXED
89 Branch
Tracking Status
firefox89 --- fixed

People

(Reporter: mstange, Assigned: mstange)

References

Details

(Whiteboard: [mac:darkmode][mac:mr1][proton-context-menus])

Attachments

(2 files)

At the moment, widget.macos.respect-system-appearance is set to false. Bug 1623686 tracks setting it to true.

The remaining issues are all about clashes between these three pieces:

  • system colors
  • -moz-default-appearance rendering
  • NSWindow rendering (window background, toolbar background) for windows with window.appearance == nil

When widget.macos.respect-system-appearance is false, we currently override the NSApp appearance. This, by default, affects all windows, and it also affects native dialogs like the file picker and the emoji picker. And, as of bug 1702100, it also affects the appearance of native context menus on Big Sur and up.

In this bug I would like to change things so that we no longer override the NSApp appearance; instead, only the "three pieces" mentioned above should use the aqua override. This will immediately fix bug 1689028 and it'll also allow fixing bug 1593390 and bug 1558086, all without flipping the widget.macos.respect-system-appearance pref.
And it will make native context menus follow the system appearance without the pref, too.

This makes it so that native context menus, the file picker, and the emoji picker
will respect the system appearance even if widget.macos.respect-system-appearance
is false.
The pref widget.macos.respect-system-appearance now only applies to system colors
(nsLookAndFeel), -moz-default-appearance rendering (nsNativeThemeCocoa), and to
the effective NSWindow appearance for windows without an lwtheme appearance
override.

Pushed by mstange@themasta.com:
https://hg.mozilla.org/integration/autoland/rev/96250052e002
Stop overriding NSApp.appearance if widget.macos.respect-system-appearance is false; instead, only override NSWindow appearance, nsLookAndFeel appearance and nsNativeThemeCocoa appearance. r=spohl
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 89 Branch
Regressions: 1702877
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: