diff options
author | Steve Block <steveblock@google.com> | 2010-02-01 13:28:26 +0000 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2010-02-01 13:39:57 +0000 |
commit | e8494e25fdde6a0c52c612fe28eddca35c0e5ce8 (patch) | |
tree | 051bc35f9138a0bba319718b47973ca8e7638f06 /WebCore/page | |
parent | db42c078ffb0f6a679e3853cb4ebb39e09c1f815 (diff) | |
download | external_webkit-e8494e25fdde6a0c52c612fe28eddca35c0e5ce8.zip external_webkit-e8494e25fdde6a0c52c612fe28eddca35c0e5ce8.tar.gz external_webkit-e8494e25fdde6a0c52c612fe28eddca35c0e5ce8.tar.bz2 |
Cherry-pick WebKit change 54096 for client-based Geolocation
See http://trac.webkit.org/changeset/54096
This is required to bring Geolocation up-to-date with webkit.org to allow upstreaming of maximumAge code.
Change-Id: Ic4f06aa2cf4ef8655bd05cd30746d9548f7e0d33
Diffstat (limited to 'WebCore/page')
-rw-r--r-- | WebCore/page/Geolocation.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/WebCore/page/Geolocation.cpp b/WebCore/page/Geolocation.cpp index 89897e1..237ceaf 100644 --- a/WebCore/page/Geolocation.cpp +++ b/WebCore/page/Geolocation.cpp @@ -283,9 +283,13 @@ PassRefPtr<Geolocation::GeoNotifier> Geolocation::startRequest(PassRefPtr<Positi if (haveSuitableCachedPosition(notifier->m_options.get())) notifier->setUseCachedPosition(); else { - if (notifier->hasZeroTimeout() || startUpdating(notifier.get())) - notifier->startTimerIfNeeded(); - else + if (notifier->hasZeroTimeout() || startUpdating(notifier.get())) { +#if ENABLE(CLIENT_BASED_GEOLOCATION) + // Only start timer if we're not waiting for user permission. + if (!m_startRequestPermissionNotifier) +#endif + notifier->startTimerIfNeeded(); + } else notifier->setFatalError(PositionError::create(PositionError::POSITION_UNAVAILABLE, "Failed to start Geolocation service")); } } @@ -407,6 +411,7 @@ void Geolocation::setIsAllowed(bool allowed) if (m_startRequestPermissionNotifier) { if (isAllowed()) { // Permission request was made during the startUpdating process + m_startRequestPermissionNotifier->startTimerIfNeeded(); m_startRequestPermissionNotifier = 0; if (!m_frame) return; |