From 31f8627ce13c4d197a4e93ffbbcf47d98fd374aa Mon Sep 17 00:00:00 2001 From: Alex Rudenko Date: Mon, 30 Oct 2023 14:50:02 +0100 Subject: [PATCH] Add jgraham's suggestions --- index.bs | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/index.bs b/index.bs index c8867b671..e6e0a5dec 100644 --- a/index.bs +++ b/index.bs @@ -1221,12 +1221,21 @@ Issue: Define how this works. # User Contexts # {#user-contexts} -A user context is an aggregation of browsing contexts that separates the browser state for browsing contexts in one user context from browsing contexts in another user context. -The user agent contains at least one user context, the default user context. +A user context represents a collection of top-level navigables within a remote +end. Each top-level navigable belongs to exactly one user contexts, and child +navigables belong to the same user context as their parent. -Note: User contexts are a WebDriver-specific abstraction to allow working with private browsing modes (https://www.w3.org/2001/tag/doc/private-browsing-modes/). -While we don't want to pose any restrictions on the implementations of private browsing modes, we want to allow to perform basic operations with private browsing -contexts. A user context can be seen as a user agent in terms of the Infra spec but currently WebDriver BiDi spec is not compliant with that definition of the user agent. +Each user context represents an additional [=storage key=], so that no storage +state is shared between different user contexts. + +A user context has a user context id, which is a string set upon +context creation. + +Note: the infra spec uses the term "user agent" to refer to the same concept as +user contexts. However this is not compatible with usage of the term "user +agent" to mean the entire web client, which may contain multiple user contexts. +Although this difference is not visible to web content, it can be observed via +WebDriver, so we avoid reusing existing terminology. # Modules # {#modules} @@ -1917,10 +1926,8 @@ The [=remote end steps=] are: 1. For each |user context| in |user contexts|: - 1. If the |user context| is the [=default user context=], continue. - 1. Let |info| be a [=/map=] matching the browser.UserContextInfo - production with the userContext field set to |user context|'s ID. + production with the userContext field set to |user context|'s [=user context id=]. 1. Append |info| to |user context info list|. @@ -2043,7 +2050,7 @@ browsingContext.Info = { url: text, children: browsingContext.InfoList / null ? parent: browsingContext.BrowsingContext / null, - ? userContext: Browser.UserContext / null + ? userContext: browser.UserContext / null }