HTML — 文書連列用の基盤

Infrastructure for sequences of documents


7.3. 文書~連列~用の基盤

この標準は、 文書~連列( `sequence of documents^en )を~group分けするために, いくつかの関係する概念を包含する。 規範的でない概略的な要約は: ◎ This standard contains several related concepts for grouping sequences of documents. As a brief, non-normative summary:

この標準は、 ほとんどにおいては,~navigableの文言で働くが、 ある種の~APIは,閲覧~文脈の切替nの存在を公開する — なので、 この標準は,一部においては閲覧~文脈の用語で働く必要がある。 ◎ Most of this standard works in the language of navigables, but certain APIs expose the existence of browsing context switches, and so some parts of the standard need to work in terms of browsing contexts.

7.3.2 閲覧~文脈

`閲覧~文脈@ ( `browsing context^en )は、 一連の文書の~program的な表現であり, 1 個の`~navigable$の中に複数個のそれが 住まい得る。 各`閲覧~文脈$には、 それに対応している `WindowProxy$I ~objがあり, 次に挙げるものも伴う: ◎ A browsing context is a programmatic representation of a series of documents, multiple of which can live within a single navigable. Each browsing context has a corresponding WindowProxy object, as well as the following:

【 [ まだ,この仕様の更新に倣うよう更新されていない他の仕様 ]から参照されている`閲覧~文脈$は、 実際には`~navigable$を意味している場合が多い — `下の記述@#warning-avoid-using-bcs$を見よ。 】

  • `開いた閲覧~文脈@bc ⇒ `閲覧~文脈$ / ~NULL — 初期~時は ~NULL とする。 ◎ An opener browsing context, a browsing context or null, initially null.
  • `作成時の~opener生成元@bc ⇒ `生成元$/~NULL — 初期~時は ~NULL とする。 ◎ An opener origin at creation, an origin or null, initially null.
  • `~popupか@bc ⇒ 真偽値 — 初期~時は ~F とする。 ◎ An is popup boolean, initially false.

    注記: この仕様における,`~popupか$bcによる義務的な影響iは、 関連な `BarProp$I ~objの `visible@~WINDOW#dom-barprop-visible$c 取得子にしかない。 しかしながら,~UAは、 `~UI考慮点@~HTMLlifecycle#nav-traversal-ui$用に それを利用することもあろう。 ◎ The only mandatory impact in this specification of is popup is on the visible getter of the relevant BarProp objects. However, user agents might also use it for user interface considerations.

  • `補助か@bc ⇒ 真偽値 — 初期~時は ~F とする。 ◎ An is auxiliary boolean, initially false.
  • `初期~URL@bc ⇒ `~URL$ / ~NULL — 初期~時は ~NULL とする。 ◎ An initial URL, a URL or null, initially null.
  • `~virtual閲覧~文脈~group~ID@bc ⇒ 整数 — 初期~時は 0 とする。 これは、 `非同一-生成元~opener施策の報告-法@~ORIGIN#coop-struct-report-only-value$に利用され, 報告のみの施策が施行されていた場合に起こる閲覧~文脈~groupの切替nを追跡し続ける。 ◎ A virtual browsing context group ID integer, initially 0. This is used by cross-origin opener policy reporting, to keep track of the browsing context group switches that would have happened if the report-only policy had been enforced.

所与の`閲覧~文脈$ %B に対しては、 次に挙げるものも定義される:

  • %B にて `作動中な~window@bc は、 %B の `WindowProxy$I ~objの `Window$sl 内部~slotの値である 【この~slotに保持される】。 ◎ A browsing context's active window is its WindowProxy object's [[Window]] internal slot value.\
  • %B にて `作動中な文書@bc は、 %B にて`作動中な~window$bcに`結付けられた文書$を指す。 ◎ A browsing context's active document is its active window's associated Document.
  • %B の `~top-level辿可能@bc は、 %B にて`作動中な文書$bcの`~node~navigable$の`~top-level辿可能$navを指す。 ◎ A browsing context's top-level traversable is its active document's node navigable's top-level traversable.

`補助~閲覧~文脈@ ( `auxiliary browsing context^en )とは、 `閲覧~文脈$のうち[ その`補助か$bc ~EQ ~T ]なるものをいう。 【それ以外の`閲覧~文脈$は、補助でない閲覧~文脈とも称される。】 補助~閲覧~文脈は、 常に`~top-level閲覧~文脈$である。 ◎ A browsing context whose is auxiliary is true is known as an auxiliary browsing context. Auxiliary browsing contexts are always top-level browsing contexts.

別々な[ `補助か$bcの概念 ]が必要yであるかどうかは、 明瞭でない。 `課題 #5680@~HTMLissue/5680$ にて、[ `開いた閲覧~文脈$bc ~EQ ~NULL ]かどうかを利用して,これを単純~化できそうなことが指示されている。 ◎ It's unclear whether a separate is auxiliary concept is necessary. In issue #5680, it is indicated that we may be able to simplify this by using whether or not the opener browsing context is null.

現代の仕様は、 ほとんどの事例では,`閲覧~文脈$の概念を利用するのを避けるべきである — [ `閲覧~文脈~groupの切替n@~ORIGIN#browsing-context-group-switches-due-to-cross-origin-opener-policy$/ `~agent~cluster~map$bcG ]の細部について処していない限り。 代わりに、[ `文書$, `~navigable$ ]の概念の方が通例的には適切になる。 ◎ Modern specifications should avoid using the browsing context concept in most cases, unless they are dealing with the subtleties of browsing context group switches and agent cluster allocation. Instead, the Document and navigable concepts are usually more appropriate.


所与の`文書$が `属する閲覧~文脈@ は、[ `閲覧~文脈$/~NULL ]であり, 初期~時は ~NULL とする。 ◎ A Document's browsing context is a browsing context or null, initially null.

注記: `文書$が`属する閲覧~文脈$は ~NULL になることもある。 特に,~data集析~toolは、 閲覧~文脈を~instance化することは,まずないであろう。 `createDocument()@https://dom.spec.whatwg.org/#dom-domimplementation-createdocument$c などの ~APIを利用して作成された`文書$が`属する閲覧~文脈$は、 必ず ~NULL になる。 また, `iframe$e 要素~用に作成された`文書$が`属する閲覧~文脈$は、 当の要素が後で`文書から除去された$ときには, `~NULL 化される@~HTMLlifecycle#destroy-a-document$。 ◎ A Document does not necessarily have a non-null browsing context. In particular, data mining tools are likely to never instantiate browsing contexts. A Document created using an API such as createDocument() never has a non-null browsing context. And the Document originally created for an iframe element, which has since been removed from the document, has no associated browsing context, since that browsing context was nulled out.

注記: 一般に,`~window$と[ `文書$のうち[ それが`属する閲覧~文脈$ ~NEQ ~NULL ]なるもの ]は一対一に対応するが、 1 つだけ例外がある: `~window$は,同じ`閲覧~文脈$内で 2 番目の`文書$を呈示するために再利用されることもあり、 その場合,対応関係は一対二になる。 【この一対二は,異なる時点も含めてのことであり、任意のある時点では,一意に対応する。】 これは、 `閲覧~文脈$を`初期~about_blank な文書$から別の文書へ`~navigate$するときに生じる — それは、 `replace$hH ~navi【!with replacement】として行われることになる。 ◎ In general, there is a 1-to-1 mapping from the Window object to the Document object, as long as the Document object has a non-null browsing context. There is one exception. A Window can be reused for the presentation of a second Document in the same browsing context, such that the mapping is then 1-to-2. This occurs when a browsing context is navigated from the initial about:blank Document to another, which will be done with replacement.

7.3.2.1. 閲覧~文脈の作成-法

`新たな閲覧~文脈と文書を作成する@ ときは、 所与の ( [ ~NULL/`文書$ ] %作成元, [ ~NULL/要素 ] %埋込元, `閲覧~文脈~group$ %~group ) に対し: ◎ To create a new browsing context and document, given null or a Document object creator, null or an element embedder, and a browsing context group group:

  1. %閲覧~文脈 ~LET 新たな`閲覧~文脈$ ◎ Let browsingContext be a new browsing context.
  2. %安全でない文脈~作成~時刻 ~LET `安全でない共有される現在の時刻$ ◎ Let unsafeContextCreationTime be the unsafe shared current time.
  3. %作成元の生成元 ~LET ~NULL ◎ Let creatorOrigin be null.
  4. %作成元の基底~URL ~LET ~NULL ◎ Let creatorBaseURL be null.
  5. ~IF[ %作成元 ~NEQ ~NULL ]: ◎ If creator is non-null, then:

    1. %作成元の生成元 ~SET %作成元 の`生成元$doc ◎ Set creatorOrigin to creator's origin.
    2. %作成元の基底~URL ~SET %作成元 の`文書~基底~URL$ ◎ Set creatorBaseURL to creator's document base URL.
    3. %閲覧~文脈 の`~virtual閲覧~文脈~group~ID$bc ~SET %作成元 が`属する閲覧~文脈$の`~top-level閲覧~文脈$bcの`~virtual閲覧~文脈~group~ID$bc ◎ Set browsingContext's virtual browsing context group ID to creator's browsing context's top-level browsing context's virtual browsing context group ID.
  6. %~sandbox~flag群 ~LET `作成時の~sandbox法~flag群を決定する$( %閲覧~文脈, %埋込元 ) ◎ Let sandboxFlags be the result of determining the creation sandboxing flags given browsingContext and embedder.
  7. %生成元 ~LET `生成元を決定する$( ↓ ) ⇒# `~about_blank$sc, %~sandbox~flag群, %作成元の生成元 ◎ Let origin be the result of determining the origin given about:blank, sandboxFlags, and creatorOrigin.
  8. %許可~施策 ~LET `~navigable用の許可~施策を作成する$( %埋込元, %生成元 ) `PERMISSIONSPOLICY$r ◎ Let permissionsPolicy be the result of creating a permissions policy given embedder and origin. [PERMISSIONSPOLICY]
  9. %~agent ~LET `生成元が類似な~window~agentを得する$( %生成元, %~group, ~F ) ◎ Let agent be the result of obtaining a similar-origin window agent given origin, group, and false.
  10. %~realm実行~文脈 ~LET 次のように~custom化する下で, %~agent 内で`新たな~realmを作成する$ ⇒# 大域~obj用に 新たな `Window$I ~objを作成する, 大域 `this^jv 束縛には %閲覧~文脈 の`WindowProxy$I ~objを利用する ◎ Let realm execution context be the result of creating a new realm given agent and the following customizations: • For the global object, create a new Window object. • For the global this binding, use browsingContext's WindowProxy object.
  11. %~top-level作成時の~URL ~LET %埋込元 に応じて ⇒# ~NULL ならば `~about_blank$sc / ~ELSE_ %埋込元 に`関連な設定群~obj$の`~top-level作成時の~URL$enV ◎ Let topLevelCreationURL be about:blank if embedder is null; otherwise embedder's relevant settings object's top-level creation URL.
  12. %~top-level生成元 ~LET %埋込元 に応じて ⇒# ~NULL ならば %生成元 / ~ELSE_ %埋込元 に`関連な設定群~obj$の`~top-level生成元$enV ◎ Let topLevelOrigin be origin if embedder is null; otherwise embedder's relevant settings object's top-level origin.
  13. %新たな設定群~obj ~LET `~window用に環境~設定群~objを設定しておく$( ↓ ) ⇒# `~about_blank$sc, %~realm実行~文脈, ~NULL, %~top-level作成時の~URL, %~top-level生成元 ◎ Set up a window environment settings object with about:blank, realm execution context, null, topLevelCreationURL, and topLevelOrigin.
  14. %~load計時~報 ~LET 新たな`文書~load計時~報$ — その ⇒# `~navi開始~時刻$ ~SET `時刻を粗化する$( %安全でない文脈~作成~時刻, %新たな設定群~obj の`非同一-生成元~能力は隔離されるか?$enV ) ◎ Let loadTimingInfo be a new document load timing info with its navigation start time set to the result of calling coarsen time with unsafeContextCreationTime and the new environment settings object's cross-origin isolated capability.
  15. %文書 ~LET 新たな`文書$ — その ⇒# `種別$doc ~SET `html^l, `内容~型$doc ~SET "`text/html$mt" `~mode$doc ~SET `quirks^l, `生成元$doc ~SET %生成元, `属する閲覧~文脈$ ~SET %閲覧~文脈, `許可~施策$doc ~SET %許可~施策, `作動中な~sandbox法~flag集合$ ~SET %~sandbox~flag群, `~load計時~報$doc ~SET %~load計時~報, `初期~about_blankか$doc ~SET ~T, `~about基底~URL$doc ~SET %作成元の基底~URL, `宣言的な~shadow根を許容するか$doc ~SET ~T ◎ Let document be a new Document, with: ◎ type • "html" content type • "text/html" mode • "quirks" origin • origin browsing context • browsingContext permissions policy • permissionsPolicy active sandboxing flag set • sandboxFlags load timing info • loadTimingInfo is initial about:blank • true about base URL • creatorBaseURL allow declarative shadow roots • true
  16. ~IF[ %作成元 ~NEQ ~NULL ]: ◎ If creator is non-null, then:

    1. %文書 の`~referrer$doc ~SET `~URLを直列化する$( %作成元 の`~URL$doc ) ◎ Set document's referrer to the serialization of creator's URL.
    2. %文書 の`施策~容器$doc ~SET `施策~容器を~cloneする$( %作成元 の`施策~容器$doc ) ◎ Set document's policy container to a clone of creator's policy container.
    3. ~IF[ %作成元 の`生成元$doc ~EQ`生成元$sub %作成元 に`関連な設定群~obj$の`~top-level生成元$enV ] ⇒ %文書 の`非同一-生成元~opener施策$doc ~SET %作成元 が`属する閲覧~文脈$の`~top-level閲覧~文脈$bcにて`作動中な文書$bcの`非同一-生成元~opener施策$doc ◎ If creator's origin is same origin with creator's relevant settings object's top-level origin, then set document's cross-origin opener policy to creator's browsing context's top-level browsing context's active document's cross-origin opener policy.
  17. ~Assert: %文書 の`~URL$doc, %文書 に`関連な設定群~obj$の`作成時の~URL$enV は、いずれも `~about_blank$sc 。 ◎ Assert: document's URL and document's relevant settings object's creation URL are about:blank.
  18. この時点で、 %文書 は`~load後~task準備済み$になるとする。 ◎ Mark document as ready for post-load tasks.
  19. `文書を~html-head-bodyで拡充する$( %文書 ) ◎ Populate with html/head/body given document.
  20. `文書を作動中にする$( %文書 ) ◎ Make active document.
  21. `読込ngを完全に終わらす$( %文書 ) ◎ Completely finish loading document.
  22. ~RET ( %閲覧~文脈, %文書 ) ◎ Return browsingContext and document.

`新たな~top-level閲覧~文脈と文書を作成する@ ときは: ◎ To create a new top-level browsing context and document:

  1. ( %~group, %文書 ) ~LET `新たな閲覧~文脈~groupと文書を作成する$() ◎ Let group and document be the result of creating a new browsing context group and document.
  2. ~RET ( %~group の`閲覧~文脈~集合$bcG[ 0 ], %文書 ) ◎ Return group's browsing context set[0] and document.

`新たな補助~閲覧~文脈と文書を作成する@ ときは、 所与の ( `閲覧~文脈$ %~opener ) に対し: ◎ To create a new auxiliary browsing context and document, given a browsing context opener:

  1. %~opener~top-level閲覧~文脈 ~LET %~opener の`~top-level辿可能$bcにて`作動中な閲覧~文脈$nav ◎ Let openerTopLevelBrowsingContext be opener's top-level traversable's active browsing context.
  2. %~group ~LET %~opener~top-level閲覧~文脈 の`~group$tbcG ◎ Let group be openerTopLevelBrowsingContext's group.
  3. ~Assert: %~group ~NEQ ~NULL — これ【この手続き?】は、 `~navigate$するとき直に呼出されるので。 ◎ Assert: group is non-null, as navigating invokes this directly.
  4. ( %閲覧~文脈, %文書 ) ~LET `新たな閲覧~文脈と文書を作成する$( %~opener にて`作動中な文書$nav, ~NULL, %~group ) ◎ Set browsingContext and document be the result of creating a new browsing context and document with opener's active document, null, and group.
  5. %閲覧~文脈 の`補助か$bc ~SET ~T ◎ Set browsingContext's is auxiliary to true.
  6. `閲覧~文脈~groupに付加する$( %閲覧~文脈, %~group ) ◎ Append browsingContext to group.
  7. %閲覧~文脈 を`開いた閲覧~文脈$bc ~SET %~opener ◎ Set browsingContext's opener browsing context to opener.
  8. %閲覧~文脈 の`~virtual閲覧~文脈~group~ID$bc ~SET %~opener~top-level閲覧~文脈 の`~virtual閲覧~文脈~group~ID$bc ◎ Set browsingContext's virtual browsing context group ID to openerTopLevelBrowsingContext's virtual browsing context group ID.
  9. %閲覧~文脈 の`作成時の~opener生成元$bc ~SET %~opener にて`作動中な文書$navの`生成元$doc ◎ Set browsingContext's opener origin at creation to opener's active document's origin.
  10. ~RET ( %閲覧~文脈, %文書 ) ◎ Return browsingContext and document.

`生成元を決定する@ ときは、 所与の ⇒# `~URL$ %~URL, `~sandbox法~flag集合$ %~sandbox~flag群, [ `生成元$/~NULL ] %~source生成元 ◎終 に対し: ◎ To determine the origin, given a URL url, a sandboxing flag set sandboxFlags, and an origin-or-null sourceOrigin:

  1. ~IF[ `閲覧~文脈~sandbox化( 生成元 )~flag$ ~IN %~sandbox~flag群 ] ⇒ ~RET 新たな`不透明な生成元$ ◎ If sandboxFlags has its sandboxed origin browsing context flag set, then return a new opaque origin.
  2. ~IF[ %~URL ~EQ ~NULL ] ⇒ ~RET 新たな`不透明な生成元$ ◎ If url is null, then return a new opaque origin.
  3. ~IF[ %~URL ~EQ `~about_srcdoc$sc ]: ◎ If url is about:srcdoc, then:

    1. ~Assert: %~source生成元 ~NEQ ~NULL ◎ Assert: sourceOrigin is non-null.
    2. ~RET %~source生成元 ◎ Return sourceOrigin.
  4. ~IF[ %~URL は`~about_blank に合致して$いる ]~AND[ %~source生成元 ~NEQ ~NULL ] ⇒ ~RET %~source生成元 ◎ If url matches about:blank and sourceOrigin is non-null, then return sourceOrigin.
  5. ~RET %~URL の`生成元$url ◎ Return url's origin.

注記: %~source生成元 を返す事例では、 2 つの`文書$の下層の`生成元$docは同じになり, `document.domain@~WINDOW#dom-document-domain$c は両者に影響することを意味する。 ◎ The cases that return sourceOrigin result in two Documents that end up with the same underlying origin, meaning that document.domain affects both.

7.3.2.2. 関係する閲覧~文脈たち

`閲覧~文脈$ %A が閲覧~文脈 %B の `先祖~閲覧~文脈@ であるとは、 次の~algoが ~T を返すことをいう: ◎ A browsing context potentialDescendant is said to be an ancestor of a browsing context potentialAncestor if the following algorithm returns true:

  1. %文書 ~LET %A にて`作動中な文書$bc ◎ Let potentialDescendantDocument be potentialDescendant's active document.
  2. ~IF[ %文書 は`全部的に作動中$でない ] ⇒ ~RET ~F ◎ If potentialDescendantDocument is not fully active, then return false.
  3. %文書 の`先祖~navigable群$を成す ~EACH( %~navigable ) に対し ⇒ ~IF[ %B ~EQ %~navigable にて`作動中な文書$navが`属する閲覧~文脈$ ] ⇒ ~RET ~T ◎ Let ancestorBCs be the list obtained by taking the browsing context of the active document of each member of potentialDescendantDocument's ancestor navigables. ◎ If ancestorBCs contains potentialAncestor, then return true.
  4. ~RET ~F ◎ Return false.

`~top-level閲覧~文脈@ とは、 次を満たす`閲覧~文脈$である ⇒ `作動中な文書$bcの`~node~navigable$は、 `辿可能な~navigable$である ◎ A top-level browsing context is a browsing context whose active document's node navigable is a traversable navigable.

注記: `~top-level辿可能$になることは、 `要求されない^em。 ◎ It is not required to be a top-level traversable.

`閲覧~文脈$ %B の `~top-level閲覧~文脈@bc は、 次を走らせた結果になる: ◎ The top-level browsing context of a browsing context start is the result of the following algorithm:

  1. ~IF[ %B にて`作動中な文書$bcは`全部的に作動中$でない ] ⇒ ~RET ~NULL ◎ If start's active document is not fully active, then return null.
  2. %~navigable ~LET %B にて`作動中な文書$bcの`~node~navigable$ ◎ Let navigable be start's active document's node navigable.
  3. ~WHILE[ %~navigable の`親$nav ~NEQ ~NULL ] ⇒ %~navigable ~SET %~navigable の`親$nav ◎ While navigable's parent is not null, set navigable to navigable's parent.
  4. ~RET %~navigable にて`作動中な閲覧~文脈$nav ◎ Return navigable's active browsing context.

所与の`閲覧~文脈$ %A, %B に対し, %A は %B に `近しい@ ( “ %A `is familiar with^en %B ” )とは、 ~OR↓ が満たされることを意味する: ◎ A browsing context A is familiar with a second browsing context B if the following algorithm returns true:

  • %A にて`作動中な文書$bcの`生成元$doc ~EQ`生成元$sub %B にて`作動中な文書$bcの`生成元$doc ◎ If A's active document's origin is same origin with B's active document's origin, then return true.
  • %A の`~top-level閲覧~文脈$bc ~EQ %B ◎ If A's top-level browsing context is B, then return true.
  • [ %B は`補助~閲覧~文脈$である ]~AND[ %A は %B を`開いた閲覧~文脈$bcに`近しい$ ] ◎ If B is an auxiliary browsing context and A is familiar with B's opener browsing context, then return true.
  • %B の ある`先祖~閲覧~文脈$ %C として,次を満たすものが存在する ⇒ %C にて`作動中な文書$bcの`生成元$doc ~EQ`生成元$sub %A にて`作動中な文書$bcの`生成元$doc ◎ If there exists an ancestor browsing context of B whose active document has the same origin as the active document of A, then return true.

    注記: これは %A は %B の`先祖~閲覧~文脈$である事例を含む。 ◎ This includes the case where A is an ancestor browsing context of B. ◎ Return false.

7.3.2.3. 閲覧~文脈の~group分け

各`~top-level閲覧~文脈$には `~group@tbcG が結付けられる — それは、[ ~NULL /`閲覧~文脈~group$ ]であり,初期~時は ~NULL とする。 ◎ A top-level browsing context has an associated group (null or a browsing context group). It is initially null.

~UAは、 `閲覧~文脈~group集合@ を保持する — それは、 0 個以上の`閲覧~文脈~group$からなる`集合$である。 ◎ A user agent holds a browsing context group set\ (a set of browsing context groups).

各 `閲覧~文脈~group@ には、 次に挙げるものが結付けられる: ◎ ↓

  • `閲覧~文脈~集合@bcG ⇒ 0 個以上の`~top-level閲覧~文脈$からなる`集合$。 ◎ A browsing context group holds a browsing context set\ (a set of top-level browsing contexts).

    注記: `新たな閲覧~文脈~groupと文書を作成する$ときには、 新たな【!ある】`~top-level閲覧~文脈$が当の`閲覧~文脈~group$に追加される。 後続して`閲覧~文脈~group$に追加される`~top-level閲覧~文脈$は、 すべて`補助~閲覧~文脈$である。 ◎ A top-level browsing context is added to the group when the group is created. All subsequent top-level browsing contexts added to the group will be auxiliary browsing contexts.

  • `~agent~cluster~map@bcG ⇒ `~agent~cluster~key$から`~agent~cluster$への弱い`~map$。 【 “弱い” とは,すなわち、】[ ある~agent~clusterに対し,それに~accessし得るものは無くなった ]と判断されるとき,それを【~garbage】収集するのは、 ~UAの責務とする。 ◎ A browsing context group has an associated agent cluster map\ (a weak map of agent cluster keys to agent clusters). User agents are responsible for collecting agent clusters when it is deemed that nothing can access them anymore.
  • `履歴上の~agent~cluster~key~map@bcG ⇒ `生成元$から`~agent~cluster~key$への`~map$。 この~mapは、[ 所与の生成元~用に,それまで どの~agent~cluster~keyが利用されていたか ]を記録することにより, `生成元を~keyにする~agent~cluster@~ORIGIN#origin-keyed-agent-clusters$ 特能の一貫性を確保するために利用される。 ◎ A browsing context group has an associated historical agent cluster key map,\ which is a map of origins to agent cluster keys. This map is used to ensure the consistency of the origin-keyed agent clusters feature by recording what agent cluster keys were previously used for a given origin.

    注記 `履歴上の~agent~cluster~key~map$bcGを成す~entryは、 当の`閲覧~文脈~group$の存続期間~内に得られたものに限られる。 ◎ The historical agent cluster key map only ever gains entries over the lifetime of the browsing context group.

  • `非同一-生成元~隔離~mode@bcG ⇒ `非同一-生成元~隔離~mode$ — 初期~時は `none$coI とする。 ◎ A browsing context group has a cross-origin isolation mode,\ which is a cross-origin isolation mode. It is initially "none".

`非同一-生成元~隔離~mode@ にアリな値は ⇒# `none@coI, `logical@coI, `concrete@coI ◎ A cross-origin isolation mode is one of three possible values: "none", "logical", or "concrete".

注記: `logical$coI, `concrete$coI は、 類似する。 どちらも, ~AND↓ を満たす`閲覧~文脈~group$用に利用される: ◎ "logical" and "concrete" are similar. They are both used for browsing context groups where:

  • それを成すどの~top-level`文書$にも次が伴われる ⇒ `same-origin$coop を値にとる `Cross-Origin-Opener-Policy$h ~header ◎ every top-level Document has `Cross-Origin-Opener-Policy: same-origin`, and
  • それを成すどの`文書$にも次が伴われる ⇒ `非同一-生成元~隔離と互換$な値をとる `Cross-Origin-Embedder-Policy$h ~header ◎ every Document has a `Cross-Origin-Embedder-Policy` header whose value is compatible with cross-origin isolation.

[ `非同一-生成元~能力は隔離されるか?$enVにより通過制御される~APIに対し,安全な~accessを是認する ]ために要求される~securityの特質を供するのが困難な~platformもある。 そのため、 その【~APIが供する】能力 %能力 への~accessを是認できるのは, `concrete$coI に限られる。 `logical$coI は、 %能力 【への安全な~access】を~supportしていない~platformにて利用される — そこでも,非同一-生成元~隔離により課される様々な制約は適用されるが、 %能力 は是認されない。 ◎ On some platforms, it is difficult to provide the security properties required to grant safe access to the APIs gated by the cross-origin isolated capability. As a result, only "concrete" can grant access that capability. "logical" is used on platform not supporting this capability, where various restrictions imposed by cross-origin isolation will still apply, but the capability is not granted.

`新たな閲覧~文脈~groupと文書を作成する@ ときは: ◎ To create a new browsing context group and document:

  1. %~group ~LET 新たな`閲覧~文脈~group$ ◎ Let group be a new browsing context group.
  2. ~UAの`閲覧~文脈~group集合$に %~group を`付加する$set ◎ Append group to the user agent's browsing context group set.
  3. ( %閲覧~文脈, %文書 ) ~LET `新たな閲覧~文脈と文書を作成する$( ~NULL, ~NULL, %~group ) ◎ Let browsingContext and document be the result of creating a new browsing context and document with null, null, and group.
  4. `閲覧~文脈~groupに付加する$( %閲覧~文脈, %~group ) ◎ Append browsingContext to group.
  5. ~RET ( %~group, %文書 ) ◎ Return group and document.

`閲覧~文脈~groupに付加する@ ときは、 所与の ( `~top-level閲覧~文脈$ %閲覧~文脈, `閲覧~文脈~group$ %~group ) に対し: ◎ To append a top-level browsing context browsingContext to a browsing context group group:

  1. %~group の`閲覧~文脈~集合$bcGに %閲覧~文脈 を`付加する$set ◎ Append browsingContext to group's browsing context set.
  2. %閲覧~文脈 の`~group$tbcG ~SET %~group ◎ Set browsingContext's group to group.

`閲覧~文脈~groupから除去する@ ときは、 所与の ( `~top-level閲覧~文脈$ %閲覧~文脈 ) に対し: ◎ To remove a top-level browsing context browsingContext:

  1. ~Assert: %閲覧~文脈 の`~group$tbcG ~NEQ ~NULL ◎ Assert: browsingContext's group is non-null.
  2. %~group ~LET %閲覧~文脈 の`~group$tbcG ◎ Let group be browsingContext's group.
  3. %閲覧~文脈 の`~group$tbcG ~SET ~NULL ◎ Set browsingContext's group to null.
  4. %~group の`閲覧~文脈~集合$bcGから %閲覧~文脈 を`除去する$ ◎ Remove browsingContext from group's browsing context set.
  5. ~IF[ %~group の`閲覧~文脈~集合$bcGは`空$である ] ⇒ ~UAの`閲覧~文脈~group集合$から %~group を`除去する$ ◎ If group's browsing context set is empty, then remove group from the user agent's browsing context group set.

注記: [ `閲覧~文脈~groupに付加する$/ `閲覧~文脈~groupから除去する$ ]は、 `閲覧~文脈~group$の存続期間を定義し易くするための,~primitiveな演算である。 それらは、[ `文書$, `閲覧~文脈$ ]用の より高~levelな[ 作成/破壊 ]演算から~callされる。 ◎ Append and remove are primitive operations that help define the lifetime of a browsing context group. They are called by higher-level creation and destruction operations for Documents and browsing contexts.

所与の`閲覧~文脈$ %B に対し,[ %B に`属する文書@#concept-document-bc$は無くなった ](すなわち, そのような`文書$は,すべて`破壊された@#destroy-a-document$)かつ[ %B の `WindowProxy$I は~garbage収集~用に適格になった ]とき、 %B が再び~accessされることは決してなくなる。 %B が`~top-level閲覧~文脈$である場合、 その時点で ~UAは %B を`閲覧~文脈~groupから除去する$モノトスル。 ◎ When there are no Document objects whose browsing context equals a given browsing context (i.e., all such Documents have been destroyed), and that browsing context's WindowProxy is eligible for garbage collection, then the browsing context will never be accessed again. If it is a top-level browsing context, then at this point the user agent must remove it.

7.3.3 全部的に作動中な文書

`文書$ %文書 が `全部的に作動中@ ( `fully active^en )であるとは、 次を満たす`~navigable$ %~navigable が在ることをいう ⇒ [ %文書 ~EQ %~navigable にて`作動中な文書$nav ]~AND[[ %~navigable は`~top-level辿可能$である ]~OR[ %~navigable の`容器~文書$navは`全部的に作動中$である ]] ◎ A Document d is said to be fully active when d is the active document of a navigable navigable, and either navigable is a top-level traversable or navigable's container document is fully active.

`子~navigable$ %子 は, ある要素に結付けられるので、 %子 は, 常に — %子 の`親$nav内で — 特定の`文書$ — すなわち %子 の`容器~文書$nav — に束ねられる。 ~UAは、 %子 の`容器~文書$navが`全部的に作動中$でない間は, 利用者が %子 とヤリトリするのを許容しないモノトスル。 ◎ Because they are associated with an element, child navigables are always tied to a specific Document, their container document, in their parent navigable. User agents must not allow the user to interact with child navigables whose container documents are not themselves fully active.

`文書$は、 その`~node~navigable$にて`作動中な文書$navでありながら, `全部的に作動中$でなくなることもある — そうなり得る様子を次の例で~~説明する。 ここでは、 ~browser~windowの中に `a.html^c が読込まれる結果, その `iframe$e の中に `b-1.html^c が読込まれる。 `b-2.html^c, `c.html^c は省略されている (それらは、単純に空な文書でもよい)。 ◎ The following example illustrates how a Document can be the active document of its node navigable, while not being fully active. Here a.html is loaded into a browser window, b-1.html starts out loaded into an iframe as shown, and b-2.html and c.html are omitted (they can simply be an empty document).

<!-- a.html -->
<!DOCTYPE html>
<html lang="en">
<title>~navigable A</title>

<iframe src="b-1.html"></iframe>
<button onclick="frames[0].location.href = 'b-2.html'">~clickしてください</button>

<!-- b-1.html -->
<!DOCTYPE html>
<html lang="en">
<title>~navigable B</title>

<iframe src="c.html"></iframe>

この時点では、[ `a.html^c, `b-1.html^c, `c.html^c ]から与えられる文書は、 どれも各自の`~node~navigable$にて`作動中な文書$navであり,また`全部的に作動中$でもある。 ◎ At this point, the documents given by a.html, b-1.html, and c.html are all the active documents of their respective node navigables. They are also all fully active.

ここで `button$e が~clickされたとすると、 ~navigable B の中へ `b-2.html^c から新たな`文書$が読込まれ,次の結果が得られる: ◎ After clicking on the button, and thus loading a new Document from b-2.html into navigable B, we have the following results:

  • `a.html^c `文書$は、 ~navigable A にて`作動中な文書$navかつ`全部的に作動中$であり続ける。 ◎ The a.html Document remains both the active document of navigable A, and fully active.
  • `b-1.html^c `文書$は、 今や~navigable B にて`作動中な文書$nav`ではない^em — よって、 `全部的に作動中$でもない。 ◎ The b-1.html Document is now not the active document of navigable B. As such it is also not fully active.
  • 新たな `b-2.html^c `文書$は、 今や~navigable B にて`作動中な文書$navにあり,また`全部的に作動中$でもある。 ◎ The new b-2.html Document is now the active document of navigable B, and is also fully active.
  • `c.html^c `文書$は、 依然として,~navigable C にて`作動中な文書$navである。 しかしながら、 C の`容器~文書$navは `b-1.html^c `文書$であり,`全部的に作動中$ではない — すなわち、 `c.html^c `文書$は,今や`全部的に作動中$でないことになる。 ◎ The c.html Document is still the active document of navigable C. However, since C's container document is the b-1.html Document, which is itself not fully active, this means the c.html Document is now not fully active.