Introduce VTTScanner - a parser helper for various VTT parsing needs
Add a new helper class - VTTScanner - with the aim of performing less
explicit splitting/reallocation of strings (best case, none at all) and
have less explicit index boundary checks.
To allow this new scheme to interact and work side-by-side with the
old <String, position> scheme, also add a wrapper VTTLegacyScanner
which allows state to be imported and exported based on scope.
Start converting code to the new scheme by modifying
VTTParser::collectTimingsAndSettings and VTTParser::collectTimeStamp to
use this helper.
TEST=unittests:VTTScanner.*
TEST=Existing VTT cue settings parsing tests (various in media/track/*)
BUG=305317
Review URL: https://codereview.chromium.org/119143002
git-svn-id: svn://svn.chromium.org/blink/trunk@164775 bbb929c8-8fbe-4397-9dbb-9b2b20218538
6 files changed