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

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

Issue 139343006: Rework float value/percentage scanning for VTTRegion (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
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");

Powered by Google App Engine
This is Rietveld 408576698