summaryrefslogtreecommitdiffstats
path: root/WebCore/page/Geolocation.cpp
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2010-02-18 11:26:48 +0000
committerSteve Block <steveblock@google.com>2010-02-18 12:17:02 +0000
commit930792dfdde9ad0fac3251ab70eb00d97f2fe88d (patch)
tree034286e22e38d273d2bba3dad8983fdea9a2f77f /WebCore/page/Geolocation.cpp
parent2e837c8b6511f85209518f832e340662218eb3dc (diff)
downloadexternal_webkit-930792dfdde9ad0fac3251ab70eb00d97f2fe88d.zip
external_webkit-930792dfdde9ad0fac3251ab70eb00d97f2fe88d.tar.gz
external_webkit-930792dfdde9ad0fac3251ab70eb00d97f2fe88d.tar.bz2
Fixes a bug with the Geolocation suspend/resume behaviour
PlatformBridge::isWebViewPaused needs to be an instance method, rather than a static. This fixes a bug where if the user switches browser windows while a page that uses Geolocation is still loading, the Geolocation service won't be started in the suspended state. Note that this is a temporary fix, as the upstreaming of the existing suspend/resume code will introduce a new approach, which will avoid this problem altogether. See https://android-git.corp.google.com/g/#change,38942 Change-Id: I3f07f8837b8a8c1c5e7e4f5112ab487188670c3a
Diffstat (limited to 'WebCore/page/Geolocation.cpp')
-rw-r--r--WebCore/page/Geolocation.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/WebCore/page/Geolocation.cpp b/WebCore/page/Geolocation.cpp
index e55d2b1..9ca844c 100644
--- a/WebCore/page/Geolocation.cpp
+++ b/WebCore/page/Geolocation.cpp
@@ -34,6 +34,7 @@
#include "EventNames.h"
#include "Frame.h"
#include "Page.h"
+#include "PlatformBridge.h"
#include <wtf/CurrentTime.h>
#if ENABLE(CLIENT_BASED_GEOLOCATION)
@@ -648,8 +649,15 @@ bool Geolocation::startUpdating(GeoNotifier* notifier)
page->geolocationController()->addObserver(this);
return true;
#else
+#if PLATFORM(ANDROID)
+ // TODO: Upstream to webkit.org. See https://bugs.webkit.org/show_bug.cgi?id=34082
+ // Note that the correct fix is to use a 'paused' flag in WebCore, rather
+ // than calling into PlatformBridge.
+ return m_service->startUpdating(notifier->m_options.get(), PlatformBridge::isWebViewPaused(m_frame->view()));
+#else
return m_service->startUpdating(notifier->m_options.get());
#endif
+#endif
}
void Geolocation::stopUpdating()