diff options
author | Steve Block <steveblock@google.com> | 2010-02-23 14:59:58 +0000 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2010-02-23 15:06:05 +0000 |
commit | 234ad679c5705a581292e45349c33513bbaa526a (patch) | |
tree | f467a09fa34f240a75f081915583fa9b0f44259b /WebCore | |
parent | 41084a8fbaa3b6914ecfb085be8a9f32bebfb55b (diff) | |
download | external_webkit-234ad679c5705a581292e45349c33513bbaa526a.zip external_webkit-234ad679c5705a581292e45349c33513bbaa526a.tar.gz external_webkit-234ad679c5705a581292e45349c33513bbaa526a.tar.bz2 |
Cherry-pick WebKit change 55136 to add a means to cancel an ongoing Geolocation permission request
This is part of the change required to fix a Geolocation permissions bug.
See https://android-git.corp.google.com/g/#change,40601
Note that We take only the WebCore component of the change, but additional
changes are required to ChromeClientAndroid.
See http://trac.webkit.org/changeset/55136
Change-Id: Iff0eab3adc3e41876df7f114c0d50243d015664f
Diffstat (limited to 'WebCore')
-rw-r--r-- | WebCore/page/Chrome.cpp | 5 | ||||
-rw-r--r-- | WebCore/page/Chrome.h | 1 | ||||
-rw-r--r-- | WebCore/page/ChromeClient.h | 3 | ||||
-rw-r--r-- | WebCore/page/Geolocation.cpp | 8 |
4 files changed, 14 insertions, 3 deletions
diff --git a/WebCore/page/Chrome.cpp b/WebCore/page/Chrome.cpp index 0b85535..d3b46ad 100644 --- a/WebCore/page/Chrome.cpp +++ b/WebCore/page/Chrome.cpp @@ -417,6 +417,11 @@ void Chrome::requestGeolocationPermissionForFrame(Frame* frame, Geolocation* geo m_client->requestGeolocationPermissionForFrame(frame, geolocation); } +void Chrome::cancelGeolocationPermissionRequestForFrame(Frame* frame) +{ + m_client->cancelGeolocationPermissionRequestForFrame(frame); +} + void Chrome::runOpenPanel(Frame* frame, PassRefPtr<FileChooser> fileChooser) { m_client->runOpenPanel(frame, fileChooser); diff --git a/WebCore/page/Chrome.h b/WebCore/page/Chrome.h index 53dbb7a..3039b90 100644 --- a/WebCore/page/Chrome.h +++ b/WebCore/page/Chrome.h @@ -133,6 +133,7 @@ namespace WebCore { void print(Frame*); void requestGeolocationPermissionForFrame(Frame*, Geolocation*); + void cancelGeolocationPermissionRequestForFrame(Frame*); void runOpenPanel(Frame*, PassRefPtr<FileChooser>); diff --git a/WebCore/page/ChromeClient.h b/WebCore/page/ChromeClient.h index d4af73b..1615f3a 100644 --- a/WebCore/page/ChromeClient.h +++ b/WebCore/page/ChromeClient.h @@ -185,8 +185,9 @@ namespace WebCore { virtual bool paintCustomScrollCorner(GraphicsContext*, const FloatRect&); // This can be either a synchronous or asynchronous call. The ChromeClient can display UI asking the user for permission - // to use Geolococation. The ChromeClient must call Geolocation::setShouldClearCache() appropriately. + // to use Geolocation. virtual void requestGeolocationPermissionForFrame(Frame*, Geolocation*) = 0; + virtual void cancelGeolocationPermissionRequestForFrame(Frame*) = 0; virtual void runOpenPanel(Frame*, PassRefPtr<FileChooser>) = 0; diff --git a/WebCore/page/Geolocation.cpp b/WebCore/page/Geolocation.cpp index 9ca844c..161160a 100644 --- a/WebCore/page/Geolocation.cpp +++ b/WebCore/page/Geolocation.cpp @@ -236,8 +236,12 @@ Geolocation::~Geolocation() void Geolocation::disconnectFrame() { stopUpdating(); - if (m_frame && m_frame->document()) - m_frame->document()->setUsingGeolocation(false); + if (m_frame) { + if (m_frame->document()) + m_frame->document()->setUsingGeolocation(false); + if (m_frame->page() && m_allowGeolocation == InProgress) + m_frame->page()->chrome()->cancelGeolocationPermissionRequestForFrame(m_frame); + } m_frame = 0; } |