-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Add missing api.WebGL[2]RenderingContext.[drawingBuffer/unpack]ColorSpace feature #17675
Add missing api.WebGL[2]RenderingContext.[drawingBuffer/unpack]ColorSpace feature #17675
Conversation
…pace feature This PR is a part of a project to add missing interfaces and interface features to BCD that are from an active spec (including WICG specs) and is supported in at least one browser. This particular PR adds the missing `drawingBufferColorSpace` and `unpackColorSpace` members of the WebGLRenderingContext 1 and 2 APIs, populating the results using data from the [mdn-bcd-collector](https://mdn-bcd-collector.appspot.com) project (v6.1.2). Tests Used: https://mdn-bcd-collector.appspot.com/tests/api/WebGLRenderingContext/drawingBufferColorSpace https://mdn-bcd-collector.appspot.com/tests/api/WebGLRenderingContext/unpackColorSpace https://mdn-bcd-collector.appspot.com/tests/api/WebGL2RenderingContext/drawingBufferColorSpace https://mdn-bcd-collector.appspot.com/tests/api/WebGL2RenderingContext/unpackColorSpace _Check out the [collector's guide on how to review this PR](https://github.com/foolip/mdn-bcd-collector#reviewing-bcd-changes)._
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -3127,6 +3127,39 @@ | |||
} | |||
} | |||
}, | |||
"drawingBufferColorSpace": { | |||
"__compat": { | |||
"spec_url": "https://registry.khronos.org/webgl/specs/latest/1.0/#DOM-WebGLRenderingContext-drawingBufferColorSpace", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost all other spec URLs in this file are to numbered sections. Can you match that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's actually a number of spec URLs that point to places like this, and I feel that's better because it points to the exact feature. We should probably change the numbered ones accordingly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The numbered sections style is still completely dominant. I'd suggest sticking to that, and then opening a PR to change everything to your preferred style, asking review from whoever added the current spec URLs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I decided to look into this, and I figured out why there's a lot of numbered sections used rather than the exact method or property. It's because the link to the section is the closest available! Features like activeTexture
or attachShader
don't have named anchors that point directly to them, so the section header has to be used in its place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, so it's the exception that there's a direct link. In fact, just 11 cases like this one. Array.from(document.querySelectorAll('[id]')).map(e => e.id).filter(id => id.startsWith('DOM'))
gives:
DOM-WebGLActiveInfo-size
DOM-WebGLActiveInfo-type
DOM-WebGLActiveInfo-name
DOM-WebGLShaderPrecisionFormat-rangeMin
DOM-WebGLShaderPrecisionFormat-rangeMax
DOM-WebGLShaderPrecisionFormat-precision
DOM-WebGLRenderingContext-canvas
DOM-WebGLRenderingContext-drawingBufferWidth
DOM-WebGLRenderingContext-drawingBufferHeight
DOM-WebGLRenderingContext-drawingBufferColorSpace
DOM-WebGLRenderingContext-unpackColorSpace
If you want to use these IDs where available, can you submit a PR updating the rest?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just did a check, and all of the other features have the appropriate URLs!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool! I already approved, I'll merge as well now then.
@@ -3127,6 +3127,39 @@ | |||
} | |||
} | |||
}, | |||
"drawingBufferColorSpace": { | |||
"__compat": { | |||
"spec_url": "https://registry.khronos.org/webgl/specs/latest/1.0/#DOM-WebGLRenderingContext-drawingBufferColorSpace", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, so it's the exception that there's a direct link. In fact, just 11 cases like this one. Array.from(document.querySelectorAll('[id]')).map(e => e.id).filter(id => id.startsWith('DOM'))
gives:
DOM-WebGLActiveInfo-size
DOM-WebGLActiveInfo-type
DOM-WebGLActiveInfo-name
DOM-WebGLShaderPrecisionFormat-rangeMin
DOM-WebGLShaderPrecisionFormat-rangeMax
DOM-WebGLShaderPrecisionFormat-precision
DOM-WebGLRenderingContext-canvas
DOM-WebGLRenderingContext-drawingBufferWidth
DOM-WebGLRenderingContext-drawingBufferHeight
DOM-WebGLRenderingContext-drawingBufferColorSpace
DOM-WebGLRenderingContext-unpackColorSpace
If you want to use these IDs where available, can you submit a PR updating the rest?
This PR is a part of a project to add missing interfaces and interface features to BCD that are from an active spec (including WICG specs) and is supported in at least one browser. This particular PR adds the missing
drawingBufferColorSpace
andunpackColorSpace
members of the WebGLRenderingContext 1 and 2 APIs, populating the results using data from the mdn-bcd-collector project (v6.1.2).Tests Used:
https://mdn-bcd-collector.appspot.com/tests/api/WebGLRenderingContext/drawingBufferColorSpace
https://mdn-bcd-collector.appspot.com/tests/api/WebGLRenderingContext/unpackColorSpace
https://mdn-bcd-collector.appspot.com/tests/api/WebGL2RenderingContext/drawingBufferColorSpace
https://mdn-bcd-collector.appspot.com/tests/api/WebGL2RenderingContext/unpackColorSpace
Check out the collector's guide on how to review this PR.