Microsoft discovered when implementing srcset in Project Spartan that some sites broke because they were using picturefill < 2.3.1 with "use strict" and picturefill was writing to currentSrc, which throws in strict mode. The issue has been fixed in picturefill but it's not certain all sites will upgrade in time. I think Microsoft decided to remove support for currentSrc for the time being. Alternative approaches would be to mark the property as [Replaceable] or have a no-op setter for now. Or leave it as is and evang any broken sites to upgrade picturefill.
If HTMLPictureElement is also supported, there is no issue with picturefill since it bails out early in that case. Safari 8 does not support currentSrc so this does not show up in current release.
The EFL WebKit port has been affected by this for awhile now. With the fix for bug #144679, all ports would now be affected.
Most of the images do not load on http://www.espn.com because of this issue.
This is first and foremost a bug in the older versions of the polyfill.
With regard to ESPN, we have contacted their front-end engineers, and it seems like they will upgrade to the latest polyfill version shortly: https://twitter.com/steveclancy/status/603280160696225792
We (the RICG) also intend to send out multiple calls to the developer community to upgrade their polyfill versions immediately. I hope that would be enough to make this a non-issue.
Liam - Are there any other sites that you've encountered problems with? We can try to contact them directly as well.
I have not yet encountered other sites affected by this. Thanks for reaching out to ESPN!
Created attachment 253820 [details]
This patch allows us to remove currentSrc easily. It doesn't actually change the built result by default.
I landed an ENABLE guard in r184928. This can be removed once the real issue has been fixed.
Is anyone aware how long this has been going on? Is ESPN's use of the polyfill relatively recent? I'm slightly surprised it took this long to notice given that we've had this on for over a year.
Comment on attachment 253820 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=253820&action=review
There's no need for these HTMLPreloadScanner changes.
Likewise, not needed in order to put currentSrc behind a flag
I think this got landed in following commit:
Can this be marked as "RESOLVED FIXED"? Thanks!
Yup, this patch got landed in https://commits.webkit.org/163437@main