From 51a2f64cbda6135675ee5050c6fad88d47865e89 Mon Sep 17 00:00:00 2001 From: Alex Rudenko Date: Fri, 23 Jun 2023 12:25:57 +0200 Subject: [PATCH 1/7] Add browsingContext.bringToFront --- index.bs | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/index.bs b/index.bs index 62293228..502baf84 100644 --- a/index.bs +++ b/index.bs @@ -2137,6 +2137,50 @@ document loading at which a navigation command will return. ### Commands ### {#module-browsingContext-commands} +#### The browsingContext.bringToFront Command #### {#command-browsingContext-bringToFront} + +The browsingContext.bringToFront command activates and focuses the given top-level browsing context. + +
+
Command Type
+
+
+      browsingContext.BringToFront = {
+        method: "browsingContext.bringToFront",
+        params: browsingContext.BringToFrontParameters
+      };
+
+      browsingContext.BringToFrontParameters = {
+        context: browsingContext.BrowsingContext
+      }
+    
+
+
Result Type
+
+
+     EmptyResult
+    
+
+
+ +
+ +The [=remote end steps=] with |command parameters| are: + +1. Let |context id| be the value of the |command parameters|["context"] field. + +1. Let |context| be the result of [=trying=] to [=get a browsing context=] with |context id|. + +1. If |context| is not a [=top-level browsing context=], return [=error=] with [=error code=] [=invalid argument=]. + +1. Run implementation-specific steps to bring the |context| to the top of the implementation-specific view hierarchy. + +1. Run implementation-specific steps to set the [[html/multipage/interaction.html#system-focus]] on the |context| if it is not focused. + +1. Return [=success=] with data null. + +
+ #### The browsingContext.captureScreenshot Command #### {#command-browsingContext-captureScreenshot} The browsingContext.captureScreenshot command From 10e5a39b2f194df4670c2ca0acd80340f388f429 Mon Sep 17 00:00:00 2001 From: Alex Rudenko Date: Mon, 26 Jun 2023 08:57:28 +0200 Subject: [PATCH 2/7] fix link --- index.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.bs b/index.bs index 502baf84..4a25182a 100644 --- a/index.bs +++ b/index.bs @@ -2175,7 +2175,7 @@ The [=remote end steps=] with |command parameters| are: 1. Run implementation-specific steps to bring the |context| to the top of the implementation-specific view hierarchy. -1. Run implementation-specific steps to set the [[html/multipage/interaction.html#system-focus]] on the |context| if it is not focused. +1. Run implementation-specific steps to set the [=top-level traversable/system focus=] on the |context| if it is not focused. 1. Return [=success=] with data null. From 6f4384a597f2d622715f6949f58e96c3c18b222d Mon Sep 17 00:00:00 2001 From: Alex Rudenko Date: Wed, 28 Jun 2023 09:05:02 +0200 Subject: [PATCH 3/7] Update steps for making a view visible --- index.bs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/index.bs b/index.bs index 4a25182a..6d2c1493 100644 --- a/index.bs +++ b/index.bs @@ -183,6 +183,11 @@ spec: HTML; urlPrefix: https://html.spec.whatwg.org/multipage/ text: window open steps; url: window-object.html#window-open-steps text: worker event loop; url: webappapis.html#worker-event-loop-2 text: worklet global scopes; url:worklets.html#concept-document-worklet-global-scopes + text: traversable navigable; url:document-sequences.html#traversable-navigable + text: system visibility state; url: document-sequences.html#system-visibility-state + text: visible; url: document-sequences.html#system-visibility-state + text: hidden; url: document-sequences.html#system-visibility-state + text: navigables; url: document-sequences.html#navigables spec: RESOURCE-TIMING; urlPrefix: https://w3c.github.io/resource-timing/ type: dfn text: convert fetch timestamp; url: dfn-convert-fetch-timestamp @@ -2173,7 +2178,11 @@ The [=remote end steps=] with |command parameters| are: 1. If |context| is not a [=top-level browsing context=], return [=error=] with [=error code=] [=invalid argument=]. -1. Run implementation-specific steps to bring the |context| to the top of the implementation-specific view hierarchy. +1. Run implementation-specific steps so that |context|'s [=traversable navigable=]'s [=system visibility state=] becomes [=visible=]. If this is not possible return [=error=] with error code [=unsupported operation=]. + + Note: This can have the side effect of making currently [=visible=] [=navigables=] [=hidden=]. + + Issue: It's not clear if we should have explicit requirements for cases like a minimized window; should that cause the window to become unminimized? 1. Run implementation-specific steps to set the [=top-level traversable/system focus=] on the |context| if it is not focused. From 0063147f013153464770f76d71f734ef148d2771 Mon Sep 17 00:00:00 2001 From: Alex Rudenko Date: Mon, 3 Jul 2023 11:54:45 +0200 Subject: [PATCH 4/7] rename bringToFront to activate --- index.bs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/index.bs b/index.bs index 6d2c1493..459d7db2 100644 --- a/index.bs +++ b/index.bs @@ -2142,20 +2142,20 @@ document loading at which a navigation command will return. ### Commands ### {#module-browsingContext-commands} -#### The browsingContext.bringToFront Command #### {#command-browsingContext-bringToFront} +#### The browsingContext.activate Command #### {#command-browsingContext-activate} -The browsingContext.bringToFront command activates and focuses the given top-level browsing context. +The browsingContext.activate command activates and focuses the given top-level browsing context.
Command Type
-      browsingContext.BringToFront = {
-        method: "browsingContext.bringToFront",
-        params: browsingContext.BringToFrontParameters
+      browsingContext.Activate = {
+        method: "browsingContext.activate",
+        params: browsingContext.ActivateParameters
       };
 
-      browsingContext.BringToFrontParameters = {
+      browsingContext.ActivateParameters = {
         context: browsingContext.BrowsingContext
       }
     
@@ -2168,7 +2168,7 @@ The browsingContext.bringToFront command activate
-
+
The [=remote end steps=] with |command parameters| are: From 607679713a41778655f3c66b3036b8fe7e5f2072 Mon Sep 17 00:00:00 2001 From: Alex Rudenko Date: Wed, 5 Jul 2023 11:53:16 +0200 Subject: [PATCH 5/7] Include a note about side effects of system visibility state --- index.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.bs b/index.bs index 459d7db2..2382826f 100644 --- a/index.bs +++ b/index.bs @@ -2182,7 +2182,7 @@ The [=remote end steps=] with |command parameters| are: Note: This can have the side effect of making currently [=visible=] [=navigables=] [=hidden=]. - Issue: It's not clear if we should have explicit requirements for cases like a minimized window; should that cause the window to become unminimized? + Note: This can change the underlying OS state by causing the window to become unminimized or by other side effects related to changing the [=system visibility state=]. 1. Run implementation-specific steps to set the [=top-level traversable/system focus=] on the |context| if it is not focused. From b1ce8f77c4cc369a8be88f5abdbf30cf4dfd4b9e Mon Sep 17 00:00:00 2001 From: Alex Rudenko Date: Fri, 7 Jul 2023 11:32:01 +0200 Subject: [PATCH 6/7] add a note about the focused area of the document --- index.bs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/index.bs b/index.bs index 2382826f..8d0bb26d 100644 --- a/index.bs +++ b/index.bs @@ -185,6 +185,7 @@ spec: HTML; urlPrefix: https://html.spec.whatwg.org/multipage/ text: worklet global scopes; url:worklets.html#concept-document-worklet-global-scopes text: traversable navigable; url:document-sequences.html#traversable-navigable text: system visibility state; url: document-sequences.html#system-visibility-state + text: focused area of the document; url: document-sequences.html#focused-area-of-the-document text: visible; url: document-sequences.html#system-visibility-state text: hidden; url: document-sequences.html#system-visibility-state text: navigables; url: document-sequences.html#navigables @@ -2186,6 +2187,8 @@ The [=remote end steps=] with |command parameters| are: 1. Run implementation-specific steps to set the [=top-level traversable/system focus=] on the |context| if it is not focused. + Note: This does not explicitly change the [=focused area of the document=] unless it is defined by other specifications. + 1. Return [=success=] with data null.
From 28ab483c3bfc24f41f6a24e3ab33f610314ab591 Mon Sep 17 00:00:00 2001 From: Alex Rudenko Date: Fri, 7 Jul 2023 11:37:56 +0200 Subject: [PATCH 7/7] Update index.bs Co-authored-by: jgraham --- index.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.bs b/index.bs index 8d0bb26d..427bf53a 100644 --- a/index.bs +++ b/index.bs @@ -2187,7 +2187,7 @@ The [=remote end steps=] with |command parameters| are: 1. Run implementation-specific steps to set the [=top-level traversable/system focus=] on the |context| if it is not focused. - Note: This does not explicitly change the [=focused area of the document=] unless it is defined by other specifications. + Note: This does not change the [=focused area of the document=] except as required to by other specifications. 1. Return [=success=] with data null.