forked from mirrors/gecko-dev
When the heuristic is hidden, we shouldn't exclude results that dupe it. I realized this while working on the top hit bug 1723160. I have nytimes.com in my profile with a very high frecency. When I enable the `hideHeuristic` pref, nytimes.com autofills but it doesn't appear anywhere in the results, which is confusing. After autofill, if I start to backspace over characters, then it appears as the top hit because when backspacing the heuristic becomes a search result. There are three cases where we dedupe that currently depend on the heuristic and therefore need to take into account when the heuristic is hidden: * Autofill * Prefix ranking/priority * Search suggestions The search suggestions case is maybe debatable. If you type "foo" and there's a "foo" search suggestion but the heuristic is hidden, should we exclude the suggestion? IMO we should include it because it may not be clear to the user that pressing enter without selecting a result will perform a search for "foo". It's better to let them see the result and select it. That means we may end up pushing out the last search suggestion we would have otherwise shown, but the last suggestion would have been pushed out anyway if the heuristic weren't hidden, and IIRC we know that people rarely pick suggestions or results far down the list anyway. In fact excluding the first suggestion probably excludes exactly what they want to search for. I've updated the relevant tests so they run some tasks with `hideHeuristic` enabled. I removed test_dupe_urls.js because I checked it to see if it needs updating and it doesn't really do anything. It doesn't even call `PlacesTestUtils.addVisits` correctly because it passes in two URLs, but `addVisits` only takes one argument. Differential Revision: https://phabricator.services.mozilla.com/D124564 |
||
|---|---|---|
| .. | ||
| content | ||
| docs | ||
| tests | ||
| unitconverters | ||
| .eslintrc.js | ||
| jar.mn | ||
| moz.build | ||
| UrlbarController.jsm | ||
| UrlbarEventBufferer.jsm | ||
| UrlbarInput.jsm | ||
| UrlbarMuxerUnifiedComplete.jsm | ||
| UrlbarPrefs.jsm | ||
| UrlbarProviderAboutPages.jsm | ||
| UrlbarProviderAliasEngines.jsm | ||
| UrlbarProviderAutofill.jsm | ||
| UrlbarProviderBookmarkKeywords.jsm | ||
| UrlbarProviderCalculator.jsm | ||
| UrlbarProviderExtension.jsm | ||
| UrlbarProviderHeuristicFallback.jsm | ||
| UrlbarProviderInputHistory.jsm | ||
| UrlbarProviderInterventions.jsm | ||
| UrlbarProviderOmnibox.jsm | ||
| UrlbarProviderOpenTabs.jsm | ||
| UrlbarProviderPlaces.jsm | ||
| UrlbarProviderPreloadedSites.jsm | ||
| UrlbarProviderPrivateSearch.jsm | ||
| UrlbarProviderQuickSuggest.jsm | ||
| UrlbarProviderRemoteTabs.jsm | ||
| UrlbarProviderSearchSuggestions.jsm | ||
| UrlbarProviderSearchTips.jsm | ||
| UrlbarProvidersManager.jsm | ||
| UrlbarProviderTabToSearch.jsm | ||
| UrlbarProviderTokenAliasEngines.jsm | ||
| UrlbarProviderTopSites.jsm | ||
| UrlbarProviderUnitConversion.jsm | ||
| UrlbarQuickSuggest.jsm | ||
| UrlbarResult.jsm | ||
| UrlbarSearchOneOffs.jsm | ||
| UrlbarSearchUtils.jsm | ||
| UrlbarTokenizer.jsm | ||
| UrlbarUtils.jsm | ||
| UrlbarValueFormatter.jsm | ||
| UrlbarView.jsm | ||