Index: Source/core/html/track/TextTrack.cpp |
diff --git a/Source/core/html/track/TextTrack.cpp b/Source/core/html/track/TextTrack.cpp |
index 178c29d6718dc8276c57610f4785624646cb2499..1840626a2e78848d9e8d45e695d3f7d47a75bc50 100644 |
--- a/Source/core/html/track/TextTrack.cpp |
+++ b/Source/core/html/track/TextTrack.cpp |
@@ -175,7 +175,7 @@ void TextTrack::setMode(const AtomicString& mode) |
// because they will no longer be accessible from the cues() function. |
if (mode == disabledKeyword() && m_client && m_cues) |
m_client->textTrackRemoveCues(this, m_cues.get()); |
- |
+ |
if (mode != showingKeyword() && m_cues) |
for (size_t i = 0; i < m_cues->length(); ++i) |
m_cues->item(i)->removeDisplayTree(); |
@@ -205,10 +205,10 @@ void TextTrack::removeAllCues() |
if (m_client) |
m_client->textTrackRemoveCues(this, m_cues.get()); |
- |
+ |
for (size_t i = 0; i < m_cues->length(); ++i) |
m_cues->item(i)->setTrack(0); |
- |
+ |
m_cues = 0; |
} |
@@ -249,7 +249,7 @@ void TextTrack::addCue(PassRefPtr<TextTrackCue> prpCue) |
// 2. Add cue to the method's TextTrack object's text track's text track list of cues. |
cue->setTrack(this); |
ensureTextTrackCueList()->add(cue); |
- |
+ |
if (m_client) |
m_client->textTrackAddCue(this, cue.get()); |
} |
@@ -263,7 +263,7 @@ void TextTrack::removeCue(TextTrackCue* cue, ExceptionCode& ec) |
// The removeCue(cue) method of TextTrack objects, when invoked, must run the following steps: |
- // 1. If the given cue is not currently listed in the method's TextTrack |
+ // 1. If the given cue is not currently listed in the method's TextTrack |
// object's text track's text track list of cues, then throw a NotFoundError exception. |
if (cue->track() != this) { |
ec = NotFoundError; |
@@ -420,10 +420,10 @@ TextTrackCueList* TextTrack::ensureTextTrackCueList() |
int TextTrack::trackIndexRelativeToRenderedTracks() |
{ |
ASSERT(m_mediaElement); |
- |
+ |
if (m_renderedTrackIndex == invalidTrackIndex) |
m_renderedTrackIndex = m_mediaElement->textTracks()->getTrackIndexRelativeToRenderedTracks(this); |
- |
+ |
return m_renderedTrackIndex; |
} |
@@ -431,19 +431,19 @@ bool TextTrack::hasCue(TextTrackCue* cue) |
{ |
if (cue->startTime() < 0 || cue->endTime() < 0) |
return false; |
- |
+ |
if (!m_cues || !m_cues->length()) |
return false; |
- |
+ |
size_t searchStart = 0; |
size_t searchEnd = m_cues->length(); |
- |
+ |
while (1) { |
ASSERT(searchStart <= m_cues->length()); |
ASSERT(searchEnd <= m_cues->length()); |
- |
+ |
TextTrackCue* existingCue; |
- |
+ |
// Cues in the TextTrackCueList are maintained in start time order. |
if (searchStart == searchEnd) { |
if (!searchStart) |
@@ -453,7 +453,7 @@ bool TextTrack::hasCue(TextTrackCue* cue) |
// consider all of them. |
while (searchStart >= 2 && cue->startTime() == m_cues->item(searchStart - 2)->startTime()) |
--searchStart; |
- |
+ |
bool firstCompare = true; |
while (1) { |
if (!firstCompare) |
@@ -468,11 +468,11 @@ bool TextTrack::hasCue(TextTrackCue* cue) |
if (*existingCue != *cue) |
continue; |
- |
+ |
return true; |
} |
} |
- |
+ |
size_t index = (searchStart + searchEnd) / 2; |
existingCue = m_cues->item(index); |
if (cue->startTime() < existingCue->startTime() || (cue->startTime() == existingCue->startTime() && cue->endTime() > existingCue->endTime())) |
@@ -480,7 +480,7 @@ bool TextTrack::hasCue(TextTrackCue* cue) |
else |
searchStart = index + 1; |
} |
- |
+ |
ASSERT_NOT_REACHED(); |
return false; |
} |