| Index: Source/core/svg/animation/SVGSMILElement.cpp
|
| diff --git a/Source/core/svg/animation/SVGSMILElement.cpp b/Source/core/svg/animation/SVGSMILElement.cpp
|
| index 01c7c6f842b01efd3a5ca1f9dd6f5f49262a5db4..5557db8878d5e99036c5f222738a934d792f60db 100644
|
| --- a/Source/core/svg/animation/SVGSMILElement.cpp
|
| +++ b/Source/core/svg/animation/SVGSMILElement.cpp
|
| @@ -42,8 +42,6 @@
|
| #include "wtf/StdLibExtras.h"
|
| #include "wtf/Vector.h"
|
|
|
| -using namespace std;
|
| -
|
| namespace WebCore {
|
|
|
| class RepeatEvent FINAL : public Event {
|
| @@ -390,8 +388,8 @@ SMILTime SVGSMILElement::parseClockValue(const String& data)
|
|
|
| double result = 0;
|
| bool ok;
|
| - size_t doublePointOne = parse.find(':');
|
| - size_t doublePointTwo = parse.find(':', doublePointOne + 1);
|
| + std::size_t doublePointOne = parse.find(':');
|
| + std::size_t doublePointTwo = parse.find(':', doublePointOne + 1);
|
| if (doublePointOne == 2 && doublePointTwo == 5 && parse.length() >= 8) {
|
| result += parse.substring(0, 2).toUIntStrict(&ok) * 60 * 60;
|
| if (!ok)
|
| @@ -424,7 +422,7 @@ bool SVGSMILElement::parseCondition(const String& value, BeginOrEnd beginOrEnd)
|
|
|
| double sign = 1.;
|
| bool ok;
|
| - size_t pos = parseString.find('+');
|
| + std::size_t pos = parseString.find('+');
|
| if (pos == kNotFound) {
|
| pos = parseString.find('-');
|
| if (pos != kNotFound)
|
| @@ -797,7 +795,7 @@ SMILTime SVGSMILElement::minValue() const
|
|
|
| SMILTime SVGSMILElement::simpleDuration() const
|
| {
|
| - return min(dur(), SMILTime::indefinite());
|
| + return std::min(dur(), SMILTime::indefinite());
|
| }
|
|
|
| void SVGSMILElement::addBeginTime(SMILTime eventTime, SMILTime beginTime, SMILTimeWithOrigin::Origin origin)
|
| @@ -869,7 +867,7 @@ SMILTime SVGSMILElement::repeatingDuration() const
|
| if (!simpleDuration || (repeatDur.isUnresolved() && repeatCount.isUnresolved()))
|
| return simpleDuration;
|
| SMILTime repeatCountDuration = simpleDuration * repeatCount;
|
| - return min(repeatCountDuration, min(repeatDur, SMILTime::indefinite()));
|
| + return std::min(repeatCountDuration, std::min(repeatDur, SMILTime::indefinite()));
|
| }
|
|
|
| SMILTime SVGSMILElement::resolveActiveEnd(SMILTime resolvedBegin, SMILTime resolvedEnd) const
|
| @@ -882,7 +880,7 @@ SMILTime SVGSMILElement::resolveActiveEnd(SMILTime resolvedBegin, SMILTime resol
|
| else if (!resolvedEnd.isFinite())
|
| preliminaryActiveDuration = repeatingDuration();
|
| else
|
| - preliminaryActiveDuration = min(repeatingDuration(), resolvedEnd - resolvedBegin);
|
| + preliminaryActiveDuration = std::min(repeatingDuration(), resolvedEnd - resolvedBegin);
|
|
|
| SMILTime minValue = this->minValue();
|
| SMILTime maxValue = this->maxValue();
|
| @@ -892,15 +890,15 @@ SMILTime SVGSMILElement::resolveActiveEnd(SMILTime resolvedBegin, SMILTime resol
|
| minValue = 0;
|
| maxValue = SMILTime::indefinite();
|
| }
|
| - return resolvedBegin + min(maxValue, max(minValue, preliminaryActiveDuration));
|
| + return resolvedBegin + std::min(maxValue, std::max(minValue, preliminaryActiveDuration));
|
| }
|
|
|
| SMILInterval SVGSMILElement::resolveInterval(ResolveInterval resolveIntervalType) const
|
| {
|
| bool first = resolveIntervalType == FirstInterval;
|
| // See the pseudocode in http://www.w3.org/TR/SMIL3/smil-timing.html#q90.
|
| - SMILTime beginAfter = first ? -numeric_limits<double>::infinity() : m_interval.end;
|
| - SMILTime lastIntervalTempEnd = numeric_limits<double>::infinity();
|
| + SMILTime beginAfter = first ? -std::numeric_limits<double>::infinity() : m_interval.end;
|
| + SMILTime lastIntervalTempEnd = std::numeric_limits<double>::infinity();
|
| while (true) {
|
| bool equalsMinimumOK = !first || m_interval.end > m_interval.begin;
|
| SMILTime tempBegin = findInstanceTime(Begin, beginAfter, equalsMinimumOK);
|
| @@ -936,7 +934,7 @@ void SVGSMILElement::resolveFirstInterval()
|
| if (!firstInterval.begin.isUnresolved() && firstInterval != m_interval) {
|
| m_interval = firstInterval;
|
| notifyDependentsIntervalChanged();
|
| - m_nextProgressTime = min(m_nextProgressTime, m_interval.begin);
|
| + m_nextProgressTime = std::min(m_nextProgressTime, m_interval.begin);
|
|
|
| if (m_timeContainer)
|
| m_timeContainer->notifyIntervalsChanged();
|
| @@ -951,7 +949,7 @@ bool SVGSMILElement::resolveNextInterval()
|
| if (!nextInterval.begin.isUnresolved() && nextInterval.begin != m_interval.begin) {
|
| m_interval = nextInterval;
|
| notifyDependentsIntervalChanged();
|
| - m_nextProgressTime = min(m_nextProgressTime, m_interval.begin);
|
| + m_nextProgressTime = std::min(m_nextProgressTime, m_interval.begin);
|
| return true;
|
| }
|
|
|
| @@ -1096,7 +1094,7 @@ float SVGSMILElement::calculateAnimationPercentAndRepeat(SMILTime elapsed, unsig
|
|
|
| double percent = (m_interval.end.value() - m_interval.begin.value()) / simpleDuration.value();
|
| percent = percent - floor(percent);
|
| - if (percent < numeric_limits<float>::epsilon() || 1 - percent < numeric_limits<float>::epsilon())
|
| + if (percent < std::numeric_limits<float>::epsilon() || 1 - percent < std::numeric_limits<float>::epsilon())
|
| return 1.0f;
|
| return narrowPrecisionToFloat(percent);
|
| }
|
|
|