Index: Source/core/html/HTMLMediaElement.cpp |
diff --git a/Source/core/html/HTMLMediaElement.cpp b/Source/core/html/HTMLMediaElement.cpp |
index ed65abe872e271a83a47b550a83a90038999fd7f..889798867248f286a0f763d6a1e0e10e02e8c056 100644 |
--- a/Source/core/html/HTMLMediaElement.cpp |
+++ b/Source/core/html/HTMLMediaElement.cpp |
@@ -1270,9 +1270,11 @@ void HTMLMediaElement::endIgnoringTrackDisplayUpdateRequests() |
updateActiveTextTrackCues(currentTime()); |
} |
-void HTMLMediaElement::textTrackAddCues(TextTrack*, const TextTrackCueList* cues) |
+void HTMLMediaElement::textTrackAddCues(TextTrack* track, const TextTrackCueList* cues) |
{ |
LOG(Media, "HTMLMediaElement::textTrackAddCues"); |
+ if (track->mode() == TextTrack::disabledKeyword()) |
+ return; |
TrackDisplayUpdateScope scope(this); |
for (size_t i = 0; i < cues->length(); ++i) |
@@ -1288,8 +1290,11 @@ void HTMLMediaElement::textTrackRemoveCues(TextTrack*, const TextTrackCueList* c |
textTrackRemoveCue(cues->item(i)->track(), cues->item(i)); |
} |
-void HTMLMediaElement::textTrackAddCue(TextTrack*, PassRefPtr<TextTrackCue> cue) |
+void HTMLMediaElement::textTrackAddCue(TextTrack* track, PassRefPtr<TextTrackCue> cue) |
{ |
+ if (track->mode() == TextTrack::disabledKeyword()) |
+ return; |
+ |
// Negative duration cues need be treated in the interval tree as |
// zero-length cues. |
double endTime = max(cue->startTime(), cue->endTime()); |