diff options
author | Steve Block <steveblock@google.com> | 2009-08-07 16:44:18 +0100 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2009-08-07 16:47:48 +0100 |
commit | 8a1e59b214bfd5b55c4d1332154e0e992571bf27 (patch) | |
tree | 12cbec7aac16c1a183846fde952a6513e3246dd4 /WebCore/page | |
parent | 6d09cb37a17ff64055323f4ab232dbee6c4cd474 (diff) | |
download | external_webkit-8a1e59b214bfd5b55c4d1332154e0e992571bf27.zip external_webkit-8a1e59b214bfd5b55c4d1332154e0e992571bf27.tar.gz external_webkit-8a1e59b214bfd5b55c4d1332154e0e992571bf27.tar.bz2 |
Revert "Correctly sets default values for Geolocation PositionOptions."
This reverts commit 0c9108c0f832d34e6468bf1b3ed4132053c6a0f3.
This broke the automated build. Not sure why, as it builds fine on my machine. Rolling back while I investigate.
Diffstat (limited to 'WebCore/page')
-rw-r--r-- | WebCore/page/Geolocation.cpp | 6 | ||||
-rw-r--r-- | WebCore/page/PositionOptions.h | 29 |
2 files changed, 12 insertions, 23 deletions
diff --git a/WebCore/page/Geolocation.cpp b/WebCore/page/Geolocation.cpp index 8bfa093..7010339 100644 --- a/WebCore/page/Geolocation.cpp +++ b/WebCore/page/Geolocation.cpp @@ -40,15 +40,11 @@ Geolocation::GeoNotifier::GeoNotifier(PassRefPtr<PositionCallback> successCallba , m_options(options) , m_timer(this, &Geolocation::GeoNotifier::timerFired) { - ASSERT(m_successCallback); - // If no options were supplied from JS, we should have created a default set - // of options in JSGeolocationCustom.cpp. - ASSERT(m_options); } void Geolocation::GeoNotifier::startTimer() { - if (m_errorCallback && m_options->timeout() != PositionOptions::infinity) + if (m_errorCallback && m_options) m_timer.startOneShot(m_options->timeout() / 1000.0); } diff --git a/WebCore/page/PositionOptions.h b/WebCore/page/PositionOptions.h index a513f61..10845d3 100644 --- a/WebCore/page/PositionOptions.h +++ b/WebCore/page/PositionOptions.h @@ -33,33 +33,26 @@ namespace WebCore { class PositionOptions : public RefCounted<PositionOptions> { public: - static const long infinity; - static PassRefPtr<PositionOptions> create() { return adoptRef(new PositionOptions()); } + static PassRefPtr<PositionOptions> create(bool highAccuracy, unsigned timeout, unsigned maximumAge) { return adoptRef(new PositionOptions(highAccuracy, timeout, maximumAge)); } bool enableHighAccuracy() const { return m_highAccuracy; } void setEnableHighAccuracy(bool enable) { m_highAccuracy = enable; } - long timeout() const { return m_timeout; } - void setTimeout(long t) { - ASSERT(t == infinity || t >= 0); - m_timeout = t; - } - long maximumAge() const { return m_maximumAge; } - void setMaximumAge(long a) { - ASSERT(a == infinity || a >= 0); - m_maximumAge = a; - } + unsigned timeout() const { return m_timeout; } + void setTimeout(unsigned t) { m_timeout = t; } + unsigned maximumAge() const { return m_maximumAge; } + void setMaximumAge(unsigned a) { m_maximumAge = a; } private: - PositionOptions() - : m_highAccuracy(false) - , m_timeout(infinity) - , m_maximumAge(0) + PositionOptions(bool highAccuracy, unsigned timeout, unsigned maximumAge) + : m_highAccuracy(highAccuracy) + , m_timeout(timeout) + , m_maximumAge(maximumAge) { } bool m_highAccuracy; - long m_timeout; - long m_maximumAge; + unsigned m_timeout; + unsigned m_maximumAge; }; } // namespace WebCore |