-
Drew Willcoxon authored
Bug 1678765 - Fix broken "Search with" action text for heuristic results that are restyled to look like search results. r=harry This was a little harder than it seemed like it should be because we show/hide the title separator in two places, in `UrlbarView.updateRow` and in the CSS. This patch gets rid of the show/hide in `updateRow`, so now we show/hide only in the CSS. The decision to show/hide in `updateRow` was based on whether the result has action text (`actionSetter`) or is a URL (`setURL`). We already had a `has-url` attribute that corresponds directly to `setURL`, so adding a similar `has-action` attribute that corresponds to `actionSetter` lets us show/hide only in the CSS. The second part of this patch is to actually fix the bug. For that, the existing `show-action-text` attribute does what we want in the CSS; the only problem is that we currently set it only when there's no selected row, but we need to also set it when there's no selected row but a one-off is selected. We have a similar block -- the one with a comment about restyling the heuristic to look like a search result -- so I removed the block that currently sets/removes the attribute and moved the set/removal there. I also renamed the attribute `restyled-search` to better semantically describe what's happening, but if you disagree I can restore the old name. Depends on D97843 Differential Revision: https://phabricator.services.mozilla.com/D98429
c33bf2e7