Bug 1805669 - Show a button next to deletable suggestions added by extensions r=adw

Differential Revision: https://phabricator.services.mozilla.com/D164675
This commit is contained in:
Gregory Pappas
2022-12-19 12:14:15 +00:00
parent 277e097424
commit 65e2a256d0
2 changed files with 6 additions and 6 deletions

View File

@@ -67,11 +67,11 @@ class ProviderOmnibox extends UrlbarProvider {
* Whether the result was blocked.
*/
blockResult(queryContext, result) {
if (result.payload.deletable) {
if (result.payload.isBlockable) {
lazy.ExtensionSearchHandler.handleInputDeleted(result.payload.title);
}
return result.payload.deletable;
return result.payload.isBlockable;
}
/**
@@ -179,7 +179,7 @@ class ProviderOmnibox extends UrlbarProvider {
queryContext.tokens[0].value,
UrlbarUtils.HIGHLIGHT.TYPED,
],
deletable: suggestion.deletable,
isBlockable: suggestion.deletable,
icon: UrlbarUtils.ICON.EXTENSION,
}
)

View File

@@ -1643,12 +1643,12 @@ UrlbarUtils.RESULT_PAYLOAD_SCHEMA = {
content: {
type: "string",
},
deletable: {
type: "boolean",
},
icon: {
type: "string",
},
isBlockable: {
type: "boolean",
},
keyword: {
type: "string",
},