-
Boris Chiou authored
Bug 1528960 - Query MacOS system dark mode only on the main browser process or it's the initial query on the child process. r=hiro Based on the implementation and issues on prefers-reduced-motion, it seems we have the same issue on the dark mode. In child processes on MacOSX we don't spin native event loop at all. Without native event loops, the global preference returned from `SystemWantsDarkTheme()` doesn't return up-to-date value when the system setting changed for some reasons. To workaround this we call `SystemWantsDarkTheme()` only on the parent process which spins native event loop or when it's the initial query on the child process. And we give the up-to-date value to the child process via an IPC call just like other cached values do. Differential Revision: https://phabricator.services.mozilla.com/D21303 --HG-- extra : moz-landing-system : lando
eedd09df