Remove search suggestions dependency on satchel
Categories
(Firefox :: Search, task, P3)
Tracking
()
People
(Reporter: standard8, Unassigned)
References
Details
In bug we are simplifying some of the search suggestion code, but this also exposes a direct dependency on satchel. Marco suggested that we could probably replace that in this manner:
Implement nsIAutocompleteSearch (and we have it in SearchSuggesions.sys.mjs), we can just create an instance of Ci.nsIAutoCompleteSimpleResult, and put results into it. Though that means we would have to write our own nsIAutoCompleteSimpleResult implementation.
Having our own implementation would mean that we would have to handle removeValueAt
for the search bar case.
Overall this would probably help to avoid confusion between the two FormAutoCompleteResult
definitions that exist in satchel.
Comment 1•1 year ago
•
|
||
We are currently wrapping results in FormAutoCompleteResult from FormAutoComplete.sys.mjs, then we take that result and wrap it into FormAutoCompleteResult from nsFormAutoCompleteResult.sys.mjs.
We could instead implement our own SearchHistoryResult (implementation of nsIAutoCompleteSimpleResult) and handle removeValueAt directly using FormHistory.update, without the need of any wrapper from Satchel.
Description
•