Closed Bug 1217095 Opened 4 years ago Closed 4 years ago

GitHub Favicon not shown when edge swiping

Categories

(Firefox OS Graveyard :: Gaia::System, defect)

defect
Not set

Tracking

(b2g-master fixed)

RESOLVED FIXED
2.6 S4 - 1/1
Tracking Status
b2g-master --- fixed

People

(Reporter: mkohler, Assigned: rakhavan)

References

Details

(Keywords: foxfood, polish, Whiteboard: [bzlite][systemsfe])

Attachments

(2 files)

User-Agent: Mozilla/5.0 (Mobile; rv:44.0) Gecko/44.0 Firefox/44.0

The Github icon is not displayed when switching the apps / windows through edge swipe navigation. It shows on the task manager though.

Build from the 17th, will test on latest master later today.
Attached image 2015-10-21-19-43-15.png
Verified as well on 

commit 40339f9e6fe26611d65c6b804df3c11670297345
Merge: b5acf3a 2f50295
Author: Martijn <martijn.martijn@gmail.com>
Date:   Wed Oct 21 18:26:43 2015 +0200

    Merge pull request #32614 from mwargers/1216564

    Bug 1216564 - Fix launch{_packaged}_app.py tests in order to support the new homescreen
Component: Gaia::Feedback → Gaia::System
Keywords: polish
Whiteboard: [bzlite] → [bzlite][systemsfe]
Using gaia @ b95dd7f969e51f1f4d6b5b7358e4f6f42292f691

I'm unable to consistantly reproduce this on an Aries or a Flame. I have seen it happen a couple times with github.com although not consistantly, for the most part it works as expected. Also, I've never seen this happen with another domain.

Michael, can you try to reproduce this and if possible define more specific STR. I'd also like to see if we can reproduce this with another domain.
Assignee: nobody → rakhavan
Status: NEW → ASSIGNED
Flags: needinfo?(mkohler)
Target Milestone: --- → 2.6 S1 - 11/20
Target Milestone: 2.6 S1 - 11/20 → 2.6 S2 - 12/4
Sorry for the late reply!

I can still reproduce this every single time, and can even provoke a wrong favicon.

Build Identifier: 2015112422012
Gaia Commit: 37250b12

Steps to reproduce:

1) Restarted my phone, entered homescreen lock pin, entered SIM pin, no apps started
2) Open any other app (I tested with Telegram and the Email apps)
3) Press the homescreen button
4) Click into the "Search or enter address" input field and enter "github.com"
5) the browser window opens and loads github.com
6) once finished loading, edge swipe to the left to go back to the previous app (whatever you chose in step 2)
7) now swipe back to the right (where our github.com window is), the favicon is not displayed
8) to make it worse, enter "duckduckgo.com" in the github.com window and let it load
9) the duckduckgo.com website appears and when you edge swipe you always see the correct favicon
10) now use the same window to go back to github.com, do the edge swiping and you will still see the duckduckgo.com favicon

If there is anything I could help with (debugging in the WebIDE, etc), feel free to tell me. I quickly looked into this when I reported this, but couldn't find any real clue where this is getting set.
Flags: needinfo?(mkohler)
Reproducible with some cute cat feet as well: http://24.media.tumblr.com/tumblr_m2e8bhxuJD1qa1uu5o1_1280.jpg
It looks like in app_window.js that we only update that icon (its the identificationIcon) in response to the mozbrowsericonchange event. We should invalidate the current icon when we get a mozbrowserlocationchange maybe?
While investigating this I learned:

 - We're depending on the `mozbrowsericonchange` to update this icon.
 - The `mozbrowsericonchange` event never gets called for GitHub's mobile site.
 - But the `mozbrowsericonchange` event does get called for GitHub's desktop site.

A quote from the docs about `mozbrowsericonchange` [1]:

> The `mozbrowsericonchange` event is sent when a new icon
> (e.g. `<link rel="icon">` or `<link rel="apple-touch-icon">`)
> is available in the browser `<iframe>`'s content.

Interestingly enough, I saw that GitHub's mobile site uses `<link rel="apple-touch-icon-precomposed" ...>`, which is slightly different than `<link rel="apple-touch-icon" ...>`.

It also seems that GitHub's mobile site doesn't provide a `<link rel="icon" ...>` tag while their desktop site does provide a `<link rel="icon" ...>`.

[1] https://developer.mozilla.org/en-US/docs/Web/Events/mozbrowsericonchange

--------

I also noticed that the task manager and app chrome get the icon manually and not by observing the `mozbrowsericonchange` event of the browser iframe, which is why we're not seeing an issue in those areas.

--------

We could probably solve this outisde of Gaia by having the platform fire the `mozbrowsericonchange` event, even with an empty string in the `href` property of the event details, when it doesn't find an icon and the domain changes.

In any case, platform should update their logic to support the `apple-touch-icon-precomposed` link relationship, which would fix this specific bug. Longer term, I still think we should get a `mozbrowsericonchange` event when the domain changes.

Invalidating the icon may be possible during the `mozbrowserlocationchange` handler, but because `mozbrowsericonchange` could fire anytime (Or can we depend on the call order?) , it's not impossible for us to invalidate an icon that's valid depending on when the events fire (a race condition). Also, invaliding the icon fixes the case of the wrong icon being shown (from another site) but doesn't fix the case of an icon missing.

Who's the best platform person to pull in?
Reza, at first glance it looks like you just need a change in https://dxr.mozilla.org/mozilla-central/source/dom/browser-element/BrowserElementChildPreload.js#597 and :fabrice has been the reviewer for past patches
Flags: needinfo?(rakhavan)
Depends on: 1229838
Flags: needinfo?(rakhavan)
Target Milestone: 2.6 S2 - 12/4 → 2.6 S3 - 12/18
With bug 1229838 and bug 1232710 landed this bug should be fixed. It will take a new B2G build though, maybe in a future OTA update.
Keywords: verifyme
Flags: needinfo?(mkohler)
Target Milestone: 2.6 S3 - 12/18 → 2.6 S4 - 1/1
This bug has been verified as "pass" on the latest build of Flame master and Aries KK master by the STR in comment 4.

Actual results: GitHub Favicon is shown normally when edge swiping.
See attachment: verified_Aries_master.3gp
Reproduce rate: 0/10


Device: Flame master_512mb (Pass)
Build ID               20151229150205
Gaia Revision          63c3a57ad9935b9c61057a29ee27a1c6ed6a9e23
Gaia Date              2015-12-29 06:59:53
Gecko Revision         https://hg.mozilla.org/mozilla-central/rev/9ddf0da90fb3bc1ae29966dc596013fc54a44bd2
Gecko Version          46.0a1
Device Name            flame
Firmware(Release)      4.4.2
Firmware(Incremental)  eng.cltbld.20151229.184412
Firmware Date          Tue Dec 29 18:44:26 EST 2015
Firmware Version       v18D v4
Bootloader             L1TC000118D0

Device: Aries KK master (Pass)
Build ID               20151229105558
Gaia Revision          63c3a57ad9935b9c61057a29ee27a1c6ed6a9e23
Gaia Date              2015-12-29 06:59:53
Gecko Revision         https://hg.mozilla.org/mozilla-central/rev/9ddf0da90fb3bc1ae29966dc596013fc54a44bd2
Gecko Version          46.0a1
Device Name            aries
Firmware(Release)      4.4.2
Firmware(Incremental)  eng.worker.20151229.111558
Firmware Date          Tue Dec 29 11:16:06 UTC 2015
Bootloader             s1
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Keywords: verifyme
Resolution: --- → FIXED
Flags: needinfo?(mkohler)
You need to log in before you can comment on or make changes to this bug.