diff options
author | Steve Block <steveblock@google.com> | 2009-10-08 15:18:46 +0100 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2009-10-14 19:38:54 +0100 |
commit | 6c2d6953902b07e2368913f8314bf2ba9062210c (patch) | |
tree | b4bc0eebe3c01cdfbe683e0b32bede325b1d9ea9 /WebCore | |
parent | 7da6c11f9b0356ea2b070f6114d2005cbc2c43bb (diff) | |
download | external_webkit-6c2d6953902b07e2368913f8314bf2ba9062210c.zip external_webkit-6c2d6953902b07e2368913f8314bf2ba9062210c.tar.gz external_webkit-6c2d6953902b07e2368913f8314bf2ba9062210c.tar.bz2 |
Brings JSC Geolocation bindings up-to-date with latest submission to webkit.org. Do not merge.
See https://bugs.webkit.org/show_bug.cgi?id=29099
This has already been submitted to master branch.
Diffstat (limited to 'WebCore')
-rw-r--r-- | WebCore/bindings/js/JSGeolocationCustom.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/WebCore/bindings/js/JSGeolocationCustom.cpp b/WebCore/bindings/js/JSGeolocationCustom.cpp index 8ef8601..280fd2f 100644 --- a/WebCore/bindings/js/JSGeolocationCustom.cpp +++ b/WebCore/bindings/js/JSGeolocationCustom.cpp @@ -34,6 +34,7 @@ #include "JSCustomPositionErrorCallback.h" #include "JSDOMWindow.h" #include "PositionOptions.h" +#include <runtime/InternalFunction.h> using namespace JSC; using namespace std; @@ -91,7 +92,7 @@ static PassRefPtr<PositionOptions> createPositionOptions(ExecState* exec, JSValu JSValue enableHighAccuracyValue = object->get(exec, Identifier(exec, "enableHighAccuracy")); if (exec->hadException()) return 0; - if(!enableHighAccuracyValue.isUndefined()) { + if (!enableHighAccuracyValue.isUndefined()) { options->setEnableHighAccuracy(enableHighAccuracyValue.toBoolean(exec)); if (exec->hadException()) return 0; @@ -104,8 +105,8 @@ static PassRefPtr<PositionOptions> createPositionOptions(ExecState* exec, JSValu double timeoutNumber = timeoutValue.toNumber(exec); if (exec->hadException()) return 0; - // If the value is infinity, there's nothing to do. - if (timeoutNumber != Inf) { + // If the value is positive infinity, there's nothing to do. + if (!(isinf(timeoutNumber) && (timeoutNumber > 0))) { // Wrap to int32 and force non-negative to match behavior of window.setTimeout. options->setTimeout(max(0, timeoutValue.toInt32(exec))); if (exec->hadException()) @@ -120,8 +121,8 @@ static PassRefPtr<PositionOptions> createPositionOptions(ExecState* exec, JSValu double maximumAgeNumber = maximumAgeValue.toNumber(exec); if (exec->hadException()) return 0; - if (maximumAgeNumber == Inf) { - // If the value is infinity, clear maximumAge. + if (isinf(maximumAgeNumber) && (maximumAgeNumber > 0)) { + // If the value is positive infinity, clear maximumAge. options->clearMaximumAge(); } else { // Wrap to int32 and force non-negative to match behavior of window.setTimeout. |