Index: Source/core/html/track/TextTrack.cpp |
diff --git a/Source/core/html/track/TextTrack.cpp b/Source/core/html/track/TextTrack.cpp |
index 6b3941845c9482fde2e97b674bd062f5735bcfeb..f46fc5d053c75590de97635cef01e14e120296a2 100644 |
--- a/Source/core/html/track/TextTrack.cpp |
+++ b/Source/core/html/track/TextTrack.cpp |
@@ -247,7 +247,7 @@ void TextTrack::addCue(PassRefPtrWillBeRawPtr<TextTrackCue> prpCue) |
cue->setTrack(this); |
ensureTextTrackCueList()->add(cue); |
- if (mediaElement()) |
+ if (mediaElement() && m_mode != disabledKeyword()) |
mediaElement()->textTrackAddCue(this, cue.get()); |
} |
@@ -367,7 +367,10 @@ void TextTrack::cueDidChange(TextTrackCue* cue) |
// Make sure the TextTrackCueList order is up-to-date. |
ensureTextTrackCueList()->updateCueIndex(cue); |
- // ... and add it back again. |
+ // ... and add it back again if the track is enabled. |
+ if (m_mode == disabledKeyword()) |
+ return; |
+ |
mediaElement()->textTrackAddCue(this, cue); |
} |