Add TextTrackList::getTrackById().
https://bugs.webkit.org/show_bug.cgi?id=124785

Patch by Brendan Long <b.long@cablelabs.com> on 2013-11-22
Reviewed by Eric Carlson.

Source/WebCore:

Test: media/track/track-id.html

* html/track/TextTrackList.cpp: Add getTrackById()
(TextTrackList::getTrackById):
* html/track/TextTrackList.h: Same.
* html/track/TextTrackList.idl: Same.

LayoutTests:

Update this test to make it more interesting. It now checks that the "id"
changes when the <track> id changes, makes sure TextTrack::id is readonly,
and looks the track up by id with getTrackById().

* media/track/track-id-expected.txt:
* media/track/track-id.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159711 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Conflicts:
	Source/WebCore/html/track/TextTrackList.h
Fire "change" event on TextTrackList when a TextTrack's mode changes
https://bugs.webkit.org/show_bug.cgi?id=124789

Patch by Brendan Long <b.long@cablelabs.com> on 2013-11-22
Reviewed by Eric Carlson.

Source/WebCore:

Since AudioTrackList and VideoTrackList already have this event, the
interesting bits are in TrackListBase::scheduleChangeEvent(), and we
just need to call it for TextTrackList changes.

Test: media/track/track-change-event.html

* html/HTMLMediaElement.cpp:
(HTMLMediaElement::textTrackModeChanged): Call TrackListBase::scheduleChangeEvent().
* html/track/TextTrackList.idl: Add onchange event listener.

LayoutTests:

* media/track/track-change-event-expected.txt: Added.
* media/track/track-change-event.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159714 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Merge pull request #13 from cablelabs/ruih/merge-change-event-and-get-track-by-id

Ruih/merge change event and get track by