Closed Bug 871184 Opened 11 years ago Closed 11 years ago

[webvtt] HTMLTrackElement kind enum list should be case-insensitive

Categories

(Core :: Audio/Video, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: msaad, Assigned: reyre)

References

Details

Attachments

(1 file)

The enumerated list that represents the possible values for kind should always return case case-insensitive values.
Blocks: 833385
This should simply not be an enum.
Blocks: 833386
No longer blocks: 833385
Assignee: nobody → rick.eyre
This test case actually works perfectly fine for me. We're also using the case insensitive version of nsAttrValue::ParseEnumValue. So we're handling this behaviour correctly as of now.

It would be useful to include this in the current suite of DOM tests so I'll make sure to do that when updating bug 833386.
There is a still a bug, though.

track.kind = "foo";
is(track.getAttribute("kind"), "foo");

should pass.
according to the draft, all of the track attributes are read only, except for "mode". this should not pass
I've been wondering about that too. If you try to set though HTMLTrackElement.[prop] it won't work, which is the behaviour we want. However, using the setAttribute() like in this test case works.
interface HTMLTrackElement : HTMLElement {
           attribute TextTrackKind kind;
           attribute DOMString src;
           attribute DOMString srclang;
           attribute DOMString label;
           attribute boolean default;

  const unsigned short NONE = 0;
  const unsigned short LOADING = 1;
  const unsigned short LOADED = 2;
  const unsigned short ERROR = 3;
  readonly attribute unsigned short readyState;

  readonly attribute TextTrack track;
};
yes,i was referring to TextTrack, different interface.
Marking this as resolved as it is currently properly working with case-insensitive values.

Will open a new bug for possibly changing HTMLTrackElement.kind from an enum to DOMString as per Ms2ger's requests.
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: