-
Notifications
You must be signed in to change notification settings - Fork 30
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
Change line attribute to unsigned int #457
Comments
There's no unsigned int in WebIDL. The most you get is unsigned short: https://www.w3.org/TR/WebIDL-1/#idl-unsigned-short |
I've split the test into two, one that verifies the current implementations and one that checks the unsigned long value: web-platform-tests/wpt#17400. Given that there's no unsigned int, we could potentially get away with just using a long, since the spec says that negative values must throw? |
Because WebIDL doesn't include an unsigned int, the VTTRegion interface specifically calls out that negative numbers should cause an IndexSizeError, and browser implementations are in the unsigned int, switch over to using a regular long value. Using a long gives us the correct range and with the definition that specifies throwing means that negative values are not allowed. This was discussed in the [20 June, 2019 TTWG call](https://www.w3.org/2019/06/20-tt-minutes.html#x02) Fixes w3c#457.
The Timed Text Working Group just discussed
The full IRC log of that discussion<nigel> Topic: Change line attribute to unsigned int webvtt#457<nigel> github: https://github.com//issues/457 <nigel> Gary: This is the one that changes the line attribute to a long. <nigel> .. This issue was because in the spec region lines is an unsigned long but implementations treat it as an unsigned int <nigel> .. so we felt it would be easier to change the webidl to match the implementations rather than ask all the implementations <nigel> .. to update. <nigel> .. But we realised that there is no unsigned int in webidl. <nigel> .. However I see that the spec disallows negative numbers explicitly. <nigel> .. A signed long would be the correct range with the addition of disallowing negative numbers. <nigel> .. So the idea is to mark it as a regular long and disallow negative numbers. <nigel> Eric: That seems fine. <nigel> Gary: Implementations won't change, the spec will. <nigel> PROPOSAL: Change VTT Lines to a signed long <nigel> Nigel: Tests? <nigel> Gary: The tests need to be updated to delete all the out of range values. <nigel> Nigel: Then those tests will pass. <nigel> Gary: I have a PR now that splits the values into allowed and disallowed ranges, so I just need to delete the disallowed values file in the PR. <nigel> Nigel: A PR into wpt? <nigel> Gary: yes <gkatsev> -> https://github.com/web-platform-tests/wpt/pull/17400 WPT lines PR https://github.com/web-platform-tests/wpt/pull/17400 <nigel> s| https://github.com/web-platform-tests/wpt/pull/17400|| <nigel> Gary: Any objection to the proposal? <nigel> Eric: No <nigel> Gary: No objections <nigel> RESOLUTION: Change VTT Lines to a signed long |
Because WebIDL doesn't include an unsigned int, the VTTRegion interface specifically calls out that negative numbers should cause an IndexSizeError, and browser implementations are in the unsigned int, switch over to using a regular long value. Using a long gives us the correct range and with the definition that specifies throwing means that negative values are not allowed. This was discussed in the [20 June, 2019 TTWG call](https://www.w3.org/2019/06/20-tt-minutes.html#x02) Fixes w3c#457.
as discussed on today's call.
The text was updated successfully, but these errors were encountered: