OSDN Git Service

When starting the Geolocation service provider, check that the WebView is not already...
authorSteve Block <steveblock@google.com>
Tue, 12 Jan 2010 00:18:58 +0000 (00:18 +0000)
committerSteve Block <steveblock@google.com>
Tue, 12 Jan 2010 00:18:58 +0000 (00:18 +0000)
commit8ed98e2e3f77020f7a43bbd5427bc3dd12ba5743
treee5e91780f2064f46465eab0790dac7460091131f
parent237bd75b6ebc1298cbd1c46b43903d19d7dd18b1
When starting the Geolocation service provider, check that the WebView is not already paused.

This fixes the following scenario ...
- The browser back stack contains a page which calls Geolocation::watchPosition form its onload handler.
- User presses the back button quickly and repeatedly until the browser goes to the background.
- The browser calls WebViewCore::Pause when it goes into the background, which suspends any Geolocation
  services in use. However, this call is made before the page which calls Geolocation::watchPosition has
  been loaded. WebKit later loads this page, which creates a new Geolocation object which is never paused.

With this fix, the new Geolocation object is not started when it is first created. It does nothing until
it is resumed when the Browser is brought back to the foreground.

Bug: 2363338
WebCore/platform/android/GeolocationServiceAndroid.cpp
WebCore/platform/android/PlatformBridge.h [new file with mode: 0644]
WebKit/Android.mk
WebKit/android/WebCoreSupport/PlatformBridge.cpp [new file with mode: 0644]
WebKit/android/jni/WebViewCore.cpp
WebKit/android/jni/WebViewCore.h