[Mac, iOS] Paint-on closed captions get out-of-order in Safari
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 28 Jul 2014 21:58:18 +0000 (21:58 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 28 Jul 2014 21:58:18 +0000 (21:58 +0000)
commitcd18a2755367907a67b5dee077a48ac768561773
treeac26a0ddb41303c5a0bfb5ca208d327d9a4201bd
parentc0c62bd2e6db94807058774d53c89db472630382
[Mac, iOS] Paint-on closed captions get out-of-order in Safari
https://bugs.webkit.org/show_bug.cgi?id=135332
<rdar://problem/15317278>

Reviewed by Brent Fulgham.

* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTextTrackContainerElement::updateDisplay): If the
number of active cues is greater than the current set of CSS boxes representing
the cues, throw away the CSS boxes and re-layout all the cues.
* html/track/InbandGenericTextTrack.cpp:
(WebCore::InbandGenericTextTrack::addGenericCue): Add some logging.
(WebCore::InbandGenericTextTrack::removeGenericCue): Ditto.
* html/track/TextTrackCueGeneric.cpp:
(WebCore::TextTrackCueGeneric::isOrderedBefore): Revise ordering rules so that we put
newer cues earlier in the layout order so they are drawn towards the bottom
of the screen. Only do this for Generic captions.
* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
(WebCore::InbandTextTrackPrivateAVF::processAttributedStrings): Adjust logging
messages.
(WebCore::InbandTextTrackPrivateAVF::removeCompletedCues): Add logging.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171700 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/html/shadow/MediaControlElements.cpp
Source/WebCore/html/track/InbandGenericTextTrack.cpp
Source/WebCore/html/track/TextTrackCueGeneric.cpp
Source/WebCore/platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp