Bug 1773025 Comment 2 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

I was wrong, this isn't just about the placeholder. There are two problems:

1. The placeholder is incorrectly autofilled when the provider does not return an autofill result (before you type the full `input` in the record), causing flickering
2. Using the STR above, the provider still returns an autofill result (after you type the full `input` in the record)

The second problem is pretty bad. It happens because the `moz_inputhistory` record still exists; however, in `moz_places`, the frecency and visit count are both zero. For adaptive autofill, all we check is `moz_inputhistory`. We need to also make sure the frecency and/or visit count are > 0, probably.

Note that this is not a problem for the input history provider. If I disable adaptive autofill and type the record's input, no input history result is shown. AFAICT that's because the input history provider [uses](https://searchfox.org/mozilla-central/rev/97c13320e56884daf14016048e9d2182c880f8a9/browser/components/urlbar/UrlbarProviderInputHistory.jsm#66) `autocomplete_match()` to filter rows, and `autocomplete_match()` normally [allows](https://searchfox.org/mozilla-central/rev/97c13320e56884daf14016048e9d2182c880f8a9/toolkit/components/places/SQLFunctions.cpp#467-474) a row only when its visit count is > 0.

That said, the adaptive history record is eventually deleted, I'm not sure by what or how long it takes (a few minutes in my testing) but IIRC Places performs period cleanups.
I was wrong, this isn't just about the placeholder. There are two problems:

1. The placeholder is incorrectly autofilled when the provider does not return an autofill result (before you type the full `input` in the record), causing flickering
2. Using the STR above, the provider still returns an autofill result (after you type the full `input` in the record)

The second problem is pretty bad. It happens because the `moz_inputhistory` record still exists; however, in `moz_places`, the frecency and visit count are both zero. For adaptive autofill, all we check is `moz_inputhistory`. We need to also make sure the frecency and/or visit count are > 0, probably.

Note that this is not a problem for the input history provider. If I disable adaptive autofill and type the record's input, no input history result is shown. AFAICT that's because the input history provider [uses](https://searchfox.org/mozilla-central/rev/97c13320e56884daf14016048e9d2182c880f8a9/browser/components/urlbar/UrlbarProviderInputHistory.jsm#66) `autocomplete_match()` to filter rows, and `autocomplete_match()` normally [allows](https://searchfox.org/mozilla-central/rev/97c13320e56884daf14016048e9d2182c880f8a9/toolkit/components/places/SQLFunctions.cpp#467-474) a row only when its visit count is > 0.

That said, the adaptive history record is eventually deleted, I'm not sure by what or how long it takes (a few minutes in my testing) but IIRC Places performs periodic cleanups.

Back to Bug 1773025 Comment 2