mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-10 05:08:36 +02:00
We should replace the context.autofillValue property with a result.autofill property. When the view selects results, it already notifies the input about it by calling input.setValueFromResult(). So we can modify setValueFromResult to check for the presence of result.autofill and thereby get autofill "for free".
result.autofill is an object: { value, selectionStart, selectionEnd }
This is going to help me implement bug 1521702.
One potentially cool thing about doing autofill this way is that any result can now trigger autofill, not only the heuristic result, and do it easily. Of course the user isn't typing when they select a non-heuristic result, so it's probably not fair to call that "autofill", but the result can trigger the selection aspect of autofill. As one example, that might be interesting for search suggestions: Type "foo", key down to the "foobar" suggestion, and the "bar" substring is automatically selected.
Differential Revision: https://phabricator.services.mozilla.com/D18618
--HG--
extra : moz-landing-system : lando
|
||
|---|---|---|
| .. | ||
| data | ||
| .eslintrc.js | ||
| head.js | ||
| test_muxer.js | ||
| test_providerOpenTabs.js | ||
| test_providersManager.js | ||
| test_providersManager_filtering.js | ||
| test_providersManager_maxResults.js | ||
| test_providerUnifiedComplete.js | ||
| test_tokenizer.js | ||
| test_UrlbarController_integration.js | ||
| test_UrlbarController_telemetry.js | ||
| test_UrlbarController_unit.js | ||
| test_UrlbarQueryContext.js | ||
| test_UrlbarUtils_addToUrlbarHistory.js | ||
| test_UrlbarUtils_getShortcutOrURIAndPostData.js | ||
| xpcshell.ini | ||