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

Unified Diff: Source/core/html/track/vtt/VTTParser.cpp

Issue 143983002: Rework end-of-value field handling in VTTRegion::parseSettingValue (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 11 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/vtt/VTTParser.h ('k') | Source/core/html/track/vtt/VTTRegion.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/track/vtt/VTTParser.cpp
diff --git a/Source/core/html/track/vtt/VTTParser.cpp b/Source/core/html/track/vtt/VTTParser.cpp
index 6148ea67bb57a9757104b12869ba555d2601c875..6cb7c45f807bdc580d0cef8e61008d7730677211 100644
--- a/Source/core/html/track/vtt/VTTParser.cpp
+++ b/Source/core/html/track/vtt/VTTParser.cpp
@@ -48,12 +48,6 @@ const double secondsPerMinute = 60;
const double secondsPerMillisecond = 0.001;
const unsigned fileIdentifierLength = 6;
-unsigned VTTParser::collectDigitsToInt(const String& input, unsigned* position, int& number)
-{
- VTTLegacyScanner inputScanner(input, position);
- return inputScanner.scanDigits(number);
-}
-
bool VTTParser::parseFloatPercentageValue(VTTScanner& valueScanner, float& percentage)
{
float number;
@@ -68,10 +62,8 @@ bool VTTParser::parseFloatPercentageValue(VTTScanner& valueScanner, float& perce
return true;
}
-bool VTTParser::parseFloatPercentageValuePair(const String& value, char delimiter, FloatPoint& valuePair)
+bool VTTParser::parseFloatPercentageValuePair(VTTScanner& valueScanner, char delimiter, FloatPoint& valuePair)
{
- VTTScanner valueScanner(value);
-
float firstCoord;
if (!parseFloatPercentageValue(valueScanner, firstCoord))
return false;
@@ -83,9 +75,6 @@ bool VTTParser::parseFloatPercentageValuePair(const String& value, char delimite
if (!parseFloatPercentageValue(valueScanner, secondCoord))
return false;
- if (!valueScanner.isAtEnd())
- return false;
-
valuePair = FloatPoint(firstCoord, secondCoord);
return true;
}
« no previous file with comments | « Source/core/html/track/vtt/VTTParser.h ('k') | Source/core/html/track/vtt/VTTRegion.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698