Closed
Bug 1052417
Opened 10 years ago
Closed 10 years ago
Default `sizes` attribute value for `srcset` should be 100vw
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla36
People
(Reporter: remi+bugzilla, Assigned: johns)
References
Details
(Keywords: testcase)
Attachments
(2 files)
596 bytes,
text/html
|
Details | |
1012 bytes,
patch
|
jst
:
review+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36
Steps to reproduce:
On the current version of Firefox Nightly (34.0a1), make sure to activate the flags for responsive images with `srcset`. (Go to about:config and set `dom.image.srcset.enabled` and `dom.image.picture.enabled` to true.)
Open a page with an <img> with srcset attribute with various images. For example the following :
<img src="http://i.imgur.com/pnUUCFQ.png" srcset="http://i.imgur.com/35cz49W.png 480w, http://i.imgur.com/X7vSnQV.png 640w, http://i.imgur.com/JqqqI8g.png 1440w" />
Actual results:
No matter the window resolution, the first image of the `srcset` list is always shown. Other images of the `srcset` list are never visible.
Expected results:
Correct images depending of the window resolution should be shown. This actually works if you had a `sizes` attribute with a `100vw` value.
But the specification clearly states that the default value for `sizes` is `100vw` and that in this case, the attribute could be omitted. See http://www.w3.org/html/wg/drafts/html/master/embedded-content.html#the-picture-element
Comment 1•10 years ago
|
||
John, can you have a look?
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → jschoenick
Flags: needinfo?(jschoenick)
Assignee | ||
Updated•10 years ago
|
Assignee | ||
Comment 2•10 years ago
|
||
This was incompletely updated -- we use 100vw as a default, but reject sizes-using candidates if we had no attribute per an earlier spec. Just removing that bailout works as expected.
The picture tests in Bug 1023519 will cover this
Attachment #8501374 -
Flags: review?(jst)
Updated•10 years ago
|
Attachment #8501374 -
Flags: review?(jst) → review+
Assignee | ||
Updated•10 years ago
|
Assignee | ||
Comment 3•10 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•