Add to addressbar in the Page Actions menu gives a blank icon when you pin "Add Search Engine"
Categories
(Firefox :: Toolbars and Customization, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr60 | --- | unaffected |
firefox64 | --- | wontfix |
firefox65 | --- | wontfix |
firefox66 | --- | fixed |
People
(Reporter: asa, Assigned: adw)
References
Details
(Keywords: regression)
Attachments
(1 file)
Comment 1•6 years ago
|
||
Comment 2•6 years ago
|
||
It works when I do it on the page having the search engine, if then I remove the added search engine and reload the page with the engine, I indeed get an empty space, as reported. Switching tab makes the icon appear. Something fishy.
Drew may know more about how this icon is set, maybe it's a timing problem, maybe the icon src is added when the button is not yet visible and we don't paint it.
Updated•6 years ago
|
Assignee | ||
Comment 3•6 years ago
|
||
The icon is set here: https://dxr.mozilla.org/mozilla-central/rev/c2593a3058afdfeaac5c990e18794ee8257afe99/browser/base/content/browser-pageActions.js#1124
It looks like this.engines[0].icon is null when _updateTitleAndIcon is called via updateOpenSearchBadge, at least sometimes. The stack I'm seeing when it's null is:
_updateTitleAndIcon@chrome://browser/content/browser-pageActions.js:1139:11
updateEngines@chrome://browser/content/browser-pageActions.js:1128:7
updateOpenSearchBadge@chrome://browser/content/browser.js:3966:5
addEngine@chrome://browser/content/browser.js:3956:9
addSearch@chrome://browser/content/browser.js:3745:5
receiveMessage@chrome://browser/content/browser.js:3675:9
MessageListener.receiveMessageinit@chrome://browser/content/browser.js:3650:5
onLoad@chrome://browser/content/browser.js:1325:5
EventHandlerNonNull@chrome://browser/content/browser.xul:108:19
It's easy to reproduce: Visit a site that offers an engine, add the "Add Search Engine" action to the urlbar, and reload the page. That triggers the stack above.
It's possible this has always been a problem, but it might be a regression, I don't know.
It looks like the icon comes from browser.mIconURL: https://dxr.mozilla.org/mozilla-central/rev/c2593a3058afdfeaac5c990e18794ee8257afe99/browser/base/content/browser.js#3977 So we'd need to somehow wait until that becomes non-null and then set the action's icon.
This isn't a problem for the search bar because the icon is only shown once the user opens the search bar menu, and by that time the icon is likely non-null.
Moving this to Toolbars, where page action bugs live.
Assignee | ||
Comment 4•6 years ago
|
||
Comment 5•6 years ago
|
||
This is likely another regression from bug 1453751. Previously the url for the favicon was sent to the browser very early in page load. Now we wait until we've actually loaded the icon's content which is probably after any search engines are detected.
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Updated•6 years ago
|
Comment 7•6 years ago
|
||
bugherder |
Updated•6 years ago
|
Description
•