Bug
1884146 - Cross containers switch-tab artifacts remain on other address bar results. r=jteow
The heuristic result is always kept first when receiving new results, that means
any result could be upgraded to be a heuristic result, including the first Top
Site, as in the zero prefix case there's no heuritic.
Thus it's safer to generate new DOM contents when upgrading between heuristic and
non-heuristic.
Also switch-tab results with container info have complex structure and should
generate new DOM contents, unless they are reused by other switch-tab results.
Unfortunately these changes are mostly visual and not easily testable, as it would
be very time consuming.
In general, for the long term, reusing the DOM of results is fragile and causes
nodes, attributes or classes to be ported over to incompatible results. We do it
to avoid flicker, but we must investigate better ways to do it.
Differential Revision: https://phabricator.services.mozilla.com/
D204483