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

Unified Diff: Source/core/html/track/TextTrackCueList.h

Issue 956323002: Tweak the TextTrackCue "cue index" management (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase. Created 5 years, 10 months 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 | « Source/core/html/track/TextTrackCue.cpp ('k') | Source/core/html/track/TextTrackCueList.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/track/TextTrackCueList.h
diff --git a/Source/core/html/track/TextTrackCueList.h b/Source/core/html/track/TextTrackCueList.h
index 3a6e169e4fc85b7a4426513d56dd51040aca1c7b..6eaee48d9333d144faf8967294d2e32f854f2dc8 100644
--- a/Source/core/html/track/TextTrackCueList.h
+++ b/Source/core/html/track/TextTrackCueList.h
@@ -44,7 +44,6 @@ public:
}
unsigned long length() const;
- unsigned long getCueIndex(TextTrackCue*) const;
TextTrackCue* item(unsigned index) const;
TextTrackCue* getCueById(const AtomicString&) const;
@@ -54,16 +53,19 @@ public:
void collectActiveCues(TextTrackCueList&) const;
void updateCueIndex(TextTrackCue*);
+ bool isCueIndexValid(unsigned probeIndex) const { return probeIndex < m_firstInvalidIndex; }
+ void validateCueIndexes();
DECLARE_TRACE();
private:
TextTrackCueList();
size_t findInsertionIndex(const TextTrackCue*) const;
+ void invalidateCueIndex(size_t index);
void clear();
- void invalidateCueIndexes(size_t);
WillBeHeapVector<RefPtrWillBeMember<TextTrackCue>> m_list;
+ size_t m_firstInvalidIndex;
};
} // namespace blink
« no previous file with comments | « Source/core/html/track/TextTrackCue.cpp ('k') | Source/core/html/track/TextTrackCueList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698