-
eric.carlson@apple.com authored
https://bugs.webkit.org/show_bug.cgi?id=93779 Reviewed by Philippe Normand. Compute the position of a text track relative to rendered tracks. This is needed to position cues correctly when there is more than one text track. Source/WebCore: Test: media/track/track-cue-container-rendering-position.html * html/track/TextTrack.cpp: (WebCore::TextTrack::invalidateTrackIndex): Invalidate both cached track indices. (WebCore::TextTrack::trackIndexRelativeToRenderedTracks): Return the index of the track relative to other rendered tracks. * html/track/TextTrack.h: * html/track/TextTrackCue.cpp: (WebCore::TextTrackCue::calculateComputedLinePosition): Use trackIndexRelativeToRenderedTracks() instead of trackIndex() so cues are positioned correctly. * html/track/TextTrackList.cpp: (TextTrackList::getTrackIndex): Change return type from unsigned to int. (TextTrackList::getTrackIndexRelativeToRenderedTracks): New. * html/track/TextTrackList.h: LayoutTests: * media/track/track-cue-container-rendering-position-expected.txt: Added. * media/track/track-cue-container-rendering-position.html: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134783 268f45cc-cd09-0410-ab3c-d52691b4dbfc
a213101e