| 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 c67428a0c25a9af10d2c7fb9df3d20f10659425c..7a549ff29862e36673b1d6763d8fcea7b2215867 100644
|
| --- a/Source/core/html/track/vtt/VTTRegion.cpp
|
| +++ b/Source/core/html/track/vtt/VTTRegion.cpp
|
| @@ -68,12 +68,8 @@ static const float lineHeight = 5.33;
|
| // Default scrolling animation time period (s).
|
| static const float scrollTime = 0.433;
|
|
|
| -static bool isInfiniteOrNonNumberOrNonPercentage(double value, const char* method, ExceptionState& exceptionState)
|
| +static bool isNonPercentage(double value, const char* method, ExceptionState& exceptionState)
|
| {
|
| - if (!std::isfinite(value)) {
|
| - exceptionState.throwTypeError(ExceptionMessages::notAFiniteNumber(value));
|
| - return true;
|
| - }
|
| if (value < 0 || value > 100) {
|
| exceptionState.throwDOMException(IndexSizeError, ExceptionMessages::indexOutsideRange("value", value, 0.0, ExceptionMessages::InclusiveBound, 100.0, ExceptionMessages::InclusiveBound));
|
| return true;
|
| @@ -110,7 +106,7 @@ void VTTRegion::setId(const String& id)
|
|
|
| void VTTRegion::setWidth(double value, ExceptionState& exceptionState)
|
| {
|
| - if (isInfiniteOrNonNumberOrNonPercentage(value, "width", exceptionState))
|
| + if (isNonPercentage(value, "width", exceptionState))
|
| return;
|
|
|
| m_width = value;
|
| @@ -128,7 +124,7 @@ void VTTRegion::setHeight(long value, ExceptionState& exceptionState)
|
|
|
| void VTTRegion::setRegionAnchorX(double value, ExceptionState& exceptionState)
|
| {
|
| - if (isInfiniteOrNonNumberOrNonPercentage(value, "regionAnchorX", exceptionState))
|
| + if (isNonPercentage(value, "regionAnchorX", exceptionState))
|
| return;
|
|
|
| m_regionAnchor.setX(value);
|
| @@ -136,7 +132,7 @@ void VTTRegion::setRegionAnchorX(double value, ExceptionState& exceptionState)
|
|
|
| void VTTRegion::setRegionAnchorY(double value, ExceptionState& exceptionState)
|
| {
|
| - if (isInfiniteOrNonNumberOrNonPercentage(value, "regionAnchorY", exceptionState))
|
| + if (isNonPercentage(value, "regionAnchorY", exceptionState))
|
| return;
|
|
|
| m_regionAnchor.setY(value);
|
| @@ -144,7 +140,7 @@ void VTTRegion::setRegionAnchorY(double value, ExceptionState& exceptionState)
|
|
|
| void VTTRegion::setViewportAnchorX(double value, ExceptionState& exceptionState)
|
| {
|
| - if (isInfiniteOrNonNumberOrNonPercentage(value, "viewportAnchorX", exceptionState))
|
| + if (isNonPercentage(value, "viewportAnchorX", exceptionState))
|
| return;
|
|
|
| m_viewportAnchor.setX(value);
|
| @@ -152,7 +148,7 @@ void VTTRegion::setViewportAnchorX(double value, ExceptionState& exceptionState)
|
|
|
| void VTTRegion::setViewportAnchorY(double value, ExceptionState& exceptionState)
|
| {
|
| - if (isInfiniteOrNonNumberOrNonPercentage(value, "viewportAnchorY", exceptionState))
|
| + if (isNonPercentage(value, "viewportAnchorY", exceptionState))
|
| return;
|
|
|
| m_viewportAnchor.setY(value);
|
|
|