Convert the varcache prefs in nsLayoutUtils.cpp to static prefs
Categories
(Core :: Preferences: Backend, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox70 | --- | fixed |
People
(Reporter: KrisWright, Assigned: KrisWright)
References
Details
Attachments
(14 files)
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details |
For the most part, the prefs in nsLayoutUtils follow this pattern:
static bool sShouldLog;
static bool sShouldLogPrefCached;
if (!sShouldLogPrefCached) {
sShouldLogPrefCached = true;
Preferences::AddBoolVarCache(
&sShouldLog, "layers.offmainthreadcomposition.log-animations");
}
return sShouldLog;
Or, they're declared in nsLayoutUtils::Initialize(). They look mostly straightforward and could be converted to use static prefs, with these add-pref-and-return-value functions removed.
Assignee | ||
Comment 1•5 years ago
|
||
Converts layers.offmainthreadcomposition.async-animations and layers.offmainthreadcomposition.log-animations to their respective static prefs. Since all IsAnimationLoggingEnabled() did was create a pref and return the variable sShouldLog, this function is removed and replaced with the static pref.
Assignee | ||
Comment 2•5 years ago
|
||
Converts layout.animated-image-layers.enabled to a static pref and removes the nsLayoutUtils::AnimatedImageLayersEnabled() function, replacing it with the static pref.
Assignee | ||
Comment 3•5 years ago
|
||
Converts layout.css.ruby.intercharacter.enabled to a static pref and removes the associated function nsLayoutUtils::IsInterCharacterRubyEnabled(). Also removes the macro INTERCHARACTER_RUBY_ENABLED_PREF_NAME, since it was only being used to add the varcache pref.
Assignee | ||
Comment 4•5 years ago
|
||
Creates the new 'font' category in StaticPrefList.yaml and adds font.size.inflation.maxRatio to the category. Removes the old static uint in nsLayoutUtils and the function that returns it.
Assignee | ||
Comment 5•5 years ago
|
||
Converts font.size.inflation.minTwips, font.size.inflation.emPerLine, and font.size.inflation.mappingIntercept to static prefs and removes their associated functions from nsLayoutUtils. There are associated member variables in PressShell, but since documentation specified that these variables are set specifically to prevent changes to the cache from being read until page reload, I made the decision to leave these and set them to the static prefs.
Assignee | ||
Comment 6•5 years ago
|
||
Converts font.size.inflation.lineThreshold varcache pref to a static pref. Like previous revisions, this retains the member variable in PresShell.
Assignee | ||
Comment 7•5 years ago
|
||
Converts font.size.inflation.forceEnabled and font.size.inflation.disabledInMasterProcess to static prefs. Like previous revisions, I retained the member variables in PresShell and set them to the static prefs.
Assignee | ||
Comment 8•5 years ago
|
||
Converts font.size.systemFontScale to a static pref. Removes the function in nsLayoutUtils and does the float division directly in PresShell.
Assignee | ||
Comment 9•5 years ago
|
||
Converts zoom.maxPercent and zoom.minPercent to static prefs, which creates a new "zoom" category on StaticPrefList.yaml.
Assignee | ||
Comment 10•5 years ago
|
||
Converts nglayout.debug.invalidation to a static pref. Retains the old getter function from the old static bool, because it makes an additional comparison.
Assignee | ||
Comment 11•5 years ago
|
||
Converts layout.interruptible-reflow.enabled to a static pref and updates its usage.
Assignee | ||
Comment 12•5 years ago
|
||
svg.transform-box.enabled is already a static pref, so I removed the varcache definition of it in nsLayoutUtils.
Assignee | ||
Comment 13•5 years ago
|
||
Converts layout.idle_period.required_quiescent_frames and layout.idle_period.time_limit to static prefs. These are the last prefs in nsLayoutUtils::initialize(), but since the function still calls nsComputedDOMStyle::RegisterPrefChangeCallbacks() the commit retains it.
Assignee | ||
Comment 14•5 years ago
|
||
Converts layout.css.outline-style-auto.enabled to a static pref and removes nsLayoutUtils::isOutlineStyleAutoEnabled().
Comment 15•5 years ago
|
||
Assignee | ||
Updated•5 years ago
|
Comment 16•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/0b74cfbb22fd
https://hg.mozilla.org/mozilla-central/rev/aa9e64f35d08
https://hg.mozilla.org/mozilla-central/rev/43cbfaf3e97e
https://hg.mozilla.org/mozilla-central/rev/5028fca248cc
https://hg.mozilla.org/mozilla-central/rev/cd573e89e3a8
https://hg.mozilla.org/mozilla-central/rev/266c9ff0255f
https://hg.mozilla.org/mozilla-central/rev/c84c8016d09e
https://hg.mozilla.org/mozilla-central/rev/2bfed8cd65e8
https://hg.mozilla.org/mozilla-central/rev/eb90a1fef7e9
https://hg.mozilla.org/mozilla-central/rev/b7bef0d94937
https://hg.mozilla.org/mozilla-central/rev/33dd94200b51
https://hg.mozilla.org/mozilla-central/rev/c657ac21f56a
https://hg.mozilla.org/mozilla-central/rev/def3d7b5c636
https://hg.mozilla.org/mozilla-central/rev/45e0edd03be0
Description
•