Closed Bug 1584950 Opened 4 months ago Closed 4 months ago

Use StaticPrefs in ScrollFrameHelper::IsSmoothScrollingEnabled.

Categories

(Core :: Layout, task, P3)

task

Tracking

()

RESOLVED FIXED
mozilla71
Tracking Status
firefox71 --- fixed

People

(Reporter: emilio, Assigned: emilio)

Details

Attachments

(1 file)

No description provided.

Kris: here's an example where a pref value is specified in firefox.js but it's the same value as what is specified in StaticPrefList.yaml. Detecting such cases (including redundant overrides in mobile.js, as well as prefs defined in all.js) would be a nice extension of the prefs linter, if you are in the mood.

Flags: needinfo?(kwright)
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0dfb6920936b
Use StaticPrefs in ScrollFrameHelper::IsSmoothScrollingEnabled. r=njn

(In reply to Nicholas Nethercote [:njn] from comment #2)

Kris: here's an example where a pref value is specified in firefox.js but it's the same value as what is specified in StaticPrefList.yaml. Detecting such cases (including redundant overrides in mobile.js, as well as prefs defined in all.js) would be a nice extension of the prefs linter, if you are in the mood.

I've been thinking about that lately, so I guess it's time to file a bug for it. Finding the names alone is easy enough (I can add a use case for the linter to use the optional |path| input, then pass that pref file to be loaded instead of all.js) but in its current state the linter doesn't look at value because it has no understanding of preprocessing. First we would have to revisit the idea of preprocessing the yaml file so it understands concepts like @IS_VALUE@, which means declaring some sort of dummy buildconfig. Or we can just note the limitations of the linter (e.g. 'Lintpref doesn't understand #defines so it's always best to double-check') and let it handle what values it can understand.

Flags: needinfo?(kwright)
Status: NEW → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla71
You need to log in before you can comment on or make changes to this bug.