Changeset 244014 in webkit
- Timestamp:
- Apr 8, 2019, 5:39:43 AM (7 years ago)
- Location:
- releases/WebKitGTK/webkit-2.24/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
html/shadow/MediaControlElements.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
releases/WebKitGTK/webkit-2.24/Source/WebCore/ChangeLog
r244013 r244014 1 2019-03-21 Jer Noble <jer.noble@apple.com> 2 3 Inband Text Track cues interspersed with Data cues can display out of order. 4 https://bugs.webkit.org/show_bug.cgi?id=196095 5 6 Reviewed by Eric Carlson. 7 8 The compareCueIntervalForDisplay() comparator depends on a virtual function, isPositionedAbove(TextTrackCue* other), 9 but this comparison returns inconsistent results for cueA->isPositionedAbove(cueB) and cueB->isPositionedAbove(cueA) 10 if the two cues are different subclasses of TextTrackCue. 11 12 The underlying algorithm should be fixed in a future patch, but for now, remove all non-displaying cues from the array 13 of activeCues before sorting, rather than after when iterating over the sorted list of activeCues. 14 15 * html/shadow/MediaControlElements.cpp: 16 (WebCore::MediaControlTextTrackContainerElement::updateDisplay): 17 1 18 2019-03-21 Zalan Bujtas <zalan@apple.com> 2 19 -
releases/WebKitGTK/webkit-2.24/Source/WebCore/html/shadow/MediaControlElements.cpp
r237266 r244014 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.