Skip to content

Commit

Permalink
[] (0) Rework some of the definitions in the Browsing Contexts sectio…
Browse files Browse the repository at this point in the history
…n to be clearer and better defined.

git-svn-id: http://svn.whatwg.org/webapps@747 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Apr 17, 2007
1 parent cbc93fe commit 543cca9
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 44 deletions.
58 changes: 33 additions & 25 deletions index
Original file line number Diff line number Diff line change
Expand Up @@ -22597,12 +22597,14 @@ XXX selection ranges -->
elements) can instantiate further <a href="#browsing0" title="browsing
context">browsing contexts</a>. These are called <dfn id=nested0
title="nested browsing context">nested browsing contexts</dfn>. If a
browsing context <var title="">A</var> has an element in one of its
<code>Document</code>s that nests another browsing context <var
title="">B</var> inside it, then <var title="">A</var> is said to be the
<dfn id=parent>parent browsing context</dfn> of <var title="">B</var>, and
<var title="">B</var> is said to be a <dfn id=child>child browsing
context</dfn> of <var title="">A</var>.
browsing context <var title="">P</var> has an element in one of its
<code>Document</code>s <var title="">D</var> that nests another browsing
context <var title="">C</var> inside it, then <var title="">P</var> is
said to be the <dfn id=parent>parent browsing context</dfn> of <var
title="">C</var>, <var title="">C</var> is said to be a <dfn
id=child>child browsing context</dfn> of <var title="">P</var>, and <var
title="">C</var> is said to be <dfn id=nested1 title="browsing context
nested through">nested through</dfn> <var title="">D</var>.

<p>The browsing context with no <a href="#parent">parent browsing
context</a> is the <dfn id=top-level>top-level browsing context</dfn> of
Expand All @@ -22613,11 +22615,11 @@ XXX selection ranges -->
<p>A <code>Document</code> is said to be <dfn id=fully>fully active</dfn>
when it is the <a href="#active">active document</a> of its <a
href="#browsing0">browsing context</a>, and either its browsing context is
a <a href="#top-level">top-level browsing context</a>, or its browsing
context's <a href="#parent">parent browsing context</a>'s <a
href="#active">active document</a> is the <code>Document</code> that
contains the browsing context in question and that <code>Document</code>
is itself <a href="#fully">fully active</a>.
a <a href="#top-level">top-level browsing context</a>, or the
<code>Document</code> <a href="#nested1" title="browsing context nested
through">through which</a> that browsing context is <a href="#nested0"
title="nested browsing context">nested</a> is itself <a
href="#fully">fully active</a>.

<p>Because they are nested through an element, <a href="#child"
title="child browsing context">child browsing contexts</a> are always tied
Expand Down Expand Up @@ -22655,6 +22657,8 @@ XXX selection ranges -->

<h4 id=browsing><span class=secno>4.1.3. </span>Browsing context names</h4>

<p>Browsing contexts can be named.

<p>A <dfn id=valid8>valid browsing context name</dfn> is any string that
does not start with a U+005F LOW LINE character, or, a string that
case-insensitively <!-- ASCII --> matches one of: <code
Expand All @@ -22663,32 +22667,36 @@ XXX selection ranges -->
with an underscore are reserved for special keywords.)

<p><dfn id=the-rules>The rules for chosing a browsing context given a
browsing context name</dfn> are as follows:
browsing context name</dfn> are as follows. The rules assume that they are
being applied in the context of a <a href="#browsing0">browsing
context</a>.

<ol>
<li>If the given browsing context name is the empty string or <code
title="">_self</code>, then the chosen browsing context must be the
current one.

<li>If the given browsing context name is <code title="">_parent</code>,
then the chosen browsing context must be the <em>parent</em> browsing
context of the current one.
then the chosen browsing context must be the <a
href="#parent"><em>parent</em> browsing context</a> of the current one.

<li>If the given browsing context name is <code title="">_top</code>, then
the chosen browsing context must be the most removed ancestor browsing
context of the current one.
the chosen browsing context must be the most <a
href="#top-level">top-level browsing context</a> of the current one.

<li>If the given browsing context name is not <code title="">_blank</code>
and there exists a browsing context whose <span title="browsing context
name">name</span> is the same as the given browsing context name, and
that browsing context's <a href="#domain0">document's domain</a> is the
same as the current browsing context's <a href="#domain0">document's
domain</a>, and the user agent determines that the two browsing contexts
are related enough that it is ok if they reach each other, then that
browsing context should be the chosen one. If there are multiple matching
browsing contexts, the user agent should select one in some arbitrary
consistent manner, such as the most recently opened, or most recently
focused.
name">name</span> is the same as the given browsing context name, and the
<a href="#domain0">document's domain</a> of that browsing context's <a
href="#active">active document</a> is the same as the <a
href="#domain0">document's domain</a> of the current browsing context's
<a href="#active">active document</a>, and the user agent determines that
the two browsing contexts are related enough that it is ok if they reach
each other, then that browsing context should be the chosen one. If there
are multiple matching browsing contexts, the user agent should select one
in some arbitrary consistent manner, such as the most recently opened,
most recently focused, or more closely related.</li>
<!-- XXX allow popup blocking. define the opener. -->

<li>Otherwise, the chosen browsing context must be a new auxillary
browsing context. If the given browsing context name is not <code
Expand Down
46 changes: 27 additions & 19 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -20215,12 +20215,14 @@ XXX selection ranges -->
instantiate further <span title="browsing context">browsing
contexts</span>. These are called <dfn title="nested browsing
context">nested browsing contexts</dfn>. If a browsing context <var
title="">A</var> has an element in one of its <code>Document</code>s
that nests another browsing context <var title="">B</var> inside it,
then <var title="">A</var> is said to be the <dfn>parent browsing
context</dfn> of <var title="">B</var>, and <var title="">B</var> is
said to be a <dfn>child browsing context</dfn> of <var
title="">A</var>.</p>
title="">P</var> has an element in one of its <code>Document</code>s
<var title="">D</var> that nests another browsing context <var
title="">C</var> inside it, then <var title="">P</var> is said to be
the <dfn>parent browsing context</dfn> of <var title="">C</var>,
<var title="">C</var> is said to be a <dfn>child browsing
context</dfn> of <var title="">P</var>, and <var title="">C</var> is
said to be <dfn title="browsing context nested through">nested
through</dfn> <var title="">D</var>.</p>

<p>The browsing context with no <span>parent browsing context</span>
is the <dfn>top-level browsing context</dfn> of all the browsing
Expand All @@ -20231,11 +20233,10 @@ XXX selection ranges -->
<p>A <code>Document</code> is said to be <dfn>fully active</dfn>
when it is the <span>active document</span> of its <span>browsing
context</span>, and either its browsing context is a <span>top-level
browsing context</span>, or its browsing context's <span>parent
browsing context</span>'s <span>active document</span> is the
<code>Document</code> that contains the browsing context in question
and that <code>Document</code> is itself <span>fully
active</span>.</p>
browsing context</span>, or the <code>Document</code> <span
title="browsing context nested through">through which</span> that
browsing context is <span title="nested browsing
context">nested</span> is itself <span>fully active</span>.</p>

<p>Because they are nested through an element, <span title="child
browsing context">child browsing contexts</span> are always tied to
Expand Down Expand Up @@ -20274,6 +20275,8 @@ XXX selection ranges -->

<h4>Browsing context names</h4>

<p>Browsing contexts can be named.</p>

<p>A <dfn>valid browsing context name</dfn> is any string that does
not start with a U+005F LOW LINE character, or, a string that
case-insensitively <!-- ASCII --> matches one of: <code
Expand All @@ -20282,7 +20285,8 @@ XXX selection ranges -->
starting with an underscore are reserved for special keywords.)</p>

<p><dfn>The rules for chosing a browsing context given a browsing
context name</dfn> are as follows:</p>
context name</dfn> are as follows. The rules assume that they are
being applied in the context of a <span>browsing context</span>.</p>

<ol>

Expand All @@ -20292,25 +20296,29 @@ XXX selection ranges -->

<li>If the given browsing context name is <code
title="">_parent</code>, then the chosen browsing context must be
the <em>parent</em> browsing context of the current one.</li>
the <span><em>parent</em> browsing context</span> of the current
one.</li>

<li>If the given browsing context name is <code
title="">_top</code>, then the chosen browsing context must be the
most removed ancestor browsing context of the current one.</li>
most <span>top-level browsing context</span> of the current
one.</li>

<li>If the given browsing context name is not <code
title="">_blank</code> and there exists a browsing context whose
<span title="browsing context name">name</span> is the same as the
given browsing context name, and that browsing context's
<span>document's domain</span> is the same as the current browsing
context's <span>document's domain</span>, and the user agent
given browsing context name, and the <span>document's domain</span>
of that browsing context's <span>active document</span> is the same
as the <span>document's domain</span> of the current browsing
context's <span>active document</span>, and the user agent
determines that the two browsing contexts are related enough that
it is ok if they reach each other, then that browsing context
should be the chosen one. If there are multiple matching browsing
contexts, the user agent should select one in some arbitrary
consistent manner, such as the most recently opened, or most
recently focused.</li>
consistent manner, such as the most recently opened, most
recently focused, or more closely related.</li>

<!-- XXX allow popup blocking. define the opener. -->
<li>Otherwise, the chosen browsing context must be a new auxillary
browsing context. If the given browsing context name is not <code
title="">_blank</code>, then the new auxillary browsing context's
Expand Down

0 comments on commit 543cca9

Please sign in to comment.