Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(132)

Unified Diff: Source/WebCore/html/track/TextTrackCueList.cpp

Issue 11369197: Merge 133610 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1271/
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/media/track/track-add-remove-cue-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/html/track/TextTrackCueList.cpp
===================================================================
--- Source/WebCore/html/track/TextTrackCueList.cpp (revision 134272)
+++ Source/WebCore/html/track/TextTrackCueList.cpp (working copy)
@@ -92,12 +92,12 @@
// http://www.whatwg.org/specs/web-apps/current-work/#text-track-cue-order
RefPtr<TextTrackCue> cue = prpCue;
if (start == end) {
- if (!m_list.isEmpty() && (m_list[start - 1].get() == cue.get()))
+ if (!m_list.isEmpty() && (start > 0) && (m_list[start - 1].get() == cue.get()))
return false;
- m_list.insert(start, cue);
- invalidateCueIndexes(start);
- return true;
+ m_list.insert(start, cue);
+ invalidateCueIndexes(start);
+ return true;
}
size_t index = (start + end) / 2;
« no previous file with comments | « LayoutTests/media/track/track-add-remove-cue-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698