Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

createImageBitmap imageOrientation value from-image supported #23480

Merged

Conversation

hamishwillee
Copy link
Collaborator

@hamishwillee hamishwillee commented Jun 21, 2024

createImageBitmap() takes an options.imageOrientation parameter that historically had values none and flipY. The none parameter has been renamed to from-image in the spec.
The complication though is that none is going to be reused for a different meaning in future. This is not in the spec yet, but is in deno.

What I have done is created subfeatures for from-image and none. I could also create one for flipY that would match the parent - I would like to if that is OK?

from-image supports is FF111 from https://bugzilla.mozilla.org/show_bug.cgi?id=1809740, Chrome 112 from https://chromiumdash.appspot.com/commit/5a0ea7914545c91610c08053dd45d5d97328378a, Safari 16 from https://bugs.webkit.org/show_bug.cgi?id=250476, Deno from first version where this appears in docs - https://deno.land/api@v1.40.0?s=ImageOrientation

none is only in deno, and based on that same first version, which is also the first version of the method https://deno.land/api@v1.40.0?s=ImageOrientation

Fixes #23310

Related docs work in mdn/content#23564

@github-actions github-actions bot added the data:api 🐇 Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API label Jun 21, 2024
},
"status": {
"experimental": true,
"standard_track": true,
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note, this is technically not "standard" yet as it isn't in the spec. But deno has it, and the intent is to do this. I think they are just creating space from none having a meaning on other platforms.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's mark standard_track as false then, because the definition of standard_track is that the feature is present in a current specification.

Copy link
Collaborator

@queengooborg queengooborg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's make these new features subfeatures of the options_imageOrientation_parameter feature instead in the following hierarchy:

  • options_imageOrientation_parameter
    • from-image
    • none

},
"status": {
"experimental": true,
"standard_track": true,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's mark standard_track as false then, because the definition of standard_track is that the feature is present in a current specification.

@hamishwillee hamishwillee force-pushed the createImageBitmap_imageorientation branch from 9754810 to d5397b7 Compare June 24, 2024 02:01
@hamishwillee
Copy link
Collaborator Author

Thanks @queengooborg - fixed as I think you wanted!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data:api 🐇 Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

api._globals.createImageBitmap - values of imageOrientation option are not covered
2 participants