FIX: Favicon count was not updated when window focus returned (PR #10875)

This misses a test because Favcount doesn’t exposes a get to the counter.

Also, since this code deals with all possible notifications configs we support:

  • favicon notification
  • favicon new content
  • title notification
  • title new content

the code is a bit complicated to follow. We may look into refactoring it when a good opportunity arises, like if https://w3c.github.io/badging/ setClientBadge() method gives us a cleaner way to notify users.

GitHub

This pull request has been mentioned on Discourse Meta. There might be relevant details there:

https://meta.discourse.org/t/tab-notifications-not-clearing/160750/29

looks safe to me, thanks Falco