Bug 87030
Summary: | Geolocation does not immediately make callbacks to new requests while other requests are in progress | ||
---|---|---|---|
Product: | WebKit | Reporter: | Steve Block <steveblock> |
Component: | WebCore Misc. | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Normal | CC: | benjamin |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Steve Block
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
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Benjamin Poulain
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 :) )