Skip to content
  • Drew Willcoxon's avatar
    Bug 1678155 - Restyle all heuristic result types when a one-off is... · 72ff93fc
    Drew Willcoxon authored
    Bug 1678155 - Restyle all heuristic result types when a one-off is selected/search mode is previewed. r=harry
    
    We currently restyle URL heuristic results when a one-off is selected/search
    mode is previewed, but afaict we should restyle all types. In the case of this
    bug, the heuristic is a search result. I ended up rewriting most of
    browser_oneOffs_heuristicRestyle.js to check various result types (URL, search,
    and keyword) and both Alt-arrowing and non-Alt-arrowing down to the one-offs in
    case that makes a difference.
    
    This fixes part of bug 1678765, the part where we do the wrong thing when a
    restyled keyword result is picked. It doesn't fix the visual part where the
    action text is flush against the title text.
    
    This also fixes a small error in `UrlbarView._on_SelectedOneOffButtonChanged`
    where we were using `result.payload.title` when restyling heuristics, but
    `result.title` is the correct property.
    
    Depends on D97376
    
    Differential Revision: https://phabricator.services.mozilla.com/D97843
    72ff93fc