WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
163808
img with srcset with width descriptor has incorrect intrinsic size
https://bugs.webkit.org/show_bug.cgi?id=163808
Summary
img with srcset with width descriptor has incorrect intrinsic size
mitz
Reported
2016-10-21 13:47:50 PDT
To reproduce: navigate to the URL. Expected: the image to render at a width of 96 CSS pixels Actual: the image renders at a much bigger width
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2016-10-21 14:09:55 PDT
<
rdar://problem/28896267
>
Dean Jackson
Comment 2
2016-11-14 17:29:18 PST
According to the HTML specification: If the srcset attribute is present and has any image candidate strings using a width descriptor, the sizes attribute must also be present, and is a sizes attribute. The sizes attribute contributes the source size to the source set (if no source element was selected).
https://html.spec.whatwg.org/multipage/embedded-content.html#attr-img-sizes
However, the specification doesn't seem to say what we should do when we don't have a sizes attribute.
Dean Jackson
Comment 3
2016-11-14 17:30:07 PST
At the moment it seems we're using 100vw (or something like that).
Dean Jackson
Comment 4
2016-11-14 17:31:07 PST
Working URL: data:text/html,<img%20srcset="
https://webkit.org/favicon.png%2096w
"%20sizes="96px">
Dean Jackson
Comment 5
2016-11-14 17:32:56 PST
WebKit seems to do the same thing as Chrome in this error case.
Dean Jackson
Comment 6
2016-11-14 17:34:58 PST
As does Firefox.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug