[Webkit-unassigned] [Bug 22022] [GTK] add a GeoLocation implementation

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Dec 13 08:27:23 PST 2008


https://bugs.webkit.org/show_bug.cgi?id=22022





------- Comment #18 from zecke at selfish.org  2008-12-13 08:27 PDT -------
(From update of attachment 25984)
> diff -Naur a/WebCore/page/PositionError.h b/WebCore/page/PositionError.h

> -        TIMEOUT = 3
> +        TIMEOUT = 3,
> +        LOCATION_PROVIDER_ERROR = 4,
> +        POSITION_NOT_FOUND_ERROR = 5
> +
>      };

This is plain wrong. The enum is matching the PositionError of the w3c
geolocation API. You may not just add values to it...

>      
>      static PassRefPtr<PositionError> create(ErrorCode code, const String& message) { return adoptRef(new PositionError(code, message)); }
> diff -Naur a/WebCore/page/PositionError.idl b/WebCore/page/PositionError.idl
> --- a/WebCore/page/PositionError.idl	2008-11-24 08:36:41.000000000 -0500
> +++ b/WebCore/page/PositionError.idl	2008-12-12 15:26:40.000000000 -0500
> @@ -35,6 +35,9 @@
>          const unsigned short PERMISSION_DENIED = 1;
>          const unsigned short POSITION_UNAVAILABLE = 2;
>          const unsigned short TIMEOUT = 3;
> +        const unsigned short LOCATION_PROVIDER_ERROR = 4;
> +        const unsigned short POSITION_NOT_FOUND_ERROR = 5;
> +
>      };

wrong, for the same reason. If you think this should be there then please
participate in the W3C geolocation discussion?!


>  }
> diff -Naur a/WebCore/platform/gtk/GeolocationServiceGtk.cpp b/WebCore/platform/gtk/GeolocationServiceGtk.cpp
> --- a/WebCore/platform/gtk/GeolocationServiceGtk.cpp	2008-12-12 15:24:56.000000000 -0500
> +++ b/WebCore/platform/gtk/GeolocationServiceGtk.cpp	2008-12-12 15:26:40.000000000 -0500
> @@ -88,7 +88,7 @@
>          return false;
>      }
>  
> -    GeoclueAccuracyLevel accuracyLevel = GEOCLUE_ACCURACY_LEVEL_LOCALITY;
> +    GeoclueAccuracyLevel accuracyLevel = GEOCLUE_ACCURACY_LEVEL_DETAILED;

hmm, could you explain that part? It feels odd to treat a non existing option
like a request for a high accuracy...

>  
>  void GeolocationServiceGtk::stopUpdating()
> @@ -168,16 +168,16 @@
>      if (error) {
>          setError(PositionError::POSITION_NOT_FOUND_ERROR, error->message);
>          return;
> -    } else if (fields & GEOCLUE_POSITION_FIELDS_LATITUDE && fields & GEOCLUE_POSITION_FIELDS_LONGITUDE) {
> +    } else if (!(fields & GEOCLUE_POSITION_FIELDS_LATITUDE && fields & GEOCLUE_POSITION_FIELDS_LONGITUDE)) {

oops.


>  
> -
> +    // don't update now, wait for Geoclue to trigger 
>      // The m_altitudeAccuracy accuracy is likely to be wrong
> -    GeoclueAccuracyLevel level;
> -    geoclue_accuracy_get_details(accuracy.get(), &level, &m_accuracy, &m_altitudeAccuracy);
> -    updatePosition();
> +    //GeoclueAccuracyLevel level;
> +    //geoclue_accuracy_get_details(accuracy.get(), &level, &m_accuracy, &m_altitudeAccuracy);
> +    //updatePosition();


oh well, could you point me to the gurantee that we will get a signal? I could
not find anything in the GeoClue API doing that. And in general we do not
comment out code...we remove it.


> +    if (!(fields & GEOCLUE_POSITION_FIELDS_LATITUDE && fields & GEOCLUE_POSITION_FIELDS_LONGITUDE)) {

yes.


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list