Chromium Code Reviews| Index: Source/core/html/track/vtt/VTTRegion.cpp |
| diff --git a/Source/core/html/track/vtt/VTTRegion.cpp b/Source/core/html/track/vtt/VTTRegion.cpp |
| index f049721d16908642a21157905b7eb73a405e63d7..18981845a694800b28b165480a20a13a1f296f2b 100644 |
| --- a/Source/core/html/track/vtt/VTTRegion.cpp |
| +++ b/Source/core/html/track/vtt/VTTRegion.cpp |
| @@ -238,7 +238,6 @@ void VTTRegion::parseSettingValue(RegionSetting setting, const String& value) |
| bool isValidSetting; |
| String numberAsString; |
| int number; |
| - unsigned position; |
| FloatPoint anchorPosition; |
| switch (setting) { |
| @@ -253,17 +252,14 @@ void VTTRegion::parseSettingValue(RegionSetting setting, const String& value) |
| else |
| WTF_LOG(Media, "VTTRegion::parseSettingValue, invalid Width"); |
| break; |
| - case Height: |
| - position = 0; |
| - |
| - numberAsString = VTTParser::collectDigits(value, &position); |
| - number = value.toInt(&isValidSetting); |
| - |
| - if (isValidSetting && number >= 0) |
| + case Height: { |
| + unsigned position = 0; |
| + if (VTTParser::collectDigitsToInt(value, &position, number) && position == value.length()) |
| m_heightInLines = number; |
| else |
| WTF_LOG(Media, "VTTRegion::parseSettingValue, invalid Height"); |
| break; |
| + } |
|
Mike West
2013/12/03 13:55:41
Why did you add the '{' and '}'?
jochen (gone - plz use gerrit)
2013/12/03 14:48:37
So the unsigned position in line 256 is properly s
|
| case RegionAnchor: |
| anchorPosition = VTTParser::parseFloatPercentageValuePair(value, ',', isValidSetting); |
| if (isValidSetting) |