Image orientation is not respected when img source tag uses data url
Categories
(Core :: Layout: Images, Video, and HTML Frames, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr102 | --- | unaffected |
firefox107 | --- | wontfix |
firefox108 | --- | wontfix |
firefox109 | --- | wontfix |
firefox110 | --- | fixed |
People
(Reporter: hshahid, Assigned: dlrobertson)
References
(Regression)
Details
(Keywords: regression)
Attachments
(2 files)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:107.0) Gecko/20100101 Firefox/107.0
Steps to reproduce:
- attach an image with an orientation exif data.
- read the image and generate a Data URL
- set the
image-orientation
tonone
.
Codesandbox to show bug: https://codesandbox.io/s/cool-bohr-cfsnfl?file=/src/App.js
Actual results:
The image orientation is still using the exif data and is not displayed as none
.
Expected results:
The image orientation is still using the exif data and is not displayed as none
.
Comment 1•1 year ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Graphics: WebRender' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Comment 2•1 year ago
|
||
I think this is because we consider the data uri to be cross origin and hence the image-orientation: none is ignored. Not sure if that is correct or not, maybe Emilio knows off the top of his head?
Comment 3•1 year ago
|
||
Yes, so data:
is per spec an opaque origin, so we're applying bug 1655598. Presumably Safari behaves like Blink here?
Code is here. Maybe we should special-case data:
URIs, since they're quite similar to blobs. The spec doesn't mention origins at all, seems we still need edits. We should definitely file a spec issue to get this properly defined..
Assignee | ||
Comment 4•1 year ago
|
||
(In reply to Emilio Cobos Álvarez (:emilio) from comment #3)
Yes, so
data:
is per spec an opaque origin, so we're applying bug 1655598. Presumably Safari behaves like Blink here?Code is here. Maybe we should special-case
data:
URIs, since they're quite similar to blobs. The spec doesn't mention origins at all, seems we still need edits. We should definitely file a spec issue to get this properly defined..
Thanks for the ping! Good catch! I tested blob:
, but not data:
... I'll update this and add a test. It is a bit interesting that a data url gets a triggering principal, but a blob doesn't.
Updated•1 year ago
|
Assignee | ||
Comment 5•1 year ago
|
||
- Images with a data url source should be treated as same-origin requests,
meaning that the image-orientation should be respected. - Add web platform test for a image with a data url source and
image-orientation: none. - Fix the blob url test for image-orientation: none.
Updated•1 year ago
|
Comment 6•1 year ago
|
||
Set release status flags based on info from the regressing bug 1655598
Updated•1 year ago
|
Assignee | ||
Updated•1 year ago
|
Assignee | ||
Comment 7•1 year ago
|
||
(In reply to Emilio Cobos Álvarez (:emilio) from comment #3)
The spec doesn't mention origins at all, seems we still need edits. We should definitely file a spec issue to get this properly defined.
Wouldn't this just be w3c/csswg-drafts#5165? Or am I missing what you're getting at here?
Comment 8•1 year ago
|
||
Set release status flags based on info from the regressing bug 1655598
Updated•1 year ago
|
Pushed by drobertson@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f35974ef034b image orientation should be used for data url requests. r=emilio
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/37813 for changes under testing/web-platform/tests
Comment 11•1 year ago
|
||
bugherder |
Updated•1 year ago
|
Upstream PR merged by moz-wptsync-bot
Description
•