Skip to content

Commit

Permalink
Add jgraham's suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
OrKoN committed Oct 30, 2023
1 parent 253ce09 commit 31f8627
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1221,12 +1221,21 @@ Issue: Define how this works.

# User Contexts # {#user-contexts}

A <dfn>user context</dfn> 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 <dfn>default user context</dfn>.
A <dfn>user context</dfn> 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 <dfn>user context id</dfn>, 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}

Expand Down Expand Up @@ -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 <code>browser.UserContextInfo</code>
production with the <code>userContext</code> field set to |user context|'s ID.
production with the <code>userContext</code> field set to |user context|'s [=user context id=].

1. Append |info| to |user context info list|.

Expand Down Expand Up @@ -2043,7 +2050,7 @@ browsingContext.Info = {
url: text,
children: browsingContext.InfoList / null
? parent: browsingContext.BrowsingContext / null,
? userContext: Browser.UserContext / null
? userContext: browser.UserContext / null
}
</pre>

Expand Down

0 comments on commit 31f8627

Please sign in to comment.