Changeset 243583 in webkit
- Timestamp:
- Mar 27, 2019, 4:44:09 PM (7 years ago)
- Location:
- branches/safari-607-branch/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
html/shadow/MediaControlElements.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-607-branch/Source/WebCore/ChangeLog
r243582 r243583 1 2019-03-27 Alan Coon <alancoon@apple.com> 2 3 Cherry-pick r243341. rdar://problem/49308013 4 5 Inband Text Track cues interspersed with Data cues can display out of order. 6 https://bugs.webkit.org/show_bug.cgi?id=196095 7 8 Reviewed by Eric Carlson. 9 10 The compareCueIntervalForDisplay() comparator depends on a virtual function, isPositionedAbove(TextTrackCue* other), 11 but this comparison returns inconsistent results for cueA->isPositionedAbove(cueB) and cueB->isPositionedAbove(cueA) 12 if the two cues are different subclasses of TextTrackCue. 13 14 The underlying algorithm should be fixed in a future patch, but for now, remove all non-displaying cues from the array 15 of activeCues before sorting, rather than after when iterating over the sorted list of activeCues. 16 17 * html/shadow/MediaControlElements.cpp: 18 (WebCore::MediaControlTextTrackContainerElement::updateDisplay): 19 20 21 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243341 268f45cc-cd09-0410-ab3c-d52691b4dbfc 22 23 2019-03-21 Jer Noble <jer.noble@apple.com> 24 25 Inband Text Track cues interspersed with Data cues can display out of order. 26 https://bugs.webkit.org/show_bug.cgi?id=196095 27 28 Reviewed by Eric Carlson. 29 30 The compareCueIntervalForDisplay() comparator depends on a virtual function, isPositionedAbove(TextTrackCue* other), 31 but this comparison returns inconsistent results for cueA->isPositionedAbove(cueB) and cueB->isPositionedAbove(cueA) 32 if the two cues are different subclasses of TextTrackCue. 33 34 The underlying algorithm should be fixed in a future patch, but for now, remove all non-displaying cues from the array 35 of activeCues before sorting, rather than after when iterating over the sorted list of activeCues. 36 37 * html/shadow/MediaControlElements.cpp: 38 (WebCore::MediaControlTextTrackContainerElement::updateDisplay): 39 1 40 2019-03-27 Alan Coon <alancoon@apple.com> 2 41 -
branches/safari-607-branch/Source/WebCore/html/shadow/MediaControlElements.cpp
r237266 r243583 1172 1172 removeChildren(); 1173 1173 1174 activeCues.removeAllMatching([] (CueInterval& cueInterval) { 1175 if (!cueInterval.data() || !cueInterval.data()->isRenderable()) 1176 return true; 1177 1178 RefPtr<VTTCue> cue = toVTTCue(cueInterval.data()); 1179 1180 return !cue->isRenderable() 1181 || !cue->track() 1182 || !cue->track()->isRendered() 1183 || cue->track()->mode() == TextTrack::Mode::Disabled 1184 || !cue->isActive() 1185 || cue->text().isEmpty(); 1186 }); 1187 1174 1188 // Sort the active cues for the appropriate display order. For example, for roll-up 1175 1189 // or paint-on captions, we need to add the cues in reverse chronological order, … … 1184 1198 continue; 1185 1199 1186 RefPtr<TextTrackCue> textTrackCue = activeCues[i].data(); 1187 if (!textTrackCue->isRenderable()) 1200 RefPtr<VTTCue> cue = toVTTCue(activeCues[i].data()); 1201 ASSERT(cue); 1202 if (!cue) 1188 1203 continue; 1189 1204 1190 RefPtr<VTTCue> cue = toVTTCue(textTrackCue.get());1191 1192 ASSERT(cue->isActive());1193 if (!cue->track() || !cue->track()->isRendered() || !cue->isActive() || cue->text().isEmpty())1194 continue;1195 1196 1205 LOG(Media, "MediaControlTextTrackContainerElement::updateDisplay(%p) - adding and positioning cue #%zu: \"%s\", start=%.2f, end=%.2f, line=%.2f", this, i, cue->text().utf8().data(), cue->startTime(), cue->endTime(), cue->line()); 1197 1198 1206 Ref<VTTCueBox> displayBox = cue->getDisplayTree(m_videoDisplaySize.size(), m_fontSize); 1199 if (cue->track()->mode() == TextTrack::Mode::Disabled)1200 continue;1201 1202 1207 RefPtr<VTTRegion> region = cue->track()->regions()->getRegionById(cue->regionId()); 1203 1208 if (!region) {
Note:
See TracChangeset
for help on using the changeset viewer.