Closed Bug 1617333 Opened 5 years ago Closed 5 years ago

Some top sites have incorrect favicons

Categories

(Firefox :: Address Bar, defect, P3)

75 Branch
defect
Points:
3

Tracking

()

VERIFIED FIXED
Firefox 76
Iteration:
76.1 - Mar 9 - Mar 22
Tracking Status
firefox76 --- verified

People

(Reporter: billdillensrevenge, Assigned: bugzilla)

References

(Blocks 1 open bug)

Details

Attachments

(5 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:75.0) Gecko/20100101 Firefox/75.0

Steps to reproduce:

the top sites list version of the megabar (sorry for the wording, I don't know how else to describe it) shows the incorrect favicon at least in some cases, such as twitter. See attached screenshot (I put red arrow). But when you actually type in the URL bar, the twitter entry has the correct favicon. (screenshot below)

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → Address Bar

This is interesting. If you open the network devtools and load https://twitter.com/firefox, there are two favicons that get loaded by FaviconLoader.jsm. In order:

Presumably twitter.ico ends up being the favicon stored in Places because it's the icon shown when you type "twitter" in the urlbar.

But icon-ios.8ea219d4.png ends up being stored by activity stream, and so it's the value of link.favicon here in the top-sites provider: https://searchfox.org/mozilla-central/rev/c1e3d3edd4a9b784971555dc74a5de23d768b2e1/browser/components/urlbar/UrlbarProviderTopSites.jsm#118 (link.tippyTopIcon is null/undefined in this case I'm guessing because the URL is twitter.com/firefox and not simply twitter.com.)

So at first glance it seems like activity stream is storing the wrong favicon. Ed, do you know anything about this?

I'll make this a P3 because it doesn't seem like it should block release.

Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(edilee)
Priority: -- → P3

It shouldn't block release but it should be fixed because it's important to have consistency for recognition. The icons should be the same.

Also, is this for all favicons or just some like twitter?

Attached image fficonbug.png

Also, is this another different bug in Firefox? Go to https://abs.twimg.com/favicons/twitter.ico in both Chrome and Firefox, here's what I'm seeing (Firefox on the left, Chrome on the right). It's supposed to be transparent isn't it? Not a white square?

Yes, every bug in Bugzilla should be fixed. I don't know whether other sites are affected. In your original comment you said "at least in some cases." Did you see others? Re: comment 5, it may not be a bug per se but just a different choice in how Firefox displays images when you navigate to them, but feel free to file a bug in Firefox::General.

(In reply to Drew Willcoxon :adw from comment #3)

Off-hand the former is a touch icon, and it should be used when showing a large tile (like the new tab page large tiles), while the latter is a normal favicon. Places stores both, but for icons (tabs/bookmarks) it won't use the touch icons because they would be downscaled too much. The Address bar clearly prefers small icons.
New Tab at this time is probably the only consumer that uses touch icons, because it can generate tiles. Though it should not use touch icons for small favicon needs because of the downscaling problem.
It's possible to get the right icon from Places specifying the expected icon size, though that means the TopSites list should have both a tileicon and a favicon properties, or one should be able to request a specific size of icon as argument.

See https://searchfox.org/mozilla-central/rev/a37fc61f172b432e7ae0b6b4c4a12cac2a787a0f/browser/components/newtab/lib/FaviconFeed.jsm#42

(In reply to Will from comment #5)

Created attachment 9128295 [details]
fficonbug.png

Also, is this another different bug in Firefox? Go to https://abs.twimg.com/favicons/twitter.ico in both Chrome and Firefox, here's what I'm seeing (Firefox on the left, Chrome on the right). It's supposed to be transparent isn't it? Not a white square?

This is intentional and goes back to bug 754133 and bug 793366.

Top Sites purposefully uses rich icons as the new tab version shows a 96x96 icon. The largest favicon is requested here:

https://searchfox.org/mozilla-central/rev/96f1457323cc598a36f5701f8e67aedaf97acfcf/toolkit/modules/NewTabUtils.jsm#921-929

Bug 1606928 recently made the default top sites have the smaller icon, but for this case of actual history, maybe it's worthwhile to separately request the smaller icon from favicon service?

Flags: needinfo?(edilee)
Assignee: nobody → htwyford
Status: NEW → ASSIGNED
Iteration: --- → 75.2 - Feb 24 - Mar 8
Points: --- → 3
Attachment #9129598 - Attachment description: Bug 1617333 - Show appropriately-sized favicons in the Urlbar for Top Sites with history visits. r?mak → Bug 1617333 - Show appropriately-sized favicons in the Urlbar for Top Sites with history visits. r?mak,Mardak!
Blocks: 1620974
Pushed by htwyford@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b8cdd28b8b7d Show appropriately-sized favicons in the Urlbar for Top Sites with history visits. r=mak,Mardak

There's a new revision up on Phabricator. Try run in progress: https://treeherder.mozilla.org/#/jobs?repo=try&revision=0429a1535f41b91c5b0ce7e8e37185124f7fd40d. I've since fixed the lint issue in that run.

Flags: needinfo?(htwyford)
Pushed by htwyford@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/52947d2e8692 Show appropriately-sized favicons in the Urlbar for Top Sites with history visits. r=mak,Mardak

Backed out changeset 52947d2e8692 (Bug 1617333) for causing xpcshell failures at gre/modules/NewTabUtils.jsm

Push with failure: https://treeherder.mozilla.org/#/jobs?repo=autoland&collapsedPushes=659858&selectedJob=292536525&resultStatus=testfailed%2Cbusted%2Cexception&classifiedState=unclassified&revision=52947d2e86924b22441ae8c13a09e041b62fa851

Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=292536525&repo=autoland&lineNumber=5941

Backout link: https://treeherder.mozilla.org/#/jobs?repo=autoland&collapsedPushes=659858&selectedJob=292542260&resultStatus=testfailed%2Cbusted%2Cexception&classifiedState=unclassified&revision=603767ea3ceeda36ce4bee7f85defb94fa7cedcd

[task 2020-03-10T20:09:45.543Z] 20:09:45     INFO -  TEST-START | toolkit/modules/tests/xpcshell/test_timer.js
[task 2020-03-10T20:09:46.264Z] 20:09:46  WARNING -  TEST-UNEXPECTED-FAIL | toolkit/modules/tests/xpcshell/test_timer.js | xpcshell return code: 0
[task 2020-03-10T20:09:46.265Z] 20:09:46     INFO -  TEST-INFO took 721ms
[task 2020-03-10T20:09:46.265Z] 20:09:46     INFO -  >>>>>>>
[task 2020-03-10T20:09:46.265Z] 20:09:46     INFO -  toolkit/modules/tests/xpcshell/test_timer.js | xpcw: cd /sdcard/tests/xpc/toolkit/modules/tests/xpcshell
[task 2020-03-10T20:09:46.265Z] 20:09:46     INFO -  toolkit/modules/tests/xpcshell/test_timer.js | xpcw: xpcshell -r /sdcard/tests/xpc/c/httpd.manifest --greomni /data/local/xpcb/geckoview-androidTest.apk -m -s -e const _HEAD_JS_PATH = "/sdcard/tests/xpc/head.js"; -e const _MOZINFO_JS_PATH = "/sdcard/tests/xpc/p/mozinfo.json"; -e const _PREFS_FILE = "/sdcard/tests/xpc/user.js"; -e const _TESTING_MODULES_DIR = "/sdcard/tests/xpc/m"; -f /sdcard/tests/xpc/head.js -e const _HEAD_FILES = ["/sdcard/tests/xpc/toolkit/modules/tests/xpcshell/head.js"]; -e const _JSDEBUGGER_PORT = 0; -e const _TEST_FILE = ["test_timer.js"]; -e const _TEST_NAME = "toolkit/modules/tests/xpcshell/test_timer.js"; -e _execute_test(); quit(0);
[task 2020-03-10T20:09:46.266Z] 20:09:46     INFO -  toolkit/modules/tests/xpcshell/test_timer.js | [8684, Unnamed thread 7b30fcb21020] WARNING: XPCOM objects created/destroyed from static ctor/dtor: file /builds/worker/checkouts/gecko/xpcom/base/nsTraceRefcnt.cpp, line 194
[task 2020-03-10T20:09:46.266Z] 20:09:46     INFO -  toolkit/modules/tests/xpcshell/test_timer.js | [8684, Unnamed thread 7b30fcb21020] WARNING: XPCOM objects created/destroyed from static ctor/dtor: file /builds/worker/checkouts/gecko/xpcom/base/nsTraceRefcnt.cpp, line 194
[task 2020-03-10T20:09:46.266Z] 20:09:46     INFO -  toolkit/modules/tests/xpcshell/test_timer.js | [8684, Unnamed thread 7b30fcb21020] WARNING: XPCOM objects created/destroyed from static ctor/dtor: file /builds/worker/checkouts/gecko/xpcom/base/nsTraceRefcnt.cpp, line 194
[task 2020-03-10T20:09:46.270Z] 20:09:46     INFO -  toolkit/modules/tests/xpcshell/test_timer.js | [8684, Unnamed thread 7b30fcb21020] WARNING: XPCOM objects created/destroyed from static ctor/dtor: file /builds/worker/checkouts/gecko/xpcom/base/nsTraceRefcnt.cpp, line 194
[task 2020-03-10T20:09:46.270Z] 20:09:46     INFO -  toolkit/modules/tests/xpcshell/test_timer.js | [8684, Main Thread] WARNING: No Android crash handler set: file /builds/worker/checkouts/gecko/toolkit/crashreporter/nsExceptionHandler.cpp, line 1899
[task 2020-03-10T20:09:46.270Z] 20:09:46     INFO -  toolkit/modules/tests/xpcshell/test_timer.js | [8684, Main Thread] WARNING: GetDnsSuffixList is not supported without a bridge connection: file /builds/worker/checkouts/gecko/netwerk/system/android/nsAndroidNetworkLinkService.cpp, line 138
[task 2020-03-10T20:09:46.270Z] 20:09:46     INFO -  toolkit/modules/tests/xpcshell/test_timer.js | [8684, Main Thread] WARNING: Couldn't get the user appdata directory. Crash events may not be produced.: file /builds/worker/checkouts/gecko/toolkit/crashreporter/nsExceptionHandler.cpp, line 2930
[task 2020-03-10T20:09:46.270Z] 20:09:46     INFO -  toolkit/modules/tests/xpcshell/test_timer.js | [8684, Main Thread] WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80040111: file /builds/worker/checkouts/gecko/startupcache/StartupCacheUtils.cpp, line 155
[task 2020-03-10T20:09:46.270Z] 20:09:46     INFO -  NS_ERROR_FILE_NOT_FOUND:
[task 2020-03-10T20:09:46.270Z] 20:09:46     INFO -  @resource://gre/modules/NewTabUtils.jsm:59:46
[task 2020-03-10T20:09:46.270Z] 20:09:46     INFO -  @/sdcard/tests/xpc/toolkit/modules/tests/xpcshell/head.js:1:35
[task 2020-03-10T20:09:46.270Z] 20:09:46     INFO -  load_file@/sdcard/tests/xpc/head.js:684:11
[task 2020-03-10T20:09:46.270Z] 20:09:46     INFO -  _load_files@/sdcard/tests/xpc/head.js:696:10
[task 2020-03-10T20:09:46.270Z] 20:09:46     INFO -  _execute_test@/sdcard/tests/xpc/head.js:543:14
[task 2020-03-10T20:09:46.271Z] 20:09:46     INFO -  @-e:1:1
[task 2020-03-10T20:09:46.271Z] 20:09:46     INFO -  (xpcshell/head.js) | test MAIN run_test pending (1)
[task 2020-03-10T20:09:46.271Z] 20:09:46     INFO -  (xpcshell/head.js) | test run_next_test 0 pending (2)
[task 2020-03-10T20:09:46.271Z] 20:09:46     INFO -  (xpcshell/head.js) | test MAIN run_test finished (2)
[task 2020-03-10T20:09:46.271Z] 20:09:46     INFO -  running event loop
[task 2020-03-10T20:09:46.271Z] 20:09:46     INFO -  toolkit/modules/tests/xpcshell/test_timer.js | Starting test_setTimeout
[task 2020-03-10T20:09:46.271Z] 20:09:46     INFO -  (xpcshell/head.js) | test test_setTimeout pending (2)
Flags: needinfo?(htwyford)
Pushed by htwyford@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5c564bd16a12 Show appropriately-sized favicons in the Urlbar for Top Sites with history visits. r=mak,Mardak

There's a new revision up. Try running including the failed Android tests: https://treeherder.mozilla.org/#/jobs?repo=try&revision=db832b814c04c0b3dfc69f5d81fc9fe22e001373

Iteration: 75.2 - Feb 24 - Mar 8 → 76.1 - Mar 9 - Mar 22
Flags: needinfo?(htwyford)
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 76

Can this be brought up to 75 beta?

Flags: qe-verify+
QA Contact: cristian.comorasu

Comment on attachment 9129598 [details]
Bug 1617333 - Show appropriately-sized favicons in the Urlbar for Top Sites with history visits. r?mak,Mardak!

Beta/Release Uplift Approval Request

  • User impact if declined: We'll use the wrong icons for Top Sites in the new address bar experience.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: 1. Open Firefox with a fresh profile. Observe the state of Top Sites on the New Tab page.
  1. Open Top Sites in the address bar by clicking the address bar. Observe that the favicons for the default sites are different from those shown on the New Tab: they are smaller and match the icons usually used for sites in address bar results, instead of the larger square icons we use for Top Sites on the New Tab.
  2. Visit kottke.org and bookmark it.
  3. Open a new tab.
  4. Observe that kottke.org shows up in Top Sites and that the "K" in its icon is hollow.
  5. Click on the address bar. Observe that kottke.org shows up in the Top Sites results and that the "K" in the icon there is filled in.
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Minor UI change.
  • String changes made/needed:
Attachment #9129598 - Flags: approval-mozilla-beta?
QA Whiteboard: [qa-triaged]
Summary: top sites list version of megabar shows incorrect favicon for some sites → Some top sites have incorrect favicons

weird little issue I just noticed in 75.0b4: on top is the top sites megabar, on bottom is when I actually type "w" into the URL bar. Notice the Twitter icon is smaller in the top sites version. (the entries are identical, I cut off everything except "Ryan" for privacy reasons). And it's not because it's bookmarked, I deleted the bookmark and the top sites list version of the twitter icon remains small. Can anyone else repro?

Comment on attachment 9129598 [details]
Bug 1617333 - Show appropriately-sized favicons in the Urlbar for Top Sites with history visits. r?mak,Mardak!

this feels like it can ride the trains. (P3, doesn't seem to be a huge problem)

Attachment #9129598 - Flags: approval-mozilla-beta? → approval-mozilla-beta-

We reproduced this issue using Fx 75.0a1(2020-02-21) on macOS 10.13.6.
I can confirm this issue is fixed on Fx 76.0a1(2020-03-18), we verified using Ubuntu 18.04, macOS 10.13 and Windows 10 x64.

We also noticed the default Top Sites Twitter icon is different from the icon we get if we dismiss the default Twitter icon, then visit twitter.com/firefox. Is this known/intended?

Flags: qe-verify+ → needinfo?(htwyford)

The icon used in the default set of Urlbar Top Sites is a static icon in-tree. It is 32x32. The icons fetched in this patch are 16 pixels square, times the window's devicePixelRatio. The icon on the top in the screenshot in comment 22 is likely 16px square and the icon on the bottom, being fetched by Places, is 32px square. I'm on a @2x screen and I can't reproduce this issue, so presumably both Places and the code introduced in this patch are fetching icons that are 32px square.

Will, are you using a @1x screen? Most of our users do, so this is probably worth fixing (if this is indeed the issue).

Flags: needinfo?(htwyford) → needinfo?(billdillensrevenge)

(In reply to Harry Twyford [:harry] from comment #25)

The icon used in the default set of Urlbar Top Sites is a static icon in-tree. It is 32x32. The icons fetched in this patch are 16 pixels square, times the window's devicePixelRatio. The icon on the top in the screenshot in comment 22 is likely 16px square and the icon on the bottom, being fetched by Places, is 32px square. I'm on a @2x screen and I can't reproduce this issue, so presumably both Places and the code introduced in this patch are fetching icons that are 32px square.

Will, are you using a @1x screen? Most of our users do, so this is probably worth fixing (if this is indeed the issue).

Are you referring to the OS display scaling? My laptop is set to 175% display scaling (Windows 10). If this is only an issue with strange display scalings like 175%, I still think it should be fixed especially because I can't repro in release Firefox/non-quantumbar

Flags: needinfo?(billdillensrevenge)

No, I'm referring to the pixel density of the screen. If you open the browser console (I believe it's Ctrl + Shift + J on Windows, or it's in the Tools > Web Developer menu) and type window.devicePixelRatio, what is the output?

Flags: needinfo?(billdillensrevenge)

(In reply to Harry Twyford [:harry] from comment #27)

No, I'm referring to the pixel density of the screen. If you open the browser console (I believe it's Ctrl + Shift + J on Windows, or it's in the Tools > Web Developer menu) and type window.devicePixelRatio, what is the output?

Nothing is coming up in the browser console...

If you want to know the pixel density of the screen, it's 201 PPI (it's a microsoft "Surface Laptop"). Windows 10 OS display resolution is set to the same as the display (2256 x 1504) and the OS displaying scaling is 175%.

Flags: needinfo?(billdillensrevenge)

I just changed my laptop to 200% display scaling, restarted and the issue remains. The URL is https://twitter.com/firefox

See Also: → 1628051
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: