Files
tubestation/browser/components/urlbar
Drew Willcoxon d474858fb8 Bug 1701193 - Don't place suggestedIndex results in the wrong spot during view updates. r=mak
This should fix flickering related to suggested indexes once and for all, knock
on wood. It fixes the view-update logic so that if we encounter a new
suggestedIndex result that can't be placed in the correct spot during the first
loop, we stop trying to update rows at that point and instead mark the remaining
rows as stale. Then we reach the loop that appends the remaining results, and we
append them all starting with the suggestedIndex result. Those results are
hidden at first so that the suggestedIndex result never appears in the wrong
spot.

This fixes bug 1701193 and the flickering problem I noted in bug 1701136. It
also fixes the flicker we have right now with the tab-to-search onboarding
result, where during the view update we briefly have 10 results in the view even
though there should only be 9 since the tab-to-search has a span of 2.

At first I had one big test file for this, but not surprisingly it timed out on
some try machines. So I split it up, moved the new files to a new directory, and
moved the two existing browser_updateRows tests there too.

The new tests all do two searches where the first search returns search
suggestions and the second returns URL results. It would be good to test the
opposite too but this patch is already big enough.

Differential Revision: https://phabricator.services.mozilla.com/D110365
2021-04-01 19:26:43 +00:00
..