Closed Bug 1876811 Opened 1 year ago Closed 1 year ago

Remove some cached prefs from nsPresContext

Categories

(Core :: Layout, task)

task

Tracking

()

RESOLVED FIXED
124 Branch
Tracking Status
firefox124 --- fixed

People

(Reporter: dholbert, Assigned: dholbert)

References

Details

Attachments

(3 files)

Followup on https://phabricator.services.mozilla.com/D199690 review feedback: nsPresContext has several cached prefs, which were probably cached for performance reasons (so that we can check the value quickly when we need it). But nowadays we have StaticPrefs pref-getters which are fast, so there's probably no need for nsPresContext to do this caching.

While we're at it, remove the nsPresContext's caching machinery for this pref,
and just directly use the StaticPrefs getter at the one usage site.

This patch doesn't affect behavior.

Instead, just directly use the StaticPrefs getter for this pref at all the
usage-sites (including the callsite of GetCachedIntPref that queries for this
value via a no-longer-necessary enum value).

This patch doesn't change behavior.

Instead, just directly use the StaticPrefs getter for this pref at the one
usage-site, and remove the now-unnecessary GetCachedIntPref getter and
enum-parameter-type that was previously used to query the value.

This patch doesn't change behavior.

Attachment #9376749 - Attachment description: Bug 1876811: Change about:config pref 'dom.send_after_paint_to_content' to a static pref instead of being defined in all.js. r?TYLin → Bug 1876811: Change about:config pref 'dom.send_after_paint_to_content' to a static pref instead of defining it in all.js. r?TYLin
See Also: → 1876867
Pushed by dholbert@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2b7e8a3f4751 Change about:config pref 'dom.send_after_paint_to_content' to a static pref instead of defining it in all.js. r=TYLin https://hg.mozilla.org/integration/autoland/rev/2e6f427c053a Remove nsPresContext's cache for about:config pref bidi.direction. r=TYLin,emilio https://hg.mozilla.org/integration/autoland/rev/d7fa22972e13 Remove nsPresContext's cache for about:config pref "layout.scrollbar.side". r=TYLin
Pushed by dholbert@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5e1c10a5832c Change about:config pref 'dom.send_after_paint_to_content' to a static pref instead of defining it in all.js. r=TYLin https://hg.mozilla.org/integration/autoland/rev/126b8c56970e Remove nsPresContext's cache for about:config pref bidi.direction. r=TYLin,emilio https://hg.mozilla.org/integration/autoland/rev/1e79d9e65ec0 Remove nsPresContext's cache for about:config pref "layout.scrollbar.side". r=TYLin
Flags: needinfo?(dholbert)

Backed out for causing bp-nu bustages in nsGfxScrollFrame.cpp.

  • Backout link
  • Push with failures
  • Failure Log
  • Failure line: /builds/worker/checkouts/gecko/layout/generic/nsGfxScrollFrame.cpp:6029:27: error: no member named 'bidi_direction' in namespace 'mozilla::StaticPrefs'
Flags: needinfo?(dholbert)

D'oh, sorry about that. I probably need an include for StaticPrefs_bidi.h or something.

I'll take a look and reland on Monday.

Pushed by dholbert@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4ca084cba295 Change about:config pref 'dom.send_after_paint_to_content' to a static pref instead of defining it in all.js. r=TYLin https://hg.mozilla.org/integration/autoland/rev/967e096791ea Remove nsPresContext's cache for about:config pref bidi.direction. r=TYLin,emilio https://hg.mozilla.org/integration/autoland/rev/0f372a16b1e1 Remove nsPresContext's cache for about:config pref "layout.scrollbar.side". r=TYLin
Flags: needinfo?(dholbert)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: