Closed Bug 431306 Opened 17 years ago Closed 17 years ago

:-moz-system-metric() isn't live / should be updated when changing the OS theme

Categories

(Core :: CSS Parsing and Computation, enhancement)

enhancement
Not set
normal

Tracking

()

VERIFIED DUPLICATE of bug 447045

People

(Reporter: whimboo, Unassigned)

References

Details

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9pre) Gecko/2008042806 Minefield/3.0pre ID:2008042806 Depending on the selected OS theme Firefox choose its own theme. I tested it on Win XP and noticed that you have to restart the browser to take the changes in effect. I believe that there is a notification which will be sent by the system to inform running applications about the theme change. That could allow Firefox to immediately change its theme without a restart. I've filed that bug under Windows because I don't know how it is handled on Linux. OS X only uses one theme, correct?
I don't quite understand... If you go to the addons manager and enable a theme not presently in use, you have to restart the browser for it to take affect, (just like if you enable/disable any other addon) why do you expect it to change the theme without a restart? If your intention was that changing any theme in firefox shouldn't require a restart I think you should change the summary.
Well, if you change your Windows appearance from Luna Blue to Luna Olive, the color of the buttons, etc. in Firefox changes along, without a restart. If you change your Windows appearance from Classic to Luna Olive, your toolbars will change from a flat gray to something green with shadowy gradients, without a restart, and your buttons, which used to have sharp 90 degree angles will have the slightly rounded corners of Luna. But not all things change along: for example, anything styled differently with the "windows-default-theme" metric. Or the menus, if the theme change involves toggling the mFlatMenus flag (basically, when crossing the boundary between Classic and non-Classic).
(In reply to comment #2) > But not all things change along: for example, anything styled differently with > the "windows-default-theme" metric. Or the menus, if the theme change involves > toggling the mFlatMenus flag (basically, when crossing the boundary between > Classic and non-Classic). Or e.g. the locations bar left side. Switching from Luna to Classic or back doesn't exchange the rounded with square corners and vice versa.
(In reply to comment #3) > Or e.g. the locations bar left side. Switching from Luna to Classic or back > doesn't exchange the rounded with square corners and vice versa. Yes, because the square/non-square differentiation has been implemented using the windows-default-theme metric.
Is there a way to make windows-default-theme update itself dynamically?
Component: OS Integration → Widget: Win32
Product: Firefox → Core
QA Contact: os.integration → win32
I would write the patch, but I'm not sure how the change notification for these stuff works. CCing roc and dbaron to see if they can give me some idea to get started...
Summary: Changing OS theme should immediately apply new Firefox theme without the need to restart the browser → windows-default-theme metric isn't live / should be updated when changing the OS theme
nsPresContext::ThemeChangedInternal needs to get nsCSSRuleProcessor to rerun InitSystemMetrics (in the part conditional on sThemeChanged, I think, since it's operating on statics and thus should only happen once) and then (not conditional on sThemeChanged) tell its mStyleSet to call ClearRuleCascades on its rule processors (which might require exposing something we don't expose now). Or something like that... it's possible I'm missing something else that's cached, and that's only after thinking about it for 5 minutes.
Component: Widget: Win32 → Style System (CSS)
OS: Windows XP → All
QA Contact: win32 → style-system
Hardware: PC → All
Summary: windows-default-theme metric isn't live / should be updated when changing the OS theme → :-moz-system-metric() isn't live / should be updated when changing the OS theme
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → DUPLICATE
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.