Improve caching behaviour of -moz-bool-pref
Categories
(Core :: CSS Parsing and Computation, enhancement)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox89 | --- | fixed |
People
(Reporter: mconley, Assigned: emilio)
References
Details
Attachments
(1 file)
In bug 1697315, I added some CSS rules that use moz-bool-pref for a preference browser.proton.enabled. I ended up tripping a test failure in browser_preferences_usage.js, because apparently I was accessing that preference too often during startup.
That's not exactly expected. From our experience using moz-bool-pref, the preference should be read once and cached somehow. Generally, preference flips have not affected moz-bool-pref until restart. It's not clear to me how that caching works, and why it's not working in this case - though perhaps it's related to the fact that the moz-bool-pref read was occurring within checkbox.css, which is a CSS stylesheet scoped to a custom element.
Comment 1•5 years ago
•
|
||
I just hit the same for browser.proton.urlbar in Bug 1698834. I'll have to add another exception until it merges with the main pref.
| Assignee | ||
Comment 2•5 years ago
|
||
This means that dynamic changes will be handled correctly, we can use
StaticPrefs, etc.
Updated•5 years ago
|
| Assignee | ||
Comment 3•5 years ago
|
||
So -moz-bool-pref as is is wontfix, I think, but we can do better for specific prefs, and after the patch above adding these is relatively straight-forward (basically, defining the relevant token / pref pair in StaticAtoms / StaticPrefList.
Comment 5•5 years ago
|
||
| bugherder | ||
Description
•