Bug 1672097 - Part 1: Make Gtk theme overrides work with the RemoteLookAndFeel. r...
commit1c539d280e451785471983e2562d2a885814f1fb
authorCameron McCormack <cam@mcc.id.au>
Wed, 16 Dec 2020 04:41:05 +0000 (16 04:41 +0000)
committerCameron McCormack <cam@mcc.id.au>
Wed, 16 Dec 2020 04:41:05 +0000 (16 04:41 +0000)
treef9bfb5697aec448472bc00a245e981e38a1ece97
parent907aa1cd3c1760e6fc3b2425240a878ee1f8d05d
Bug 1672097 - Part 1: Make Gtk theme overrides work with the RemoteLookAndFeel. r=spohl,karlt

When the RemoteLookAndFeel is not in use, content processes override the
Gtk theme in some circumstances (e.g. if the theme is a dark variant, we
try choosing the light one, since that works better with Web content).

When the RemoteLookAndFeel is in use, the parent process needs to handle
this.  So we temporarily set the parent process to the overridden theme,
extract the FullLookAndFeel data, then restore the original theme.  We
make sure to avoid throwing away any cached data and restyling every
document as a result of the temporary theme change.

Differential Revision: https://phabricator.services.mozilla.com/D98418
widget/RemoteLookAndFeel.cpp
widget/gtk/nsLookAndFeel.cpp
widget/gtk/nsLookAndFeel.h
widget/gtk/nsWindow.cpp
widget/gtk/nsWindow.h
widget/nsXPLookAndFeel.h