The browser has them in the cache already, so we avoid loading it ourselves,
also we might not even have access to the icons from our context.
Some browsers (Opera does) set the favIconUrl of the tab to the base64 data
already, which is convenient. The base64 URL gets decoded in the krunner
plugin and if it fails or is not available, the browser icon is shown.
If the tab is audible or incognito, that icon is preferred.
Details
Details
- Reviewers
broulik davidedmundson - Group Reviewers
Plasma - Commits
- R856:d435a59b0514: Expose base64-encoded favicons to the tabsrunner
Installed in Opera 40, Vivaldi 1.91 and Firefox 52, favicons appear in krunner.
Diff Detail
Diff Detail
- Repository
- R856 Plasma Browser Integration
- Branch
- favicons (branched from master)
- Lint
No Linters Available - Unit
No Unit Test Coverage
Comment Actions
It could also decode the base64 data in the plasma-browser-integration-host already and send it as bytearray, I'm not sure what's simpler/better/faster.
Comment Actions
Also send a request for the favicon without timeout to fill the cache for next time.
Otherwise favicons from slow servers might never show up
Comment Actions
Cool!
extension/extension.js | ||
---|---|---|
495 ↗ | (On Diff #16759) | Braces even for single line statements: if (...) { ... } |
505 ↗ | (On Diff #16759) | Does this need a tabs.hasOwnProperty(...) check? (cf for in being horrible in JS) |
tabsrunner/tabsrunner.cpp | ||
188 ↗ | (On Diff #16759) | const |
191 ↗ | (On Diff #16759) | +1 for usage of ref :) |
224 ↗ | (On Diff #16759) | Braces |
Comment Actions
braces + const
A hasOwnProperty check is not needed here, that's accounted for by the if (!favIconUrl) below