The 'global isinf/isnan' compiler quirk required when using clang with libstdc++
https://bugs.webkit.org/show_bug.cgi?id=109325
Reviewed by Anders Carlsson.
Prefix calls to the isinf and isnan methods with std::, declaring we want to use the
two methods as they're provided by the C++ standard library being used.
Source/JavaScriptCore:
* API/JSValueRef.cpp:
(JSValueMakeNumber):
* JSCTypedArrayStubs.h:
(JSC):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitLoad):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::constantNaN):
* offlineasm/cloop.rb:
* runtime/DateConstructor.cpp:
(JSC::dateUTC): Also include an opportunistic style fix.
* runtime/DateInstance.cpp:
(JSC::DateInstance::calculateGregorianDateTime):
(JSC::DateInstance::calculateGregorianDateTimeUTC):
* runtime/DatePrototype.cpp:
(JSC::dateProtoFuncGetMilliSeconds):
(JSC::dateProtoFuncGetUTCMilliseconds):
(JSC::setNewValueFromTimeArgs):
(JSC::setNewValueFromDateArgs):
(JSC::dateProtoFuncSetYear):
* runtime/JSCJSValue.cpp:
(JSC::JSValue::toInteger):
* runtime/JSDateMath.cpp:
(JSC::getUTCOffset):
(JSC::parseDateFromNullTerminatedCharacters):
(JSC::parseDate):
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::globalFuncIsNaN):
* runtime/MathObject.cpp:
(JSC::mathProtoFuncMax):
(JSC::mathProtoFuncMin):
(JSC::mathProtoFuncPow):
* runtime/PropertyDescriptor.cpp:
(JSC::sameValue):
Source/WebCore:
No new tests as there's no change in functionality.
* Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::setDuration):
* Modules/webaudio/AudioBufferSourceNode.cpp:
(WebCore::AudioBufferSourceNode::totalPitchRate):
* Modules/webaudio/AudioParam.cpp:
(WebCore::AudioParam::setValue):
* Modules/webaudio/AudioParamTimeline.cpp:
(WebCore::isValidNumber):
* Modules/webaudio/PannerNode.cpp:
(WebCore::fixNANs):
* bindings/js/IDBBindingUtilities.cpp:
(WebCore::createIDBKeyFromValue):
* bindings/js/JSDataViewCustom.cpp:
(WebCore::getDataViewMember):
* bindings/js/JSGeolocationCustom.cpp:
(WebCore::setTimeout):
(WebCore::setMaximumAge):
* bindings/js/JSHTMLOptionsCollectionCustom.cpp:
(WebCore::JSHTMLOptionsCollection::setLength):
* bindings/js/JSWebKitPointCustom.cpp:
(WebCore::JSWebKitPointConstructor::constructJSWebKitPoint):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
(GenerateParametersCheck):
* bindings/scripts/CodeGeneratorV8.pm:
(GenerateParametersCheck):
* bindings/scripts/test/JS/JSFloat64Array.cpp:
(WebCore::JSFloat64Array::getByIndex):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjPrototypeFunctionClassMethodWithClamp):
* bindings/scripts/test/V8/V8TestObj.cpp:
(WebCore::TestObjV8Internal::classMethodWithClampCallback):
* bindings/v8/IDBBindingUtilities.cpp:
(WebCore::createIDBKeyFromValue):
* bindings/v8/V8Binding.cpp:
(WebCore::toInt32):
(WebCore::toUInt32):
* bindings/v8/custom/V8GeolocationCustom.cpp:
(WebCore::createPositionOptions):
* bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
(WebCore::V8HTMLOptionsCollection::lengthAccessorSetter):
* bindings/v8/custom/V8WebKitPointCustom.cpp:
(WebCore::V8WebKitPoint::constructorCallbackCustom):
* bridge/qt/qt_runtime.cpp:
(JSC::Bindings::convertValueToQVariant):
* css/WebKitCSSMatrix.cpp:
(WebCore::WebKitCSSMatrix::translate):
(WebCore::WebKitCSSMatrix::scale):
(WebCore::WebKitCSSMatrix::rotate):
(WebCore::WebKitCSSMatrix::rotateAxisAngle):
(WebCore::WebKitCSSMatrix::skewX):
(WebCore::WebKitCSSMatrix::skewY):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::percentLoaded):
(WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
(WebCore::HTMLMediaElement::endedPlayback):
* html/MediaController.cpp:
(MediaController::duration):
* html/canvas/WebGLRenderingContext.cpp:
(WebCore):
(WebCore::WebGLRenderingContext::clearColor):
* html/track/TextTrack.cpp:
(WebCore::TextTrack::addCue):
* html/track/TextTrackCue.cpp:
(WebCore::TextTrackCue::setStartTime):
(WebCore::TextTrackCue::setEndTime):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::adjustWindowRect):
* page/WindowFeatures.cpp:
(WebCore::WindowFeatures::floatFeature): Also include an opportunistic style fix.
* platform/CalculationValue.cpp:
(WebCore::CalculationValue::evaluate):
* platform/Decimal.cpp:
(WebCore::Decimal::fromDouble):
* platform/Length.cpp:
(WebCore::Length::nonNanCalculatedValue):
* platform/audio/AudioResampler.cpp:
(WebCore::AudioResampler::setRate):
* platform/audio/DynamicsCompressorKernel.cpp:
(WebCore::DynamicsCompressorKernel::process):
* platform/audio/Reverb.cpp:
(WebCore::calculateNormalizationScale):
* platform/graphics/Font.cpp:
(WebCore::Font::width):
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
(WebCore::MediaPlayerPrivateAVFoundation::isLiveStream):
* platform/graphics/gpu/LoopBlinnMathUtils.cpp:
(LoopBlinnMathUtils):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::buffered):
(WebCore::MediaPlayerPrivateGStreamer::maxTimeSeekable):
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::MediaPlayerPrivateQTKit::maxTimeSeekable):
* platform/graphics/opentype/OpenTypeVerticalData.cpp:
(WebCore::OpenTypeVerticalData::getVerticalTranslationsForGlyphs):
* platform/graphics/transforms/TransformationMatrix.cpp:
(WebCore::clampEdgeValue):
(WebCore::TransformationMatrix::clampedBoundsOfProjectedQuad):
* platform/network/ResourceResponseBase.cpp:
(WebCore::ResourceResponseBase::parseCacheControlDirectives):
* rendering/RenderMediaControlsChromium.cpp:
(WebCore::paintMediaSlider):
(WebCore::paintMediaVolumeSlider):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintMediaSliderTrack):
* svg/SVGAnimationElement.cpp:
(WebCore::SVGAnimationElement::beginElementAt):
(WebCore::SVGAnimationElement::endElementAt):
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::setCurrentTime):
* svg/animation/SMILTime.h:
(WebCore::SMILTime::SMILTime):
* svg/animation/SVGSMILElement.cpp:
(WebCore::SVGSMILElement::addBeginTime):
(WebCore::SVGSMILElement::addEndTime):
* xml/XPathFunctions.cpp:
(WebCore::XPath::FunSubstring::evaluate):
(WebCore::XPath::FunRound::round):
* xml/XPathValue.cpp:
(WebCore::XPath::Value::toBoolean): Also include an opportunistic style fix.
(WebCore::XPath::Value::toString):
Source/WebKit/chromium:
* tests/DecimalTest.cpp:
(TEST_F):
Source/WebKit/mac:
* tests/DecimalTest.cpp:
(TEST_F):
Source/WTF:
* wtf/Compiler.h: Remove the global isinf/isnan compiler quirk definitions. They're not required anymore.
* wtf/DateMath.cpp: Move the workaround for isinf on Solaris into the std namespace. Ditto for isinf and isnan
when using MSVC. Stop bringing the isinf and isnan methods into the global scope when using other configurations.
(WTF::parseDateFromNullTerminatedCharacters):
* wtf/IntegralTypedArrayBase.h:
(WTF::IntegralTypedArrayBase::set):
* wtf/MathExtras.h:
(std):
(std::isinf):
(wtf_fmod):
(wtf_pow):
(doubleToInteger):
* wtf/MediaTime.cpp:
(WTF::MediaTime::createWithFloat):
(WTF::MediaTime::createWithDouble):
* wtf/Uint8ClampedArray.h:
(WTF::Uint8ClampedArray::set):
Tools:
* DumpRenderTree/TestRunner.cpp:
(setAppCacheMaximumSizeCallback):
(setApplicationCacheOriginQuotaCallback):
(setDatabaseQuotaCallback):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142810 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index e74d8be..d967ddb 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,137 @@
+2013-02-13 Zan Dobersek <zdobersek@igalia.com>
+
+ The 'global isinf/isnan' compiler quirk required when using clang with libstdc++
+ https://bugs.webkit.org/show_bug.cgi?id=109325
+
+ Reviewed by Anders Carlsson.
+
+ Prefix calls to the isinf and isnan methods with std::, declaring we want to use the
+ two methods as they're provided by the C++ standard library being used.
+
+ No new tests as there's no change in functionality.
+
+ * Modules/mediasource/MediaSource.cpp:
+ (WebCore::MediaSource::setDuration):
+ * Modules/webaudio/AudioBufferSourceNode.cpp:
+ (WebCore::AudioBufferSourceNode::totalPitchRate):
+ * Modules/webaudio/AudioParam.cpp:
+ (WebCore::AudioParam::setValue):
+ * Modules/webaudio/AudioParamTimeline.cpp:
+ (WebCore::isValidNumber):
+ * Modules/webaudio/PannerNode.cpp:
+ (WebCore::fixNANs):
+ * bindings/js/IDBBindingUtilities.cpp:
+ (WebCore::createIDBKeyFromValue):
+ * bindings/js/JSDataViewCustom.cpp:
+ (WebCore::getDataViewMember):
+ * bindings/js/JSGeolocationCustom.cpp:
+ (WebCore::setTimeout):
+ (WebCore::setMaximumAge):
+ * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
+ (WebCore::JSHTMLOptionsCollection::setLength):
+ * bindings/js/JSWebKitPointCustom.cpp:
+ (WebCore::JSWebKitPointConstructor::constructJSWebKitPoint):
+ * bindings/scripts/CodeGeneratorJS.pm:
+ (GenerateImplementation):
+ (GenerateParametersCheck):
+ * bindings/scripts/CodeGeneratorV8.pm:
+ (GenerateParametersCheck):
+ * bindings/scripts/test/JS/JSFloat64Array.cpp:
+ (WebCore::JSFloat64Array::getByIndex):
+ * bindings/scripts/test/JS/JSTestObj.cpp:
+ (WebCore::jsTestObjPrototypeFunctionClassMethodWithClamp):
+ * bindings/scripts/test/V8/V8TestObj.cpp:
+ (WebCore::TestObjV8Internal::classMethodWithClampCallback):
+ * bindings/v8/IDBBindingUtilities.cpp:
+ (WebCore::createIDBKeyFromValue):
+ * bindings/v8/V8Binding.cpp:
+ (WebCore::toInt32):
+ (WebCore::toUInt32):
+ * bindings/v8/custom/V8GeolocationCustom.cpp:
+ (WebCore::createPositionOptions):
+ * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
+ (WebCore::V8HTMLOptionsCollection::lengthAccessorSetter):
+ * bindings/v8/custom/V8WebKitPointCustom.cpp:
+ (WebCore::V8WebKitPoint::constructorCallbackCustom):
+ * bridge/qt/qt_runtime.cpp:
+ (JSC::Bindings::convertValueToQVariant):
+ * css/WebKitCSSMatrix.cpp:
+ (WebCore::WebKitCSSMatrix::translate):
+ (WebCore::WebKitCSSMatrix::scale):
+ (WebCore::WebKitCSSMatrix::rotate):
+ (WebCore::WebKitCSSMatrix::rotateAxisAngle):
+ (WebCore::WebKitCSSMatrix::skewX):
+ (WebCore::WebKitCSSMatrix::skewY):
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::percentLoaded):
+ (WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
+ (WebCore::HTMLMediaElement::endedPlayback):
+ * html/MediaController.cpp:
+ (MediaController::duration):
+ * html/canvas/WebGLRenderingContext.cpp:
+ (WebCore):
+ (WebCore::WebGLRenderingContext::clearColor):
+ * html/track/TextTrack.cpp:
+ (WebCore::TextTrack::addCue):
+ * html/track/TextTrackCue.cpp:
+ (WebCore::TextTrackCue::setStartTime):
+ (WebCore::TextTrackCue::setEndTime):
+ * page/DOMWindow.cpp:
+ (WebCore::DOMWindow::adjustWindowRect):
+ * page/WindowFeatures.cpp:
+ (WebCore::WindowFeatures::floatFeature): Also include an opportunistic style fix.
+ * platform/CalculationValue.cpp:
+ (WebCore::CalculationValue::evaluate):
+ * platform/Decimal.cpp:
+ (WebCore::Decimal::fromDouble):
+ * platform/Length.cpp:
+ (WebCore::Length::nonNanCalculatedValue):
+ * platform/audio/AudioResampler.cpp:
+ (WebCore::AudioResampler::setRate):
+ * platform/audio/DynamicsCompressorKernel.cpp:
+ (WebCore::DynamicsCompressorKernel::process):
+ * platform/audio/Reverb.cpp:
+ (WebCore::calculateNormalizationScale):
+ * platform/graphics/Font.cpp:
+ (WebCore::Font::width):
+ * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
+ (WebCore::MediaPlayerPrivateAVFoundation::isLiveStream):
+ * platform/graphics/gpu/LoopBlinnMathUtils.cpp:
+ (LoopBlinnMathUtils):
+ * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::MediaPlayerPrivateGStreamer::buffered):
+ (WebCore::MediaPlayerPrivateGStreamer::maxTimeSeekable):
+ * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
+ (WebCore::MediaPlayerPrivateQTKit::maxTimeSeekable):
+ * platform/graphics/opentype/OpenTypeVerticalData.cpp:
+ (WebCore::OpenTypeVerticalData::getVerticalTranslationsForGlyphs):
+ * platform/graphics/transforms/TransformationMatrix.cpp:
+ (WebCore::clampEdgeValue):
+ (WebCore::TransformationMatrix::clampedBoundsOfProjectedQuad):
+ * platform/network/ResourceResponseBase.cpp:
+ (WebCore::ResourceResponseBase::parseCacheControlDirectives):
+ * rendering/RenderMediaControlsChromium.cpp:
+ (WebCore::paintMediaSlider):
+ (WebCore::paintMediaVolumeSlider):
+ * rendering/RenderThemeMac.mm:
+ (WebCore::RenderThemeMac::paintMediaSliderTrack):
+ * svg/SVGAnimationElement.cpp:
+ (WebCore::SVGAnimationElement::beginElementAt):
+ (WebCore::SVGAnimationElement::endElementAt):
+ * svg/SVGSVGElement.cpp:
+ (WebCore::SVGSVGElement::setCurrentTime):
+ * svg/animation/SMILTime.h:
+ (WebCore::SMILTime::SMILTime):
+ * svg/animation/SVGSMILElement.cpp:
+ (WebCore::SVGSMILElement::addBeginTime):
+ (WebCore::SVGSMILElement::addEndTime):
+ * xml/XPathFunctions.cpp:
+ (WebCore::XPath::FunSubstring::evaluate):
+ (WebCore::XPath::FunRound::round):
+ * xml/XPathValue.cpp:
+ (WebCore::XPath::Value::toBoolean): Also include an opportunistic style fix.
+ (WebCore::XPath::Value::toString):
+
2013-02-13 Eric Carlson <eric.carlson@apple.com>
[Mac] Caption menu should have only one item selected
diff --git a/Source/WebCore/Modules/mediasource/MediaSource.cpp b/Source/WebCore/Modules/mediasource/MediaSource.cpp
index e8ea781..fd64295 100644
--- a/Source/WebCore/Modules/mediasource/MediaSource.cpp
+++ b/Source/WebCore/Modules/mediasource/MediaSource.cpp
@@ -93,7 +93,7 @@
void MediaSource::setDuration(double duration, ExceptionCode& ec)
{
- if (duration < 0.0 || isnan(duration)) {
+ if (duration < 0.0 || std::isnan(duration)) {
ec = INVALID_ACCESS_ERR;
return;
}
diff --git a/Source/WebCore/Modules/webaudio/AudioBufferSourceNode.cpp b/Source/WebCore/Modules/webaudio/AudioBufferSourceNode.cpp
index 45b257b..78014b9 100644
--- a/Source/WebCore/Modules/webaudio/AudioBufferSourceNode.cpp
+++ b/Source/WebCore/Modules/webaudio/AudioBufferSourceNode.cpp
@@ -445,7 +445,7 @@
totalRate = 1; // zero rate is considered illegal
totalRate = min(MaxRate, totalRate);
- bool isTotalRateValid = !isnan(totalRate) && !isinf(totalRate);
+ bool isTotalRateValid = !std::isnan(totalRate) && !std::isinf(totalRate);
ASSERT(isTotalRateValid);
if (!isTotalRateValid)
totalRate = 1.0;
diff --git a/Source/WebCore/Modules/webaudio/AudioParam.cpp b/Source/WebCore/Modules/webaudio/AudioParam.cpp
index f4cf11d..de337bb 100644
--- a/Source/WebCore/Modules/webaudio/AudioParam.cpp
+++ b/Source/WebCore/Modules/webaudio/AudioParam.cpp
@@ -58,7 +58,7 @@
{
// Check against JavaScript giving us bogus floating-point values.
// Don't ASSERT, since this can happen if somebody writes bad JS.
- if (!isnan(value) && !isinf(value))
+ if (!std::isnan(value) && !std::isinf(value))
m_value = value;
}
diff --git a/Source/WebCore/Modules/webaudio/AudioParamTimeline.cpp b/Source/WebCore/Modules/webaudio/AudioParamTimeline.cpp
index fef8d0e..a63683a 100644
--- a/Source/WebCore/Modules/webaudio/AudioParamTimeline.cpp
+++ b/Source/WebCore/Modules/webaudio/AudioParamTimeline.cpp
@@ -65,7 +65,7 @@
static bool isValidNumber(float x)
{
- return !isnan(x) && !isinf(x);
+ return !std::isnan(x) && !std::isinf(x);
}
void AudioParamTimeline::insertEvent(const ParamEvent& event)
diff --git a/Source/WebCore/Modules/webaudio/PannerNode.cpp b/Source/WebCore/Modules/webaudio/PannerNode.cpp
index c970cb0..b577c4a 100644
--- a/Source/WebCore/Modules/webaudio/PannerNode.cpp
+++ b/Source/WebCore/Modules/webaudio/PannerNode.cpp
@@ -44,7 +44,7 @@
static void fixNANs(double &x)
{
- if (isnan(x) || isinf(x))
+ if (std::isnan(x) || std::isinf(x))
x = 0.0;
}
diff --git a/Source/WebCore/bindings/js/IDBBindingUtilities.cpp b/Source/WebCore/bindings/js/IDBBindingUtilities.cpp
index af13a5a..7abe802 100644
--- a/Source/WebCore/bindings/js/IDBBindingUtilities.cpp
+++ b/Source/WebCore/bindings/js/IDBBindingUtilities.cpp
@@ -110,11 +110,11 @@
static PassRefPtr<IDBKey> createIDBKeyFromValue(ExecState* exec, JSValue value, Vector<JSArray*>& stack)
{
- if (value.isNumber() && !isnan(value.toNumber(exec)))
+ if (value.isNumber() && !std::isnan(value.toNumber(exec)))
return IDBKey::createNumber(value.toNumber(exec));
if (value.isString())
return IDBKey::createString(value.toString(exec)->value(exec));
- if (value.inherits(&DateInstance::s_info) && !isnan(valueToDate(exec, value)))
+ if (value.inherits(&DateInstance::s_info) && !std::isnan(valueToDate(exec, value)))
return IDBKey::createDate(valueToDate(exec, value));
if (value.isObject()) {
JSObject* object = asObject(value);
diff --git a/Source/WebCore/bindings/js/JSDataViewCustom.cpp b/Source/WebCore/bindings/js/JSDataViewCustom.cpp
index 3eb7a3e..604cb10 100644
--- a/Source/WebCore/bindings/js/JSDataViewCustom.cpp
+++ b/Source/WebCore/bindings/js/JSDataViewCustom.cpp
@@ -89,7 +89,7 @@
case AccessDataViewMemberAsFloat32:
case AccessDataViewMemberAsFloat64: {
double value = (type == AccessDataViewMemberAsFloat32) ? imp->getFloat32(byteOffset, littleEndian, ec) : imp->getFloat64(byteOffset, littleEndian, ec);
- result = isnan(value) ? jsNaN() : jsNumber(value);
+ result = std::isnan(value) ? jsNaN() : jsNumber(value);
break;
} default:
ASSERT_NOT_REACHED();
diff --git a/Source/WebCore/bindings/js/JSGeolocationCustom.cpp b/Source/WebCore/bindings/js/JSGeolocationCustom.cpp
index f1599a4..cb00744 100644
--- a/Source/WebCore/bindings/js/JSGeolocationCustom.cpp
+++ b/Source/WebCore/bindings/js/JSGeolocationCustom.cpp
@@ -52,7 +52,7 @@
static void setTimeout(PositionOptions* options, const double& timeout)
{
// If the value is positive infinity, there's nothing to do.
- if (!(isinf(timeout) && (timeout > 0))) {
+ if (!(std::isinf(timeout) && (timeout > 0))) {
// Wrap to int32 and force non-negative to match behavior of window.setTimeout.
options->setTimeout(max(0, static_cast<int>(timeout)));
}
@@ -60,7 +60,7 @@
static void setMaximumAge(PositionOptions* options, const double& maximumAge)
{
- if (isinf(maximumAge) && (maximumAge > 0)) {
+ if (std::isinf(maximumAge) && (maximumAge > 0)) {
// If the value is positive infinity, clear maximumAge.
options->clearMaximumAge();
} else {
diff --git a/Source/WebCore/bindings/js/JSHTMLOptionsCollectionCustom.cpp b/Source/WebCore/bindings/js/JSHTMLOptionsCollectionCustom.cpp
index e74d097..4b7c241 100644
--- a/Source/WebCore/bindings/js/JSHTMLOptionsCollectionCustom.cpp
+++ b/Source/WebCore/bindings/js/JSHTMLOptionsCollectionCustom.cpp
@@ -74,7 +74,7 @@
ExceptionCode ec = 0;
unsigned newLength = 0;
double lengthValue = value.toNumber(exec);
- if (!isnan(lengthValue) && !isinf(lengthValue)) {
+ if (!std::isnan(lengthValue) && !std::isinf(lengthValue)) {
if (lengthValue < 0.0)
ec = INDEX_SIZE_ERR;
else if (lengthValue > static_cast<double>(UINT_MAX))
diff --git a/Source/WebCore/bindings/js/JSWebKitPointCustom.cpp b/Source/WebCore/bindings/js/JSWebKitPointCustom.cpp
index aa14e65..7ef1291 100644
--- a/Source/WebCore/bindings/js/JSWebKitPointCustom.cpp
+++ b/Source/WebCore/bindings/js/JSWebKitPointCustom.cpp
@@ -41,9 +41,9 @@
if (exec->argumentCount() >= 2) {
x = static_cast<float>(exec->argument(0).toNumber(exec));
y = static_cast<float>(exec->argument(1).toNumber(exec));
- if (isnan(x))
+ if (std::isnan(x))
x = 0;
- if (isnan(y))
+ if (std::isnan(y))
y = 0;
}
return JSValue::encode(asObject(toJS(exec, jsConstructor->globalObject(), WebKitPoint::create(x, y))));
diff --git a/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm b/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
index a94c88c..5ca3169 100644
--- a/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
+++ b/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
@@ -2437,7 +2437,7 @@
push(@implContent, " ASSERT_GC_OBJECT_INHERITS(this, &s_info);\n");
push(@implContent, " double result = static_cast<$interfaceName*>(impl())->item(index);\n");
# jsNumber conversion doesn't suppress signalling NaNs, so enforce that here.
- push(@implContent, " if (isnan(result))\n");
+ push(@implContent, " if (std::isnan(result))\n");
push(@implContent, " return jsNaN();\n");
push(@implContent, " return JSValue(result);\n");
push(@implContent, "}\n\n");
@@ -2712,7 +2712,7 @@
push(@$outputArray, " double $nativeValue = exec->argument($argsIndex).toNumber(exec);\n");
push(@$outputArray, " if (exec->hadException())\n");
push(@$outputArray, " return JSValue::encode(jsUndefined());\n\n");
- push(@$outputArray, " if (!isnan($nativeValue))\n");
+ push(@$outputArray, " if (!std::isnan($nativeValue))\n");
push(@$outputArray, " $name = clampTo<$argType>($nativeValue);\n\n");
} elsif ($parameter->isVariadic) {
my $nativeElementType;
diff --git a/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm b/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm
index 187f0f1..97f711e 100644
--- a/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm
+++ b/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm
@@ -1749,7 +1749,7 @@
my $paramType = $parameter->type;
$parameterCheckString .= " $paramType $parameterName = 0;\n";
$parameterCheckString .= " V8TRYCATCH(double, $nativeValue, args[$paramIndex]->NumberValue());\n";
- $parameterCheckString .= " if (!isnan($nativeValue))\n";
+ $parameterCheckString .= " if (!std::isnan($nativeValue))\n";
$parameterCheckString .= " $parameterName = clampTo<$paramType>($nativeValue);\n";
} elsif ($parameter->type eq "SerializedScriptValue") {
AddToImplIncludes("SerializedScriptValue.h");
diff --git a/Source/WebCore/bindings/scripts/test/JS/JSFloat64Array.cpp b/Source/WebCore/bindings/scripts/test/JS/JSFloat64Array.cpp
index 5398484..5591c31 100644
--- a/Source/WebCore/bindings/scripts/test/JS/JSFloat64Array.cpp
+++ b/Source/WebCore/bindings/scripts/test/JS/JSFloat64Array.cpp
@@ -282,7 +282,7 @@
{
ASSERT_GC_OBJECT_INHERITS(this, &s_info);
double result = static_cast<Float64Array*>(impl())->item(index);
- if (isnan(result))
+ if (std::isnan(result))
return jsNaN();
return JSValue(result);
}
diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
index 0082b85..fdf0c3e 100644
--- a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
@@ -2400,7 +2400,7 @@
if (exec->hadException())
return JSValue::encode(jsUndefined());
- if (!isnan(objArgsShortNativeValue))
+ if (!std::isnan(objArgsShortNativeValue))
objArgsShort = clampTo<unsigned short>(objArgsShortNativeValue);
unsigned long objArgsLong = 0;
@@ -2408,7 +2408,7 @@
if (exec->hadException())
return JSValue::encode(jsUndefined());
- if (!isnan(objArgsLongNativeValue))
+ if (!std::isnan(objArgsLongNativeValue))
objArgsLong = clampTo<unsigned long>(objArgsLongNativeValue);
impl->classMethodWithClamp(objArgsShort, objArgsLong);
diff --git a/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp b/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp
index adc7098..9a23ce5 100644
--- a/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp
+++ b/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp
@@ -1637,11 +1637,11 @@
TestObj* imp = V8TestObj::toNative(args.Holder());
unsigned short objArgsShort = 0;
V8TRYCATCH(double, objArgsShortNativeValue, args[0]->NumberValue());
- if (!isnan(objArgsShortNativeValue))
+ if (!std::isnan(objArgsShortNativeValue))
objArgsShort = clampTo<unsigned short>(objArgsShortNativeValue);
unsigned long objArgsLong = 0;
V8TRYCATCH(double, objArgsLongNativeValue, args[1]->NumberValue());
- if (!isnan(objArgsLongNativeValue))
+ if (!std::isnan(objArgsLongNativeValue))
objArgsLong = clampTo<unsigned long>(objArgsLongNativeValue);
imp->classMethodWithClamp(objArgsShort, objArgsLong);
return v8Undefined();
diff --git a/Source/WebCore/bindings/v8/IDBBindingUtilities.cpp b/Source/WebCore/bindings/v8/IDBBindingUtilities.cpp
index 82374d1..a5c1a62 100644
--- a/Source/WebCore/bindings/v8/IDBBindingUtilities.cpp
+++ b/Source/WebCore/bindings/v8/IDBBindingUtilities.cpp
@@ -75,11 +75,11 @@
static PassRefPtr<IDBKey> createIDBKeyFromValue(v8::Handle<v8::Value> value, Vector<v8::Handle<v8::Array> >& stack)
{
- if (value->IsNumber() && !isnan(value->NumberValue()))
+ if (value->IsNumber() && !std::isnan(value->NumberValue()))
return IDBKey::createNumber(value->NumberValue());
if (value->IsString())
return IDBKey::createString(toWebCoreString(value));
- if (value->IsDate() && !isnan(value->NumberValue()))
+ if (value->IsDate() && !std::isnan(value->NumberValue()))
return IDBKey::createDate(value->NumberValue());
if (value->IsArray()) {
v8::Handle<v8::Array> array = v8::Handle<v8::Array>::Cast(value);
diff --git a/Source/WebCore/bindings/v8/V8Binding.cpp b/Source/WebCore/bindings/v8/V8Binding.cpp
index de7c182..863f4fd 100644
--- a/Source/WebCore/bindings/v8/V8Binding.cpp
+++ b/Source/WebCore/bindings/v8/V8Binding.cpp
@@ -120,7 +120,7 @@
// Does the value convert to nan or to an infinity?
double numberValue = numberObject->Value();
- if (isnan(numberValue) || isinf(numberValue)) {
+ if (std::isnan(numberValue) || std::isinf(numberValue)) {
ok = false;
return 0;
}
@@ -159,7 +159,7 @@
// Does the value convert to nan or to an infinity?
double numberValue = numberObject->Value();
- if (isnan(numberValue) || isinf(numberValue)) {
+ if (std::isnan(numberValue) || std::isinf(numberValue)) {
ok = false;
return 0;
}
diff --git a/Source/WebCore/bindings/v8/custom/V8GeolocationCustom.cpp b/Source/WebCore/bindings/v8/custom/V8GeolocationCustom.cpp
index 8c51be1..f5cee32 100644
--- a/Source/WebCore/bindings/v8/custom/V8GeolocationCustom.cpp
+++ b/Source/WebCore/bindings/v8/custom/V8GeolocationCustom.cpp
@@ -88,7 +88,7 @@
}
double timeoutDouble = timeoutNumber->Value();
// If the value is positive infinity, there's nothing to do.
- if (!(isinf(timeoutDouble) && timeoutDouble > 0)) {
+ if (!(std::isinf(timeoutDouble) && timeoutDouble > 0)) {
v8::Local<v8::Int32> timeoutInt32 = timeoutValue->ToInt32();
if (timeoutInt32.IsEmpty()) {
succeeded = false;
@@ -111,7 +111,7 @@
return 0;
}
double maximumAgeDouble = maximumAgeNumber->Value();
- if (isinf(maximumAgeDouble) && maximumAgeDouble > 0) {
+ if (std::isinf(maximumAgeDouble) && maximumAgeDouble > 0) {
// If the value is positive infinity, clear maximumAge.
options->clearMaximumAge();
} else {
diff --git a/Source/WebCore/bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp b/Source/WebCore/bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp
index 4154ae4..abc9f96 100644
--- a/Source/WebCore/bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp
+++ b/Source/WebCore/bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp
@@ -120,7 +120,7 @@
double v = value->NumberValue();
unsigned newLength = 0;
ExceptionCode ec = 0;
- if (!isnan(v) && !isinf(v)) {
+ if (!std::isnan(v) && !std::isinf(v)) {
if (v < 0.0)
ec = INDEX_SIZE_ERR;
else if (v > static_cast<double>(UINT_MAX))
diff --git a/Source/WebCore/bindings/v8/custom/V8WebKitPointCustom.cpp b/Source/WebCore/bindings/v8/custom/V8WebKitPointCustom.cpp
index decf76c..f715cda 100644
--- a/Source/WebCore/bindings/v8/custom/V8WebKitPointCustom.cpp
+++ b/Source/WebCore/bindings/v8/custom/V8WebKitPointCustom.cpp
@@ -46,12 +46,12 @@
if (args.Length() > 1) {
if (!args[0]->IsUndefined()) {
x = toFloat(args[0]);
- if (isnan(x))
+ if (std::isnan(x))
x = 0;
}
if (!args[1]->IsUndefined()) {
y = toFloat(args[1]);
- if (isnan(y))
+ if (std::isnan(y))
y = 0;
}
}
diff --git a/Source/WebCore/bridge/qt/qt_runtime.cpp b/Source/WebCore/bridge/qt/qt_runtime.cpp
index 18ecd20..fbe777b 100644
--- a/Source/WebCore/bridge/qt/qt_runtime.cpp
+++ b/Source/WebCore/bridge/qt/qt_runtime.cpp
@@ -322,7 +322,7 @@
// check magic pointer values before dereferencing value
if (JSValueIsNumber(context, value)
- && isnan(JSValueToNumber(context, value, exception))) {
+ && std::isnan(JSValueToNumber(context, value, exception))) {
if (distance)
*distance = -1;
return QVariant();
diff --git a/Source/WebCore/css/WebKitCSSMatrix.cpp b/Source/WebCore/css/WebKitCSSMatrix.cpp
index 92bfce3..5188b66 100644
--- a/Source/WebCore/css/WebKitCSSMatrix.cpp
+++ b/Source/WebCore/css/WebKitCSSMatrix.cpp
@@ -108,53 +108,53 @@
PassRefPtr<WebKitCSSMatrix> WebKitCSSMatrix::translate(double x, double y, double z) const
{
- if (isnan(x))
+ if (std::isnan(x))
x = 0;
- if (isnan(y))
+ if (std::isnan(y))
y = 0;
- if (isnan(z))
+ if (std::isnan(z))
z = 0;
return WebKitCSSMatrix::create(TransformationMatrix(m_matrix).translate3d(x, y, z));
}
PassRefPtr<WebKitCSSMatrix> WebKitCSSMatrix::scale(double scaleX, double scaleY, double scaleZ) const
{
- if (isnan(scaleX))
+ if (std::isnan(scaleX))
scaleX = 1;
- if (isnan(scaleY))
+ if (std::isnan(scaleY))
scaleY = scaleX;
- if (isnan(scaleZ))
+ if (std::isnan(scaleZ))
scaleZ = 1;
return WebKitCSSMatrix::create(TransformationMatrix(m_matrix).scale3d(scaleX, scaleY, scaleZ));
}
PassRefPtr<WebKitCSSMatrix> WebKitCSSMatrix::rotate(double rotX, double rotY, double rotZ) const
{
- if (isnan(rotX))
+ if (std::isnan(rotX))
rotX = 0;
- if (isnan(rotY) && isnan(rotZ)) {
+ if (std::isnan(rotY) && std::isnan(rotZ)) {
rotZ = rotX;
rotX = 0;
rotY = 0;
}
- if (isnan(rotY))
+ if (std::isnan(rotY))
rotY = 0;
- if (isnan(rotZ))
+ if (std::isnan(rotZ))
rotZ = 0;
return WebKitCSSMatrix::create(TransformationMatrix(m_matrix).rotate3d(rotX, rotY, rotZ));
}
PassRefPtr<WebKitCSSMatrix> WebKitCSSMatrix::rotateAxisAngle(double x, double y, double z, double angle) const
{
- if (isnan(x))
+ if (std::isnan(x))
x = 0;
- if (isnan(y))
+ if (std::isnan(y))
y = 0;
- if (isnan(z))
+ if (std::isnan(z))
z = 0;
- if (isnan(angle))
+ if (std::isnan(angle))
angle = 0;
if (x == 0 && y == 0 && z == 0)
z = 1;
@@ -163,14 +163,14 @@
PassRefPtr<WebKitCSSMatrix> WebKitCSSMatrix::skewX(double angle) const
{
- if (isnan(angle))
+ if (std::isnan(angle))
angle = 0;
return WebKitCSSMatrix::create(TransformationMatrix(m_matrix).skewX(angle));
}
PassRefPtr<WebKitCSSMatrix> WebKitCSSMatrix::skewY(double angle) const
{
- if (isnan(angle))
+ if (std::isnan(angle))
angle = 0;
return WebKitCSSMatrix::create(TransformationMatrix(m_matrix).skewY(angle));
}
diff --git a/Source/WebCore/html/HTMLMediaElement.cpp b/Source/WebCore/html/HTMLMediaElement.cpp
index 5f4a2cf..708f1bf 100644
--- a/Source/WebCore/html/HTMLMediaElement.cpp
+++ b/Source/WebCore/html/HTMLMediaElement.cpp
@@ -2783,7 +2783,7 @@
return 0;
float duration = m_player->duration();
- if (!duration || isinf(duration))
+ if (!duration || std::isinf(duration))
return 0;
float buffered = 0;
@@ -3414,7 +3414,7 @@
// When the current playback position reaches the end of the media resource when the direction of
// playback is forwards, then the user agent must follow these steps:
- if (!isnan(dur) && dur && now >= dur && m_playbackRate > 0) {
+ if (!std::isnan(dur) && dur && now >= dur && m_playbackRate > 0) {
// If the media element has a loop attribute specified and does not have a current media controller,
if (loop() && !m_mediaController) {
m_sentEndEvent = false;
@@ -3670,7 +3670,7 @@
bool HTMLMediaElement::endedPlayback() const
{
float dur = duration();
- if (!m_player || isnan(dur))
+ if (!m_player || std::isnan(dur))
return false;
// 4.8.10.8 Playing the media resource
diff --git a/Source/WebCore/html/MediaController.cpp b/Source/WebCore/html/MediaController.cpp
index 5bf4f49..103161b 100644
--- a/Source/WebCore/html/MediaController.cpp
+++ b/Source/WebCore/html/MediaController.cpp
@@ -136,7 +136,7 @@
float maxDuration = 0;
for (size_t index = 0; index < m_mediaElements.size(); ++index) {
float duration = m_mediaElements[index]->duration();
- if (isnan(duration))
+ if (std::isnan(duration))
continue;
maxDuration = max(maxDuration, duration);
}
diff --git a/Source/WebCore/html/canvas/WebGLRenderingContext.cpp b/Source/WebCore/html/canvas/WebGLRenderingContext.cpp
index 953e5db..d7a6c2d 100644
--- a/Source/WebCore/html/canvas/WebGLRenderingContext.cpp
+++ b/Source/WebCore/html/canvas/WebGLRenderingContext.cpp
@@ -1250,13 +1250,13 @@
{
if (isContextLost())
return;
- if (isnan(r))
+ if (std::isnan(r))
r = 0;
- if (isnan(g))
+ if (std::isnan(g))
g = 0;
- if (isnan(b))
+ if (std::isnan(b))
b = 0;
- if (isnan(a))
+ if (std::isnan(a))
a = 1;
m_clearColor[0] = r;
m_clearColor[1] = g;
diff --git a/Source/WebCore/html/track/TextTrack.cpp b/Source/WebCore/html/track/TextTrack.cpp
index 89c16d5..ed19561 100644
--- a/Source/WebCore/html/track/TextTrack.cpp
+++ b/Source/WebCore/html/track/TextTrack.cpp
@@ -224,7 +224,7 @@
RefPtr<TextTrackCue> cue = prpCue;
// TODO(93143): Add spec-compliant behavior for negative time values.
- if (isnan(cue->startTime()) || isnan(cue->endTime()) || cue->startTime() < 0 || cue->endTime() < 0)
+ if (std::isnan(cue->startTime()) || std::isnan(cue->endTime()) || cue->startTime() < 0 || cue->endTime() < 0)
return;
// 4.8.10.12.5 Text track API
diff --git a/Source/WebCore/html/track/TextTrackCue.cpp b/Source/WebCore/html/track/TextTrackCue.cpp
index f3b9353..22b0b7a 100644
--- a/Source/WebCore/html/track/TextTrackCue.cpp
+++ b/Source/WebCore/html/track/TextTrackCue.cpp
@@ -277,7 +277,7 @@
void TextTrackCue::setStartTime(double value, ExceptionCode& ec)
{
// NaN, Infinity and -Infinity values should trigger a TypeError.
- if (isinf(value) || isnan(value)) {
+ if (std::isinf(value) || std::isnan(value)) {
ec = TypeError;
return;
}
@@ -294,7 +294,7 @@
void TextTrackCue::setEndTime(double value, ExceptionCode& ec)
{
// NaN, Infinity and -Infinity values should trigger a TypeError.
- if (isinf(value) || isnan(value)) {
+ if (std::isinf(value) || std::isnan(value)) {
ec = TypeError;
return;
}
diff --git a/Source/WebCore/page/DOMWindow.cpp b/Source/WebCore/page/DOMWindow.cpp
index bcdf131..df53a15 100644
--- a/Source/WebCore/page/DOMWindow.cpp
+++ b/Source/WebCore/page/DOMWindow.cpp
@@ -331,13 +331,13 @@
ASSERT(isfinite(window.height()));
// Update window values if new requested values are not NaN.
- if (!isnan(pendingChanges.x()))
+ if (!std::isnan(pendingChanges.x()))
window.setX(pendingChanges.x());
- if (!isnan(pendingChanges.y()))
+ if (!std::isnan(pendingChanges.y()))
window.setY(pendingChanges.y());
- if (!isnan(pendingChanges.width()))
+ if (!std::isnan(pendingChanges.width()))
window.setWidth(pendingChanges.width());
- if (!isnan(pendingChanges.height()))
+ if (!std::isnan(pendingChanges.height()))
window.setHeight(pendingChanges.height());
FloatSize minimumSize = page->chrome()->client()->minimumWindowSize();
diff --git a/Source/WebCore/page/WindowFeatures.cpp b/Source/WebCore/page/WindowFeatures.cpp
index 7c1e861..d934201 100644
--- a/Source/WebCore/page/WindowFeatures.cpp
+++ b/Source/WebCore/page/WindowFeatures.cpp
@@ -224,7 +224,7 @@
// return the number 0 and false for ok. But "0q" should yield the minimum rather than the default.
bool ok;
double parsedNumber = it->value.toDouble(&ok);
- if ((parsedNumber == 0 && !ok) || isnan(parsedNumber))
+ if ((!parsedNumber && !ok) || std::isnan(parsedNumber))
return defaultValue;
if (parsedNumber < min || max <= min)
return min;
diff --git a/Source/WebCore/platform/CalculationValue.cpp b/Source/WebCore/platform/CalculationValue.cpp
index 57413fb..fe7571d 100644
--- a/Source/WebCore/platform/CalculationValue.cpp
+++ b/Source/WebCore/platform/CalculationValue.cpp
@@ -65,7 +65,7 @@
float result = m_value->evaluate(maxValue);
// FIXME calc https://webkit.org/b/80411 : result is NaN when there is a division
// by zero which isn't found at parse time.
- if (isnan(result))
+ if (std::isnan(result))
return 0;
return m_isNonNegative && result < 0 ? 0 : result;
}
diff --git a/Source/WebCore/platform/Decimal.cpp b/Source/WebCore/platform/Decimal.cpp
index 8abaab6..0b73e30 100644
--- a/Source/WebCore/platform/Decimal.cpp
+++ b/Source/WebCore/platform/Decimal.cpp
@@ -683,7 +683,7 @@
if (isfinite(doubleValue))
return fromString(String::numberToStringECMAScript(doubleValue));
- if (isinf(doubleValue))
+ if (std::isinf(doubleValue))
return infinity(doubleValue < 0 ? Negative : Positive);
return nan();
diff --git a/Source/WebCore/platform/Length.cpp b/Source/WebCore/platform/Length.cpp
index a5a3558..b53f8fa 100644
--- a/Source/WebCore/platform/Length.cpp
+++ b/Source/WebCore/platform/Length.cpp
@@ -240,7 +240,7 @@
{
ASSERT(isCalculated());
float result = calculationValue()->evaluate(maxValue);
- if (isnan(result))
+ if (std::isnan(result))
return 0;
return result;
}
diff --git a/Source/WebCore/platform/audio/AudioResampler.cpp b/Source/WebCore/platform/audio/AudioResampler.cpp
index 1a9f81e..a602c78 100644
--- a/Source/WebCore/platform/audio/AudioResampler.cpp
+++ b/Source/WebCore/platform/audio/AudioResampler.cpp
@@ -110,7 +110,7 @@
void AudioResampler::setRate(double rate)
{
- if (isnan(rate) || isinf(rate) || rate <= 0.0)
+ if (std::isnan(rate) || std::isinf(rate) || rate <= 0.0)
return;
m_rate = min(AudioResampler::MaxRate, rate);
diff --git a/Source/WebCore/platform/audio/DynamicsCompressorKernel.cpp b/Source/WebCore/platform/audio/DynamicsCompressorKernel.cpp
index 9d4e30c..4abe8e7 100644
--- a/Source/WebCore/platform/audio/DynamicsCompressorKernel.cpp
+++ b/Source/WebCore/platform/audio/DynamicsCompressorKernel.cpp
@@ -286,9 +286,9 @@
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Fix gremlins.
- if (isnan(m_detectorAverage))
+ if (std::isnan(m_detectorAverage))
m_detectorAverage = 1;
- if (isinf(m_detectorAverage))
+ if (std::isinf(m_detectorAverage))
m_detectorAverage = 1;
float desiredGain = m_detectorAverage;
@@ -314,9 +314,9 @@
m_maxAttackCompressionDiffDb = -1;
// Fix gremlins.
- if (isnan(compressionDiffDb))
+ if (std::isnan(compressionDiffDb))
compressionDiffDb = -1;
- if (isinf(compressionDiffDb))
+ if (std::isinf(compressionDiffDb))
compressionDiffDb = -1;
// Adaptive release - higher compression (lower compressionDiffDb) releases faster.
@@ -342,9 +342,9 @@
// Attack mode - compressionDiffDb should be positive dB
// Fix gremlins.
- if (isnan(compressionDiffDb))
+ if (std::isnan(compressionDiffDb))
compressionDiffDb = 1;
- if (isinf(compressionDiffDb))
+ if (std::isinf(compressionDiffDb))
compressionDiffDb = 1;
// As long as we're still in attack mode, use a rate based off
@@ -410,9 +410,9 @@
detectorAverage = min(1.0f, detectorAverage);
// Fix gremlins.
- if (isnan(detectorAverage))
+ if (std::isnan(detectorAverage))
detectorAverage = 1;
- if (isinf(detectorAverage))
+ if (std::isinf(detectorAverage))
detectorAverage = 1;
// Exponential approach to desired gain.
diff --git a/Source/WebCore/platform/audio/Reverb.cpp b/Source/WebCore/platform/audio/Reverb.cpp
index ca7317d..4281136 100644
--- a/Source/WebCore/platform/audio/Reverb.cpp
+++ b/Source/WebCore/platform/audio/Reverb.cpp
@@ -73,7 +73,7 @@
power = sqrt(power / (numberOfChannels * length));
// Protect against accidental overload
- if (isinf(power) || isnan(power) || power < MinPower)
+ if (std::isinf(power) || std::isnan(power) || power < MinPower)
power = MinPower;
float scale = 1 / power;
diff --git a/Source/WebCore/platform/graphics/Font.cpp b/Source/WebCore/platform/graphics/Font.cpp
index 7b73e2c..7637a8e 100644
--- a/Source/WebCore/platform/graphics/Font.cpp
+++ b/Source/WebCore/platform/graphics/Font.cpp
@@ -211,7 +211,7 @@
bool hasKerningOrLigatures = typesettingFeatures() & (Kerning | Ligatures);
bool hasWordSpacingOrLetterSpacing = wordSpacing() | letterSpacing();
float* cacheEntry = m_fontFallbackList->widthCache().add(run, std::numeric_limits<float>::quiet_NaN(), hasKerningOrLigatures, hasWordSpacingOrLetterSpacing, glyphOverflow);
- if (cacheEntry && !isnan(*cacheEntry))
+ if (cacheEntry && !std::isnan(*cacheEntry))
return *cacheEntry;
float result;
diff --git a/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h b/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h
index a6a9cfd..7bbaa51 100644
--- a/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h
+++ b/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h
@@ -240,7 +240,7 @@
void setDelayCallbacks(bool) const;
void setIgnoreLoadStateChanges(bool delay) { m_ignoreLoadStateChanges = delay; }
void setNaturalSize(IntSize);
- bool isLiveStream() const { return isinf(duration()); }
+ bool isLiveStream() const { return std::isinf(duration()); }
enum MediaRenderingMode { MediaRenderingNone, MediaRenderingToContext, MediaRenderingToLayer };
MediaRenderingMode currentRenderingMode() const;
diff --git a/Source/WebCore/platform/graphics/gpu/LoopBlinnMathUtils.cpp b/Source/WebCore/platform/graphics/gpu/LoopBlinnMathUtils.cpp
index baf1c96..32a54fb 100644
--- a/Source/WebCore/platform/graphics/gpu/LoopBlinnMathUtils.cpp
+++ b/Source/WebCore/platform/graphics/gpu/LoopBlinnMathUtils.cpp
@@ -336,7 +336,7 @@
if (!numerator || !denominator || numerator >= denominator)
return false;
float r = numerator / denominator;
- if (isnan(r))
+ if (std::isnan(r))
return false;
ASSERT(r >= 0 && r < 1);
if (!r) // catch underflow if numerator <<<< denominator
@@ -359,7 +359,7 @@
return safeUnitDivide(-c, b, roots[0]) ? 1 : 0;
float discriminant = b*b - 4*a*c;
- if (discriminant < 0 || isnan(discriminant)) // complex roots
+ if (discriminant < 0 || std::isnan(discriminant)) // complex roots
return 0;
discriminant = sqrtf(discriminant);
diff --git a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
index 9199c4f..2adfe74 100644
--- a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
+++ b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
@@ -587,7 +587,7 @@
#if GST_CHECK_VERSION(0, 10, 31)
float mediaDuration(duration());
- if (!mediaDuration || isinf(mediaDuration))
+ if (!mediaDuration || std::isinf(mediaDuration))
return timeRanges.release();
GstQuery* query = gst_query_new_buffering(GST_FORMAT_PERCENT);
@@ -805,7 +805,7 @@
LOG_MEDIA_MESSAGE("maxTimeSeekable");
// infinite duration means live stream
- if (isinf(duration()))
+ if (std::isinf(duration()))
return 0.0f;
return duration();
@@ -1278,15 +1278,15 @@
// Don't set m_mediaDurationKnown yet if the pipeline is not
// paused. This allows duration() query to fail at least once
// before playback starts and duration becomes known.
- if (!isinf(newDuration))
+ if (!std::isinf(newDuration))
m_mediaDuration = newDuration;
} else {
- m_mediaDurationKnown = !isinf(newDuration);
+ m_mediaDurationKnown = !std::isinf(newDuration);
if (m_mediaDurationKnown)
m_mediaDuration = newDuration;
}
- if (!isinf(newDuration))
+ if (!std::isinf(newDuration))
m_mediaDuration = newDuration;
}
diff --git a/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm b/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm
index 56e334a..e54648f 100644
--- a/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm
+++ b/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm
@@ -957,7 +957,7 @@
return 0;
// infinite duration means live stream
- if (isinf(duration()))
+ if (std::isinf(duration()))
return 0;
return wkQTMovieMaxTimeSeekable(m_qtMovie.get());
diff --git a/Source/WebCore/platform/graphics/opentype/OpenTypeVerticalData.cpp b/Source/WebCore/platform/graphics/opentype/OpenTypeVerticalData.cpp
index 67013b1..35ae71d 100644
--- a/Source/WebCore/platform/graphics/opentype/OpenTypeVerticalData.cpp
+++ b/Source/WebCore/platform/graphics/opentype/OpenTypeVerticalData.cpp
@@ -533,7 +533,7 @@
outXYArray[1] = -vertOriginYFUnit * sizePerUnit;
continue;
}
- if (isnan(defaultVertOriginY))
+ if (std::isnan(defaultVertOriginY))
defaultVertOriginY = -m_defaultVertOriginY * sizePerUnit;
outXYArray[1] = defaultVertOriginY;
continue;
diff --git a/Source/WebCore/platform/graphics/transforms/TransformationMatrix.cpp b/Source/WebCore/platform/graphics/transforms/TransformationMatrix.cpp
index bfbc355..bce6777 100644
--- a/Source/WebCore/platform/graphics/transforms/TransformationMatrix.cpp
+++ b/Source/WebCore/platform/graphics/transforms/TransformationMatrix.cpp
@@ -619,7 +619,7 @@
static float clampEdgeValue(float f)
{
- ASSERT(!isnan(f));
+ ASSERT(!std::isnan(f));
return min<float>(max<float>(f, -LayoutUnit::max() / 2), LayoutUnit::max() / 2);
}
@@ -631,13 +631,13 @@
float top = clampEdgeValue(floorf(mappedQuadBounds.y()));
float right;
- if (isinf(mappedQuadBounds.x()) && isinf(mappedQuadBounds.width()))
+ if (std::isinf(mappedQuadBounds.x()) && std::isinf(mappedQuadBounds.width()))
right = LayoutUnit::max() / 2;
else
right = clampEdgeValue(ceilf(mappedQuadBounds.maxX()));
float bottom;
- if (isinf(mappedQuadBounds.y()) && isinf(mappedQuadBounds.height()))
+ if (std::isinf(mappedQuadBounds.y()) && std::isinf(mappedQuadBounds.height()))
bottom = LayoutUnit::max() / 2;
else
bottom = clampEdgeValue(ceilf(mappedQuadBounds.maxY()));
diff --git a/Source/WebCore/platform/network/ResourceResponseBase.cpp b/Source/WebCore/platform/network/ResourceResponseBase.cpp
index f38345f..ae46906 100644
--- a/Source/WebCore/platform/network/ResourceResponseBase.cpp
+++ b/Source/WebCore/platform/network/ResourceResponseBase.cpp
@@ -341,7 +341,7 @@
else if (equalIgnoringCase(directives[i].first, mustRevalidateDirective))
m_cacheControlContainsMustRevalidate = true;
else if (equalIgnoringCase(directives[i].first, maxAgeDirective)) {
- if (!isnan(m_cacheControlMaxAge)) {
+ if (!std::isnan(m_cacheControlMaxAge)) {
// First max-age directive wins if there are multiple ones.
continue;
}
diff --git a/Source/WebCore/rendering/RenderMediaControlsChromium.cpp b/Source/WebCore/rendering/RenderMediaControlsChromium.cpp
index 0451fbd..d509c48 100644
--- a/Source/WebCore/rendering/RenderMediaControlsChromium.cpp
+++ b/Source/WebCore/rendering/RenderMediaControlsChromium.cpp
@@ -214,13 +214,13 @@
RefPtr<TimeRanges> bufferedTimeRanges = mediaElement->buffered();
float duration = mediaElement->duration();
float currentTime = mediaElement->currentTime();
- if (isnan(duration) || isinf(duration) || !duration || isnan(currentTime))
+ if (std::isnan(duration) || std::isinf(duration) || !duration || std::isnan(currentTime))
return true;
for (unsigned i = 0; i < bufferedTimeRanges->length(); ++i) {
float start = bufferedTimeRanges->start(i, ASSERT_NO_EXCEPTION);
float end = bufferedTimeRanges->end(i, ASSERT_NO_EXCEPTION);
- if (isnan(start) || isnan(end) || start > currentTime || end < currentTime)
+ if (std::isnan(start) || std::isnan(end) || start > currentTime || end < currentTime)
continue;
int startPosition = int(start * rect.width() / duration);
int currentPosition = int(currentTime * rect.width() / duration);
@@ -279,7 +279,7 @@
// Calculate volume position for white background rectangle.
float volume = mediaElement->volume();
- if (isnan(volume) || volume < 0)
+ if (std::isnan(volume) || volume < 0)
return true;
if (volume > 1)
volume = 1;
diff --git a/Source/WebCore/rendering/RenderThemeMac.mm b/Source/WebCore/rendering/RenderThemeMac.mm
index 151ac02..4db9bbb 100644
--- a/Source/WebCore/rendering/RenderThemeMac.mm
+++ b/Source/WebCore/rendering/RenderThemeMac.mm
@@ -238,7 +238,7 @@
float timeLoaded = timeRanges->length() ? timeRanges->end(0, IGNORE_EXCEPTION) : 0;
float currentTime = mediaElement->currentTime();
float duration = mediaElement->duration();
- if (isnan(duration))
+ if (std::isnan(duration))
duration = 0;
ContextContainer cgContextContainer(paintInfo.context);
diff --git a/Source/WebCore/svg/SVGAnimationElement.cpp b/Source/WebCore/svg/SVGAnimationElement.cpp
index 5b814e3..39fe808 100644
--- a/Source/WebCore/svg/SVGAnimationElement.cpp
+++ b/Source/WebCore/svg/SVGAnimationElement.cpp
@@ -259,7 +259,7 @@
void SVGAnimationElement::beginElementAt(float offset)
{
- if (isnan(offset))
+ if (std::isnan(offset))
return;
SMILTime elapsed = this->elapsed();
addBeginTime(elapsed, elapsed + offset, SMILTimeWithOrigin::ScriptOrigin);
@@ -272,7 +272,7 @@
void SVGAnimationElement::endElementAt(float offset)
{
- if (isnan(offset))
+ if (std::isnan(offset))
return;
SMILTime elapsed = this->elapsed();
addEndTime(elapsed, elapsed + offset, SMILTimeWithOrigin::ScriptOrigin);
diff --git a/Source/WebCore/svg/SVGSVGElement.cpp b/Source/WebCore/svg/SVGSVGElement.cpp
index b6848c4..7aecde3 100644
--- a/Source/WebCore/svg/SVGSVGElement.cpp
+++ b/Source/WebCore/svg/SVGSVGElement.cpp
@@ -544,7 +544,7 @@
void SVGSVGElement::setCurrentTime(float seconds)
{
- if (isnan(seconds))
+ if (std::isnan(seconds))
return;
seconds = max(seconds, 0.0f);
m_timeContainer->setElapsed(seconds);
diff --git a/Source/WebCore/svg/animation/SMILTime.h b/Source/WebCore/svg/animation/SMILTime.h
index dbc2d1f..4e7f5e2 100644
--- a/Source/WebCore/svg/animation/SMILTime.h
+++ b/Source/WebCore/svg/animation/SMILTime.h
@@ -36,7 +36,7 @@
class SMILTime {
public:
SMILTime() : m_time(0) { }
- SMILTime(double time) : m_time(time) { ASSERT(!isnan(time)); }
+ SMILTime(double time) : m_time(time) { ASSERT(!std::isnan(time)); }
SMILTime(const SMILTime& o) : m_time(o.m_time) { }
static SMILTime unresolved() { return unresolvedValue; }
diff --git a/Source/WebCore/svg/animation/SVGSMILElement.cpp b/Source/WebCore/svg/animation/SVGSMILElement.cpp
index ba3f873..eccc0f5 100644
--- a/Source/WebCore/svg/animation/SVGSMILElement.cpp
+++ b/Source/WebCore/svg/animation/SVGSMILElement.cpp
@@ -713,7 +713,7 @@
void SVGSMILElement::addBeginTime(SMILTime eventTime, SMILTime beginTime, SMILTimeWithOrigin::Origin origin)
{
- ASSERT(!isnan(beginTime.value()));
+ ASSERT(!std::isnan(beginTime.value()));
m_beginTimes.append(SMILTimeWithOrigin(beginTime, origin));
sortTimeList(m_beginTimes);
beginListChanged(eventTime);
@@ -721,7 +721,7 @@
void SVGSMILElement::addEndTime(SMILTime eventTime, SMILTime endTime, SMILTimeWithOrigin::Origin origin)
{
- ASSERT(!isnan(endTime.value()));
+ ASSERT(!std::isnan(endTime.value()));
m_endTimes.append(SMILTimeWithOrigin(endTime, origin));
sortTimeList(m_endTimes);
endListChanged(eventTime);
diff --git a/Source/WebCore/xml/XPathFunctions.cpp b/Source/WebCore/xml/XPathFunctions.cpp
index 8b7eb72..9cbcff7 100644
--- a/Source/WebCore/xml/XPathFunctions.cpp
+++ b/Source/WebCore/xml/XPathFunctions.cpp
@@ -500,14 +500,14 @@
{
String s = arg(0)->evaluate().toString();
double doublePos = arg(1)->evaluate().toNumber();
- if (isnan(doublePos))
+ if (std::isnan(doublePos))
return "";
long pos = static_cast<long>(FunRound::round(doublePos));
bool haveLength = argCount() == 3;
long len = -1;
if (haveLength) {
double doubleLen = arg(2)->evaluate().toNumber();
- if (isnan(doubleLen))
+ if (std::isnan(doubleLen))
return "";
len = static_cast<long>(FunRound::round(doubleLen));
}
@@ -656,7 +656,7 @@
double FunRound::round(double val)
{
- if (!isnan(val) && !isinf(val)) {
+ if (!std::isnan(val) && !std::isinf(val)) {
if (signbit(val) && val >= -0.5)
val *= 0; // negative zero
else
diff --git a/Source/WebCore/xml/XPathValue.cpp b/Source/WebCore/xml/XPathValue.cpp
index 09ce876..f92cbc8 100644
--- a/Source/WebCore/xml/XPathValue.cpp
+++ b/Source/WebCore/xml/XPathValue.cpp
@@ -74,7 +74,7 @@
case BooleanValue:
return m_bool;
case NumberValue:
- return m_number != 0 && !isnan(m_number);
+ return m_number && !std::isnan(m_number);
case StringValue:
return !m_data->m_string.isEmpty();
}
@@ -123,11 +123,11 @@
case StringValue:
return m_data->m_string;
case NumberValue:
- if (isnan(m_number))
+ if (std::isnan(m_number))
return "NaN";
if (m_number == 0)
return "0";
- if (isinf(m_number))
+ if (std::isinf(m_number))
return signbit(m_number) ? "-Infinity" : "Infinity";
return String::number(m_number);
case BooleanValue: