Closed Bug 1222335 Opened 9 years ago Closed 9 years ago

Some Steam Community Profile icons don't show due to <img srcset> loaded in iframe

Categories

(Core :: Layout: Images, Video, and HTML Frames, defect)

42 Branch
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1166138

People

(Reporter: s.rittby, Unassigned)

Details

(Keywords: regression)

Attachments

(4 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:42.0) Gecko/20100101 Firefox/42.0 Build ID: 20151029151421 Steps to reproduce: Went to my Steam profile page (https://steamcommunity.com/id/mardanthedestroyer) and clicked on the middle image in the screenshot showcase's sidebar. Actual results: In the popup, the Profile images related to comments (the profile images in front of comments and on the comment submission form) displayed the *broken image* placeholder. Expected results: The images should have displayed normally.
Attached file iframe.html
Attached file testcase.html
Regression range: https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=09f4968d5f42&tochange=9696d1c4b3ba Workaround: dom.image.srcset.enabled=false helps (bug 1018389 where image srcset is on by default) I think it's related to a preloading issue of <img srcset> in iframe. It's reproducible with a simple testcase where images are in iframe loaded with fading. When you hovers the red <div> for the 1st time, the purple iframe is loaded with images faded in but not displayed.
Status: UNCONFIRMED → NEW
Component: Untriaged → Layout: Images
Ever confirmed: true
Flags: needinfo?(john)
Keywords: regression
Product: Firefox → Core
Summary: Some Steam Community Profile icons don't show → Some Steam Community Profile icons don't show due to <img srcset> loaded in iframe
I add a reduced testcase of the Steam Community website. There is still a lot of JS but the issue is more visible by just opening the file "Communauté Steam [SS_GM]Mardan-CrunchyInTheory.htm" and clicking on the image.
jdm, do you own this srcset stuff now?
Flags: needinfo?(josh)
More or less, yeah.
Flags: needinfo?(josh)
It's fascinating that the iframe makes a difference here. I can reproduce; thanks for the great testcase, Loic!
My testcase works only at the 1st load, you have to reload the page to reproduce the issue, but I guess it's the same underlying bug, even if it's reproducible on every call of the modal iframe on Steam (probably due to more complex JS stuff).
Turns out this is bug 1166138. The presence of the `display: none` on the iframe is the key here - when I add <picture></picture> around the img, the testcase works as expected. Since there's no viewport when the image selection first occurs, we bail and try to load an empty URL string. With a picture element, we correct notice when the element first gets a viewport and re-run the image selection at that point.
Status: NEW → RESOLVED
Closed: 9 years ago
Flags: needinfo?(john)
Resolution: --- → DUPLICATE
Product: Core → Core Graveyard
Product: Core Graveyard → Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: