Make VTTParser::collectDigitsToInt non-copying

Modify VTTParser::collectDigits to simply count the number of digits and
advance the position. Rename it to scanDigits and make it local to the
compilation unit.
Convert users of collectDigits to use scanDigits instead. For
collectDigitsToInt this means that there's no longer a need to copy the
digits into a temporary String. Similarly for parseFloatPercentageValue.

Also fixes a minor issue in parseFloatPercentageValue where the endpoints
(0 and 100) were excluded from the range of valid values rather than
included.

BUG=305317

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

git-svn-id: svn://svn.chromium.org/blink/trunk@163160 bbb929c8-8fbe-4397-9dbb-9b2b20218538
2 files changed
tree: 221d847743d13e2687017d526d27940dd3e5f2d8
  1. third_party/