Bug 87030 - Geolocation does not immediately make callbacks to new requests while other requests are in progress
Summary: Geolocation does not immediately make callbacks to new requests while other r...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-21 10:45 PDT by Steve Block
Modified: 2012-05-27 14:56 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Block 2012-05-21 10:45:23 PDT
Repro steps ...
- Start a watchPosition() request
- Wait for the success callback to be called
- Start a getCurrentPosition() request

Providing a position is obtained, the watchPosition() success callback is called as expected. When the getCurrentPosition() request is made, its success callback should be called with the same position. Instead, it is not called until an updated position is obtained.

The spec [1] states that if the location acquisition process is successful, we should invoke the success callback. In this case, when we make the getCurrentPosition() request, a successful location acquisition process is already ongoing, and I think it makes sense to use the already obtained position for the success callback. This matches the developer's expectation that a getcurrentPosition() request should be independent of any ongoing watchPosition() requests.

The problem is that GeolocationController only informs the GeolocationClient when the first request is made and the when the last request ends. It does not inform the client about new requests made while other requests are ongoing.

[1] http://www.w3.org/TR/geolocation-API/#geolocation_interface
Comment 1 Benjamin Poulain 2012-05-27 14:56:36 PDT
I am not sure I agree with this. The option PositionOptions::maximumAge has been defined to handle cases where you accept possibly outdated information.

If the problem is calling getCurrentPosition() from the success callback itself. I think it is such a corner case that we should not add complexity for it.

I am in favor of closing this as WONTFIX (unless I misunderstand this issue of course :) )