Images should be able to declare their own intrinsic resolution/size (EXIF density not honored)
Categories
(Core :: Layout: Images, Video, and HTML Frames, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox90 | --- | fixed |
People
(Reporter: e, Assigned: emilio)
References
(Blocks 1 open bug)
Details
Attachments
(4 files)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0 Safari/605.1.15
Steps to reproduce:
Run any of these tests:
https://wpt.fyi/results/density-size-correction?label=master&label=experimental&aligned&q=density
Actual results:
Firefox does not respect the EXIF information in the JPEG, and fails the tests.
Expected results:
Firefox should set the image's intrinsic size based on EXIF information, and pass the tests.
See the spec change, discussion, and links to the commits that landed this in Chromium and WebKit, here: https://github.com/whatwg/html/pull/5574
Updated•4 years ago
|
Assignee | ||
Comment 1•4 years ago
|
||
Andrew / Tim, this seems more of an ImageLib thing than a layout thing right?
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 3•4 years ago
|
||
Assignee | ||
Comment 4•4 years ago
|
||
This should be mostly straight-forward, since we have code for this
anyways for image-set() and srcset.
The only thing is that we were using floats for resolution, but since
EXIF allows you to scale each axis separately, we now need to pass an
image::Resolution instead.
The main outstanding issue is the spec comment mentioned in the previous
patch, about what happens if you have srcset/image-set and the image
density specified together. For now I've implemented what the
image-set() spec says, but this is subject to change before shipping of
course.
Assignee | ||
Comment 5•4 years ago
|
||
As discussed here: https://github.com/whatwg/html/pull/5574#issuecomment-826347560
This matches other browsers.
Depends on D113265
Comment 8•4 years ago
|
||
Backed out for causing browser chrome failures on browser_bug592641.js.
Assignee | ||
Comment 10•4 years ago
|
||
Also matches other browsers, and fixes the test that got me backed out,
since it has a huge EXIF resolution value.
Assignee | ||
Updated•4 years ago
|
Comment 11•4 years ago
|
||
Comment 12•4 years ago
|
||
Comment 13•4 years ago
|
||
Comment 14•4 years ago
|
||
Comment 15•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/9317cd872430
https://hg.mozilla.org/mozilla-central/rev/4f74cdfb4fdc
https://hg.mozilla.org/mozilla-central/rev/2ac7c9cd4629
https://hg.mozilla.org/mozilla-central/rev/82461e5bf8ae
https://hg.mozilla.org/mozilla-central/rev/09481b273d7b
https://hg.mozilla.org/mozilla-central/rev/021e5ade2475
https://hg.mozilla.org/mozilla-central/rev/f573ec57b561
Description
•