[webvtt] Setting VTTRegion.lines to a negative value should throw

zcorpan has just created a new issue for 
https://github.com/w3c/webvtt:

== Setting VTTRegion.lines to a negative value should throw ==
http://w3c.github.io/webvtt/#the-vttregion-interface

> The lines attribute, on getting, must return the WebVTT region lines
 of the WebVTT region that the VTTRegion object represents\. On 
setting, the WebVTT region lines must be set to the new value\.

Test: http://w3c-test.org/webvtt/api/VTTRegion/lines.html

In Chrome 58.0.3020.0 canary (which has this fix 
https://bugs.chromium.org/p/chromium/issues/detail?id=690014#c3 ) this
 throws IndexSizeError if value is < 0.

https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/html/track/vtt/VTTRegion.cpp?l=111&rcl=861e1e50380132d7028812bba3f3d4f073fa4c26

The syntax does not support negative values, so it would be sensible 
to throw for negative values. I suggest we change the spec and test to
 match Chromium implementation.

cc @fsoder @BenjaminSchaaf 

Please view or discuss this issue at 
https://github.com/w3c/webvtt/issues/333 using your GitHub account

Received on Wednesday, 22 February 2017 13:21:06 UTC