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 40bf0ef4ec60b49828f3fae5aad2eae8286a7b2c..1e285ecff0e6d5a7b84d63be26b508496ce8d28c 100644 |
--- a/Source/core/html/track/vtt/VTTRegion.cpp |
+++ b/Source/core/html/track/vtt/VTTRegion.cpp |
@@ -248,7 +248,8 @@ void VTTRegion::parseSettingValue(RegionSetting setting, const String& value) |
break; |
case Width: { |
float floatWidth; |
- if (VTTParser::parseFloatPercentageValue(value, floatWidth)) |
+ VTTScanner valueScanner(value); |
+ if (VTTParser::parseFloatPercentageValue(valueScanner, floatWidth) && valueScanner.isAtEnd()) |
m_width = floatWidth; |
else |
WTF_LOG(Media, "VTTRegion::parseSettingValue, invalid Width"); |