summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/WebKit/Source/core/html/TimeRanges.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/WebKit/Source/core/html/TimeRanges.cpp')
-rw-r--r--chromium/third_party/WebKit/Source/core/html/TimeRanges.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/chromium/third_party/WebKit/Source/core/html/TimeRanges.cpp b/chromium/third_party/WebKit/Source/core/html/TimeRanges.cpp
index 407ff32353b..c8fa279edad 100644
--- a/chromium/third_party/WebKit/Source/core/html/TimeRanges.cpp
+++ b/chromium/third_party/WebKit/Source/core/html/TimeRanges.cpp
@@ -26,13 +26,13 @@
#include "config.h"
#include "core/html/TimeRanges.h"
+#include "bindings/v8/ExceptionMessages.h"
#include "bindings/v8/ExceptionState.h"
#include "bindings/v8/ExceptionStatePlaceholder.h"
#include "core/dom/ExceptionCode.h"
#include <math.h>
using namespace WebCore;
-using namespace std;
TimeRanges::TimeRanges(double start, double end)
{
@@ -116,7 +116,7 @@ void TimeRanges::unionWith(const TimeRanges* other)
double TimeRanges::start(unsigned index, ExceptionState& exceptionState) const
{
if (index >= length()) {
- exceptionState.throwDOMException(IndexSizeError, "The index provided (" + String::number(index) + ") is not less than the object's length (" + String::number(length()) + ").");
+ exceptionState.throwDOMException(IndexSizeError, ExceptionMessages::indexExceedsMaximumBound("index", index, length()));
return 0;
}
return m_ranges[index].m_start;
@@ -125,7 +125,7 @@ double TimeRanges::start(unsigned index, ExceptionState& exceptionState) const
double TimeRanges::end(unsigned index, ExceptionState& exceptionState) const
{
if (index >= length()) {
- exceptionState.throwDOMException(IndexSizeError, "The index provided (" + String::number(index) + ") is not less than the object's length (" + String::number(length()) + ").");
+ exceptionState.throwDOMException(IndexSizeError, ExceptionMessages::indexExceedsMaximumBound("index", index, length()));
return 0;
}
return m_ranges[index].m_end;
@@ -134,7 +134,7 @@ double TimeRanges::end(unsigned index, ExceptionState& exceptionState) const
void TimeRanges::add(double start, double end)
{
ASSERT(start <= end);
- unsigned int overlappingArcIndex;
+ unsigned overlappingArcIndex;
Range addedRange(start, end);
// For each present range check if we need to:
@@ -193,9 +193,9 @@ double TimeRanges::nearest(double time) const
if (time >= startTime && time <= endTime)
return time;
if (fabs(startTime - time) < closest)
- closest = fabsf(startTime - time);
+ closest = fabs(startTime - time);
else if (fabs(endTime - time) < closest)
- closest = fabsf(endTime - time);
+ closest = fabs(endTime - time);
}
return closest;
}