Bug 1845349 Comment 0 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

While working on bug 1844150, I discovered that Reader Mode is checking if the favicon is present in Places, and if it is, it's trying to read it from it.
https://searchfox.org/mozilla-central/rev/d6960b4e32d09bff32865694e32384eb9bca4af5/browser/actors/AboutReaderParent.sys.mjs#104,106-109,112

Unfortunately that never worked.
`GetFaviconLinkForIcon` generates a `moz-anno:favicon:icon_url` link, but then `iconUri.pathQueryRef.replace(/^favicon:/, "")` removes it... So in practice what we pass to the parent is just the icon uri, that will likely be read from the network cache, surely not from Places.

Even if we'd pass a moz-anno:favicon: uri, it wouldn't work because the page cannot access moz-anno:favicon:.
Example: "Security Error: Content at about:reader?url=https%3A%2F%2Fit.wikipedia.org%2Fwiki%2FFerrovie_Federali_Svizzere may not load or link to moz-anno:favicon:https://it.wikipedia.org/static/favicon/wikipedia.ico."

For now I just removed the useless dance of adding/removing moz-anno:favicon:.
If we want to load from Places, we'll need a way to allow moz-anno:favicon: for the tab image.
Otherwise, the getFaviconURLForPage call may not be particularly useful if we could just store the original tab image url when entering reader mode. Or we could use getFaviconDataForPage and always pass a data uri.

It's also possible the status quo, getting the icon from Places but loading it from the network cache is fine, and then there's nothing else to do.
While working on bug 1844150, I discovered that Reader Mode is checking if the favicon is present in Places, and if it is, it's trying to read it from it.
https://searchfox.org/mozilla-central/rev/d6960b4e32d09bff32865694e32384eb9bca4af5/browser/actors/AboutReaderParent.sys.mjs#104,106-109,112

Unfortunately that never worked.
`GetFaviconLinkForIcon` generates a `moz-anno:favicon:icon_url` link, but then `iconUri.pathQueryRef.replace(/^favicon:/, "")` removes it... So in practice what we pass to the parent is just the icon uri, that will likely be read from the network cache, surely not from Places.

Even if we'd pass a moz-anno:favicon: uri, it wouldn't work because the page cannot access moz-anno:favicon:.
Example: "Security Error: Content at about:reader?url=https%3A%2F%2Fit.wikipedia.org%2Fwiki%2FFerrovie_Federali_Svizzere may not load or link to moz-anno:favicon:https://it.wikipedia.org/static/favicon/wikipedia.ico."

For now I just removed the useless dance of adding/removing moz-anno:favicon:.
If we want to load from Places, we'll need a way to allow moz-anno:favicon: for the tab image.
Otherwise, the getFaviconURLForPage call may not be particularly useful if we could just store the original tab image url when entering reader mode. Or we could use getFaviconDataForPage and always pass a data uri.

It's also possible the status quo, getting the icon from Places but loading it from the network cache, is fine, and then there's nothing else to do.

Back to Bug 1845349 Comment 0