[Mac, iOS] Captions are appearing multiple times during repeated video play through
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Aug 2014 16:23:05 +0000 (16:23 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Aug 2014 16:23:05 +0000 (16:23 +0000)
commitdaee63888d7e99d69376ff437c4e5dd9722d518c
treed2b682f70216e770a23a5605ea314249714501b7
parente996d1da3bd8e8c5b87f3c31ae032992c0ec3260
[Mac, iOS] Captions are appearing multiple times during repeated video play through
https://bugs.webkit.org/show_bug.cgi?id=135680
Source/WebCore:

<rdar://problem/17926802>

Reviewed by Eric Carlson.

Test: media/track/track-in-band-cues-added-once.html

Revert TextTrackCueGeneric::isOrderedBefore logic to its original form, and add
a new 'isOrderedBeforeDuringDisplay' for the special case of displaying captions.

* html/shadow/MediaControlElements.cpp:
(WebCore::compareCueIntervalForDisplay): Added helper function.
(WebCore::MediaControlTextTrackContainerElement::updateDisplay): Use the new
'isOrderedBeforeDuringDisplay' to order the cues for display.
* html/track/TextTrackCue.h:
(WebCore::TextTrackCue::isOrderedBeforeDuringDisplay): Added. This just
calls the existing 'isOrderedBefore' method.
* html/track/TextTrackCueGeneric.cpp:
(WebCore::TextTrackCueGeneric::isOrderedBefore): Revert to logic used
prior to r171700.
(WebCore::TextTrackCueGeneric::isOrderedBeforeDuringDisplay): New method that
implements the behavior in r171700.
* html/track/TextTrackCueGeneric.h:

LayoutTests:

<rdar://problem/17926802>

Reviewed by Eric Carlson.

Reactivate the 'track-in-band-cues-added-once.html' test. We would have caught
this bug immediately if the test had been enabled.

* platform/mac/TestExpectations: Turn 'track-in-band-cues-added-once.html' back
on.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172213 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/platform/mac/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/html/shadow/MediaControlElements.cpp
Source/WebCore/html/track/TextTrackCue.h
Source/WebCore/html/track/TextTrackCueGeneric.cpp
Source/WebCore/html/track/TextTrackCueGeneric.h