gecko-dev/browser
Drew Willcoxon 80e0f95944 Bug 1694237 - Properly discard duplicate suggestions in urlbar results. r=mak
This was a little more work than I first thought because fixing it uncovered
another problem: The recurse logic in the muxer isn't quite right. There are a
couple of problems actually:

1. By re-using the results from children that did not fill up, we skip updating
   `stateCopy` (and therefore `state`), which messes up subsequent buckets in
   the recursion because they're working with the wrong state.
2. By simply assigning `state = stateCopy` after handling children that didn't
   fill up, we're not really doing anything because at that point the function
   is done. The caller and subsequent buckets in the recursion won't see the
   updated state. We need to update `state` in place.

These problems were revealed in test_resultBuckets.js, which is pretty thorough.

To fix the actual problem that the bug is about (not deduping remote suggestions
and form history), we just need to keep a set of suggestions that the muxer has
seen so far, and then `_canAddResult` can discard dupe suggestions. This patch
adds `state.suggestions` for that, and it includes form history, remote
suggestions, and the heuristic query when it's a search result. This way the
relative ordering of form history vs. remote suggestions doesn't matter. We'll
dedupe whichever comes later.

A bunch of tasks in test_resultBuckets.js needed to be updated to account for
this because they were incorrectly not expecting dupes to be removed.

Differential Revision: https://phabricator.services.mozilla.com/D106030
2021-02-23 17:17:31 +00:00
..
actors Bug 1693644 - Only show a label for the camera/mic in the WebRTC device selector if there's only 1 device available or requested. r=pbz 2021-02-23 15:13:45 +00:00
app Bug 1693178 - Show the Quick Suggest help/info button the first 5 times the user sees a Quick Suggest result. r=daleharvey 2021-02-22 22:20:18 +00:00
base Bug 1692553 - Remove "View page info" from page context menu r=Gijs 2021-02-23 16:09:43 +00:00
branding Bug 1677801, adds UTM parameters to about dialog r=bigiri 2020-12-07 21:16:33 +00:00
components Bug 1694237 - Properly discard duplicate suggestions in urlbar results. r=mak 2021-02-23 17:17:31 +00:00
config Update configs. IGNORE BROKEN CHANGESETS CLOSED TREE NO BUG a=release ba=release 2021-02-22 12:50:45 +00:00
docs Bug 1681382 - Drop BrowserSearch.record*SearchInTelemetry and call BrowserSearchTelemetry direct. r=daleharvey 2020-12-10 23:40:58 +00:00
extensions Bug 1690573 - Migrate the report-site-issue UI access point to the Help menu. r=denschub,mixedpuppy,fluent-reviewers,webcompat-reviewers,flod 2021-02-23 00:11:05 +00:00
fonts
fxr Bug 1660848 - Add a check for updates option to application menus r=fluent-reviewers,jaws,harry,Gijs,flod,mkaply 2021-01-15 14:26:58 +00:00
installer Bug 1691951 - Make Windows install not register "ftp" protocol handler. r=application-update-reviewers,bytesized 2021-02-22 17:52:24 +00:00
locales Bug 1692553 - Remove "View page info" from page context menu r=Gijs 2021-02-23 16:09:43 +00:00
modules Bug 1691527 - remove email bits from content process crash dialog. r=mconley 2021-02-22 17:46:29 +00:00
themes Bug 1690131: create proton-specific fxa menu r=mconley,markh,fluent-reviewers,flod 2021-02-23 15:37:12 +00:00
tools/mozscreenshots Bug 1608272 - Remove 'this' as the second argument to 'ChromeUtils.import', use object destructuring instead (test-only changes). r=Gijs 2021-02-11 22:02:15 +00:00
.eslintrc.js
LICENSE
Makefile.in
app.mozbuild
build.mk
confvars.sh
defs.mk
l10n-registry.manifest
moz.build
moz.configure