You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Images keep their old image when a viewport change leaves no source that applies #13365
⌛ Let selected be the result of selecting an image source given the img element.
⌛ If selected is null, then return.
So when a viewport change leaves no source that applies, the img keeps its current image. For example, <picture><source media="(min-width: 500px)" srcset="wide.png"><img alt=""></picture> keeps showing wide.png when the viewport shrinks below 500px.
Firefox Nightly, Chrome Canary and Safari TP clear the image instead: currentSrc becomes "", naturalWidth becomes 0 and decode() rejects. None of them fire load or error. Test: web-platform-tests/wpt#65986.
Maybe this step should clear the image like update the image data does when nothing is selected, but without the error event.
Activity
Expect an img in picture to drop its image when no source applies