Closed Bug 1809740 Opened 2 years ago Closed 2 years ago

rename createImageBitMaps's imageOrientation from "none" to "from-image"

Categories

(Core :: CSS Parsing and Computation, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
111 Branch
Tracking Status
firefox111 --- fixed

People

(Reporter: yiyix, Assigned: angus.sawyer, NeedInfo)

References

(Blocks 1 open bug)

Details

(Keywords: dev-doc-complete)

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36

Steps to reproduce:

createImageBitMaps's imageOrientation currently has 2 values: "none" and "flipY", where 'none' is used for use the orientation from image. This contradicts from CSS spec, where imageorientation has 3 values: "none", "flipY" and "from-image" and "none" means render the image as coded, no orientation applied.

Expected results:

rename none to from-image, then update the meaning of none.

whatwg spec: https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#dom-imagebitmapoptions-imageorientation

CSS spec: https://www.w3.org/TR/css-images-3/#the-image-orientation

github issue: https://github.com/whatwg/html/issues/8085

Opening the Enhancement.
Hopefully one of our devs can take a look.

Severity: -- → S4
Status: UNCONFIRMED → NEW
Component: Untriaged → CSS Parsing and Computation
Ever confirmed: true
Product: Firefox → Core

Currently only the value 'flipY' is checked in code, with 'none' being the
default behaviour. Upstream web platform tests now use the value 'from-image' in tests
which now fail unless 'from-image' is accepted as a valid option.

More work will be required later to change the behaviour of the 'none' option.

Assignee: nobody → angus.sawyer
Status: NEW → ASSIGNED
Pushed by opettay@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4aff047adb84
Support from-image for the createImageBitmap imageOrientation option r=smaug
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 111 Branch
Blocks: 1818824

FYI, MDN work for this is a bit late, but can be tracked in https://github.com/mdn/content/issues/23564

My understanding is that flipY and from-image respect EXIF metadata (and that the proposed none, will not). Is that correct? (I ask because the spec says the opposite for flipY:

If the value of the imageOrientation member of options is "flipY", output must be flipped vertically, disregarding any image orientation metadata of the source (such as EXIF metadata), if any.

Normally I'd just follow the spec, but there seems to be an intent to match the CSS spec in which both "flipY" and "from-image" use EXIF hints.

Flags: needinfo?(angus.sawyer)

Still after info on ^^^ - just to confirm flipY does or does not ignore EXIF hints?

Flags: needinfo?(emilio)

https://phabricator.services.mozilla.com/D166866#5489345 has some context, I think the idea is that flipY always flips, but flips the exif-oriented image (just like none gets you the exif-oriented image for now), but will eventually not flip exif-oriented images?

Flags: needinfo?(emilio)

Thank you @Emilio. I read those comments before but they don't answer the question about flipY. While I agree you're probably right, I think I need a canonical answer for the docs - have raised here: https://github.com/whatwg/html/issues/8085#issuecomment-2201781034

FYI, docs work in https://github.com/mdn/content/issues/23564 now complete (in review). @Emilio, you were correct in comment above, according to spec authors. The spec needs to be updated.

You need to log in before you can comment on or make changes to this bug.