Closed Bug 1520342 Opened 5 years ago Closed 5 years ago

QueryContext.autofill is variously spelled autofill and autoFill

Categories

(Firefox :: Address Bar, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
Firefox 66
Tracking Status
firefox66 --- fixed

People

(Reporter: adw, Assigned: adw)

References

Details

Attachments

(1 file)

In UrlbarProviderUnifiedComplete.jsm, context.autofill is spelled with a lowercase F, but everywhere else (the controller mostly), it's spelled with an uppercase F.

We should use a lowercase F since as far as I've seen, that's how we spell it nowadays. The pref name uses an uppercase F, which is too bad, but we shouldn't worry about changing it.

One related thing is that inside UrlbarController, context.autofill is set like this:

queryContext.autofill = UrlbarPrefs.get("autoFill");

i.e., it means whether autofill is enabled.

But in UrlbarProviderUnifiedComplete, it's set if the first result is an autofill result.

So there's a disconnect in what this property means. The rst doc says it's "whether the first match is an autofill match", and I think clearly that's what it should mean, not whether autofill is enabled.

I'd like to fix this in a new bug though, and the patch here just renames its current usage in the controller.

(In reply to Drew Willcoxon :adw from comment #2)

One related thing is that inside UrlbarController, context.autofill is set like this:

queryContext.autofill = UrlbarPrefs.get("autoFill");

i.e., it means whether autofill is enabled.

But in UrlbarProviderUnifiedComplete, it's set if the first result is an autofill result.

Yeah, this is wrong, it looks like we ended up using the same property, please file a bug if you didn't yet.

Bug 1520368, sorry, meant to note it here earlier

Pushed by dwillcoxon@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/af8ebdf790ba
Fix autofill and autoFill inconsistency by standardizing on autofill (lowercase F). r=mak
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 66
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: