Tweak the TextTrackCue "cue index" management

Change the invalidation function to instead of updating the cached cue
indices, update an index to the first invalid index stored in the list
itself.
Use this "first invalid index" to check if a cached index is valid or
not, and if it isn't then validate all the list's cues cached indices
starting at the stored index.
This means invalidation is faster than before (constant time), and
valid is worst case the same, but with chance of amortization.

BUG=321654

Review URL: https://codereview.chromium.org/956323002

git-svn-id: svn://svn.chromium.org/blink/trunk@190948 bbb929c8-8fbe-4397-9dbb-9b2b20218538
5 files changed
tree: df5d5d76ff1fcf30065d4cb785552740a64f0dd3
  1. third_party/