From a7388111a9bb191d624c485752d3741ffbbeae33 Mon Sep 17 00:00:00 2001 From: Pete LePage Date: Wed, 14 Aug 2024 13:59:56 -0400 Subject: [PATCH 1/4] Add GeoLocation --- features/{draft/spec => }/geolocation.yml | 11 +++++-- .../{draft/spec => }/geolocation.yml.dist | 32 ++++++++++++++++--- 2 files changed, 35 insertions(+), 8 deletions(-) rename features/{draft/spec => }/geolocation.yml (70%) rename features/{draft/spec => }/geolocation.yml.dist (71%) diff --git a/features/draft/spec/geolocation.yml b/features/geolocation.yml similarity index 70% rename from features/draft/spec/geolocation.yml rename to features/geolocation.yml index 29da7798464..74b79c91c16 100644 --- a/features/draft/spec/geolocation.yml +++ b/features/geolocation.yml @@ -1,11 +1,13 @@ -draft_date: 2024-08-12 -name: Geolocation -description: TODO +name: Geolocation API +description: The Geolocation API allows the user to optionally share their location. spec: https://w3c.github.io/geolocation/ +status: + compute_from: api.Navigator.geolocation compat_features: - api.Geolocation - api.Geolocation.clearWatch - api.Geolocation.getCurrentPosition + - api.Geolocation.secure_context_required - api.Geolocation.watchPosition - api.GeolocationCoordinates - api.GeolocationCoordinates.accuracy @@ -14,14 +16,17 @@ compat_features: - api.GeolocationCoordinates.heading - api.GeolocationCoordinates.latitude - api.GeolocationCoordinates.longitude + - api.GeolocationCoordinates.secure_context_required - api.GeolocationCoordinates.speed - api.GeolocationCoordinates.toJSON - api.GeolocationPosition - api.GeolocationPosition.coords + - api.GeolocationPosition.secure_context_required - api.GeolocationPosition.timestamp - api.GeolocationPosition.toJSON - api.GeolocationPositionError - api.GeolocationPositionError.code - api.GeolocationPositionError.message + - api.GeolocationPositionError.secure_context_required - api.Navigator.geolocation - http.headers.Permissions-Policy.geolocation diff --git a/features/draft/spec/geolocation.yml.dist b/features/geolocation.yml.dist similarity index 71% rename from features/draft/spec/geolocation.yml.dist rename to features/geolocation.yml.dist index 1a1f29c12d2..3d9e25f9ab4 100644 --- a/features/draft/spec/geolocation.yml.dist +++ b/features/geolocation.yml.dist @@ -2,12 +2,19 @@ # Do not edit this file by hand. Edit the source file instead! status: - baseline: false + baseline: high + baseline_low_date: 2015-07-29 + baseline_high_date: 2018-01-29 support: - chrome: "126" - chrome_android: "126" - edge: "126" + chrome: "5" + chrome_android: "18" + edge: "12" + firefox: "3.5" + firefox_android: "4" + safari: "5" + safari_ios: ≤3 compat_features: + # ⬇️ Same status as overall feature ⬇️ # baseline: high # baseline_low_date: 2015-07-29 # baseline_high_date: 2018-01-29 @@ -25,6 +32,19 @@ compat_features: - api.Geolocation.watchPosition - api.Navigator.geolocation + # baseline: high + # baseline_low_date: 2020-01-15 + # baseline_high_date: 2022-07-15 + # support: + # chrome: "50" + # chrome_android: "50" + # edge: "79" + # firefox: "55" + # firefox_android: "55" + # safari: "10" + # safari_ios: "10" + - api.Geolocation.secure_context_required + # baseline: high # baseline_low_date: 2020-07-28 # baseline_high_date: 2023-01-28 @@ -43,13 +63,16 @@ compat_features: - api.GeolocationCoordinates.heading - api.GeolocationCoordinates.latitude - api.GeolocationCoordinates.longitude + - api.GeolocationCoordinates.secure_context_required - api.GeolocationCoordinates.speed - api.GeolocationPosition - api.GeolocationPosition.coords + - api.GeolocationPosition.secure_context_required - api.GeolocationPosition.timestamp - api.GeolocationPositionError - api.GeolocationPositionError.code - api.GeolocationPositionError.message + - api.GeolocationPositionError.secure_context_required # baseline: false # support: @@ -58,7 +81,6 @@ compat_features: # edge: "88" - http.headers.Permissions-Policy.geolocation - # ⬇️ Same status as overall feature ⬇️ # baseline: false # support: # chrome: "126" From 99d2f73ac374a45bafce770ff4aa21e0c5fadc5e Mon Sep 17 00:00:00 2001 From: Pete LePage Date: Wed, 14 Aug 2024 14:32:48 -0400 Subject: [PATCH 2/4] Add `caniuse` --- features/geolocation.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/features/geolocation.yml b/features/geolocation.yml index 74b79c91c16..efaa203231b 100644 --- a/features/geolocation.yml +++ b/features/geolocation.yml @@ -3,6 +3,7 @@ description: The Geolocation API allows the user to optionally share their locat spec: https://w3c.github.io/geolocation/ status: compute_from: api.Navigator.geolocation +caniuse: geolocation compat_features: - api.Geolocation - api.Geolocation.clearWatch From e5a7b0dcedda8032a6f4472279a031df7ae963f2 Mon Sep 17 00:00:00 2001 From: Pete LePage Date: Thu, 15 Aug 2024 09:15:43 -0400 Subject: [PATCH 3/4] Apply suggestions from code review Co-authored-by: Daniel D. Beck --- features/geolocation.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/features/geolocation.yml b/features/geolocation.yml index efaa203231b..544c69c5f7b 100644 --- a/features/geolocation.yml +++ b/features/geolocation.yml @@ -1,5 +1,5 @@ -name: Geolocation API -description: The Geolocation API allows the user to optionally share their location. +name: Geolocation +description: The `navigator.gelocation` API requests the user's latitude, longitude, heading, and speed. spec: https://w3c.github.io/geolocation/ status: compute_from: api.Navigator.geolocation From 9d9e7a4bf77f89b6dd211e9362d5df92015d4d90 Mon Sep 17 00:00:00 2001 From: Pete LePage Date: Thu, 15 Aug 2024 10:09:26 -0400 Subject: [PATCH 4/4] Add navigator.secure_context_required --- features/geolocation.yml | 1 + features/geolocation.yml.dist | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/features/geolocation.yml b/features/geolocation.yml index 544c69c5f7b..accdfb74ac4 100644 --- a/features/geolocation.yml +++ b/features/geolocation.yml @@ -30,4 +30,5 @@ compat_features: - api.GeolocationPositionError.message - api.GeolocationPositionError.secure_context_required - api.Navigator.geolocation + - api.Navigator.geolocation.secure_context_required - http.headers.Permissions-Policy.geolocation diff --git a/features/geolocation.yml.dist b/features/geolocation.yml.dist index 3d9e25f9ab4..969329fdd26 100644 --- a/features/geolocation.yml.dist +++ b/features/geolocation.yml.dist @@ -32,6 +32,19 @@ compat_features: - api.Geolocation.watchPosition - api.Navigator.geolocation + # baseline: high + # baseline_low_date: 2020-01-15 + # baseline_high_date: 2022-07-15 + # support: + # chrome: "47" + # chrome_android: "47" + # edge: "79" + # firefox: "55" + # firefox_android: "55" + # safari: "10" + # safari_ios: "10" + - api.Navigator.geolocation.secure_context_required + # baseline: high # baseline_low_date: 2020-01-15 # baseline_high_date: 2022-07-15