From 587cd8c59cd59bbb3acd730511f9d1070edef520 Mon Sep 17 00:00:00 2001 From: Christian Bromann Date: Tue, 6 May 2025 15:18:07 -0700 Subject: [PATCH 1/6] fix(cddl): fix CDDL syntax for emulation.SetGeolocationOverrideParameters --- index.bs | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/index.bs b/index.bs index 5ade92524..f43a41925 100644 --- a/index.bs +++ b/index.bs @@ -5624,14 +5624,23 @@ The emulation.setGeolocationOverride command modi params: emulation.SetGeolocationOverrideParameters ) - emulation.SetGeolocationOverrideParameters = { - ( - (coordinates: emulation.GeolocationCoordinates / null) // - (error: emulation.GeolocationPositionError) - ), + emulation.SetGeolocationOverrideParameters = ( + emulation.SetGeolocationOverrideSuccessParameters / + emulation.SetGeolocationOverrideErrorParameters + ) + + emulation.SetGeolocationOverrideBaseParameters = ( ? contexts: [+browsingContext.BrowsingContext], ? userContexts: [+browser.UserContext], - } + ) + + emulation.SetGeolocationOverrideSuccessParameters = { + coordinates: emulation.GeolocationCoordinates / null + } & emulation.SetGeolocationOverrideBaseParameters + + emulation.SetGeolocationOverrideErrorParameters = { + error: emulation.GeolocationPositionError + } & emulation.SetGeolocationOverrideBaseParameters emulation.GeolocationCoordinates = { latitude: -90.0..90.0, From bcfbc4b55beef61512ed4fb7ef1661459f4bbec4 Mon Sep 17 00:00:00 2001 From: Christian Bromann Date: Tue, 6 May 2025 15:32:58 -0700 Subject: [PATCH 2/6] fix group syntax --- index.bs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/index.bs b/index.bs index f43a41925..a2b097dc0 100644 --- a/index.bs +++ b/index.bs @@ -5634,13 +5634,15 @@ The emulation.setGeolocationOverride command modi ? userContexts: [+browser.UserContext], ) - emulation.SetGeolocationOverrideSuccessParameters = { + emulation.SetGeolocationOverrideSuccessParameters = &( + emulation.SetGeolocationOverrideBaseParameters, coordinates: emulation.GeolocationCoordinates / null - } & emulation.SetGeolocationOverrideBaseParameters + ) - emulation.SetGeolocationOverrideErrorParameters = { + emulation.SetGeolocationOverrideErrorParameters = &( + emulation.SetGeolocationOverrideBaseParameters, error: emulation.GeolocationPositionError - } & emulation.SetGeolocationOverrideBaseParameters + ) emulation.GeolocationCoordinates = { latitude: -90.0..90.0, From 3d8a8f879947b6f9e695f026e3ce5827c93ebd5f Mon Sep 17 00:00:00 2001 From: Christian Bromann Date: Tue, 6 May 2025 16:12:39 -0700 Subject: [PATCH 3/6] align with extensibility idiom --- index.bs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/index.bs b/index.bs index a2b097dc0..b371be4e9 100644 --- a/index.bs +++ b/index.bs @@ -5634,15 +5634,15 @@ The emulation.setGeolocationOverride command modi ? userContexts: [+browser.UserContext], ) - emulation.SetGeolocationOverrideSuccessParameters = &( + emulation.SetGeolocationOverrideSuccessParameters = { emulation.SetGeolocationOverrideBaseParameters, coordinates: emulation.GeolocationCoordinates / null - ) + } - emulation.SetGeolocationOverrideErrorParameters = &( + emulation.SetGeolocationOverrideErrorParameters = { emulation.SetGeolocationOverrideBaseParameters, error: emulation.GeolocationPositionError - ) + } emulation.GeolocationCoordinates = { latitude: -90.0..90.0, From 8d2eefcda5d934475f5c0606ad21a9fc945da0b1 Mon Sep 17 00:00:00 2001 From: Christian Bromann Date: Wed, 7 May 2025 17:11:28 -0700 Subject: [PATCH 4/6] PR feedback --- index.bs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/index.bs b/index.bs index b371be4e9..80dcad086 100644 --- a/index.bs +++ b/index.bs @@ -5625,22 +5625,16 @@ The emulation.setGeolocationOverride command modi ) emulation.SetGeolocationOverrideParameters = ( - emulation.SetGeolocationOverrideSuccessParameters / - emulation.SetGeolocationOverrideErrorParameters - ) - - emulation.SetGeolocationOverrideBaseParameters = ( ? contexts: [+browsingContext.BrowsingContext], ? userContexts: [+browser.UserContext], + (emulation.SetGeolocationOverrideSuccessParameters // emulation.SetGeolocationOverrideErrorParameters) ) emulation.SetGeolocationOverrideSuccessParameters = { - emulation.SetGeolocationOverrideBaseParameters, coordinates: emulation.GeolocationCoordinates / null } emulation.SetGeolocationOverrideErrorParameters = { - emulation.SetGeolocationOverrideBaseParameters, error: emulation.GeolocationPositionError } From 72060f69e45bde7d530754fac0cb704b3b3ac2fd Mon Sep 17 00:00:00 2001 From: Christian Bromann Date: Wed, 7 May 2025 17:15:12 -0700 Subject: [PATCH 5/6] add type parameter --- index.bs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/index.bs b/index.bs index 80dcad086..83a31505e 100644 --- a/index.bs +++ b/index.bs @@ -5631,10 +5631,12 @@ The emulation.setGeolocationOverride command modi ) emulation.SetGeolocationOverrideSuccessParameters = { + type: "success", coordinates: emulation.GeolocationCoordinates / null } emulation.SetGeolocationOverrideErrorParameters = { + type: "error", error: emulation.GeolocationPositionError } From 82b7005a80b946cb7734368cb6feb10cc047b5c9 Mon Sep 17 00:00:00 2001 From: Christian Bromann Date: Thu, 8 May 2025 11:35:07 -0700 Subject: [PATCH 6/6] PR feedback --- index.bs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/index.bs b/index.bs index 83a31505e..c50186936 100644 --- a/index.bs +++ b/index.bs @@ -5627,18 +5627,18 @@ The emulation.setGeolocationOverride command modi emulation.SetGeolocationOverrideParameters = ( ? contexts: [+browsingContext.BrowsingContext], ? userContexts: [+browser.UserContext], - (emulation.SetGeolocationOverrideSuccessParameters // emulation.SetGeolocationOverrideErrorParameters) + (emulation.SetGeolocationPosition // emulation.GeolocationPositionError) ) - emulation.SetGeolocationOverrideSuccessParameters = { - type: "success", + emulation.SetGeolocationPosition = ( + type: "position", coordinates: emulation.GeolocationCoordinates / null - } + ) - emulation.SetGeolocationOverrideErrorParameters = { - type: "error", - error: emulation.GeolocationPositionError - } + emulation.GeolocationPositionError = ( + type: "error" + error: emulation.GeolocationPositionUnavailableError + ) emulation.GeolocationCoordinates = { latitude: -90.0..90.0, @@ -5650,7 +5650,7 @@ The emulation.setGeolocationOverride command modi ? speed: (float .ge 0.0) / null .default null, } - emulation.GeolocationPositionError = { + emulation.GeolocationPositionUnavailableError = { type: "positionUnavailable" }