Skip to content

Commit

Permalink
[e] (0) Fix the focusing-related parts of the spec to handle orphaned…
Browse files Browse the repository at this point in the history
… nested browsing contexts

git-svn-id: http://svn.whatwg.org/webapps@5702 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Dec 7, 2010
1 parent c00d539 commit 542a44a
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 16 deletions.
30 changes: 24 additions & 6 deletions complete.html
Expand Up @@ -214,7 +214,7 @@

<header class=head id=head><p><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
<hgroup><h1>Web Applications 1.0</h1>
<h2 class="no-num no-toc">Draft Standard &mdash; 4 December 2010</h2>
<h2 class="no-num no-toc">Draft Standard &mdash; 7 December 2010</h2>
</hgroup><p>You can take part in this work. <a href=http://www.whatwg.org/mailing-list>Join the working group's discussion list.</a></p>
<p><strong>Web designers!</strong> We have a <a href=http://blog.whatwg.org/faq/>FAQ</a>, a <a href=http://forums.whatwg.org/>forum</a>, and a <a href=http://www.whatwg.org/mailing-list#help>help mailing list</a> for you!</p>
<!--<p class="impl"><strong>Implementors!</strong> We have a <a href="http://www.whatwg.org/mailing-list#implementors">mailing list</a> for you too!</p>-->
Expand Down Expand Up @@ -46562,6 +46562,14 @@ <h5 id=autofocusing-a-form-control><span class=secno>4.10.19.4 </span>Autofocusi
<ol><li><p>Let <var title="">target</var> be the element's
<code><a href=#document>Document</a></code>.</li>

<li><p>Let <var title="">target</var> has no <a href=#browsing-context>browsing
context</a>, abort these steps.</li>

<li><p>Let <var title="">target</var>'s <a href=#browsing-context>browsing
context</a> has no <a href=#top-level-browsing-context>top-level browsing context</a> (e.g.
it is a <a href=#nested-browsing-context>nested browsing context</a> with no <a href=#parent-browsing-context>parent
browsing context</a>), abort these steps.</li>

<li><p>If <var title="">target</var>'s <a href=#browsing-context>browsing
context</a> had the <a href=#sandboxed-automatic-features-browsing-context-flag>sandboxed automatic features browsing
context flag</a> set when <var title="">target</var> was
Expand Down Expand Up @@ -65512,7 +65520,14 @@ <h4 id=focus-management><span class=secno>8.3.2 </span>Focus management</h4>

<hr><p>The <dfn id=focusing-steps>focusing steps</dfn> are as follows:</p>

<ol><li><p>If focusing the element will remove the focus from another
<ol><li><p>If the element is not <a href=#in-a-document title="in a Document">in a
<code>Document</code></a>, or if the element's
<code><a href=#document>Document</a></code> has no <a href=#browsing-context>browsing context</a>, or if
the element's <code><a href=#document>Document</a></code>' <a href=#browsing-context>browsing context</a>
has no <a href=#top-level-browsing-context>top-level browsing context</a>, then abort these
steps.</p>

<li><p>If focusing the element will remove the focus from another
element, then run the <a href=#unfocusing-steps>unfocusing steps</a> for that
element.</li>

Expand Down Expand Up @@ -65611,10 +65626,13 @@ <h4 id=document-level-focus-apis><span class=secno>8.3.3 </span>Document-level f

<p>The <dfn id=dom-document-hasfocus title=dom-document-hasFocus><code>hasFocus()</code></dfn> method
on <code><a href=#htmldocument>HTMLDocument</a></code> objects must return true if the
document's <a href=#browsing-context>browsing context</a> is focused, and all its
<a href=#ancestor-browsing-context title="ancestor browsing context">ancestor browsing
contexts</a> are also focused, and the <a href=#top-level-browsing-context>top-level browsing
context</a> has the <i>system focus</i>.</p>
<code><a href=#document>Document</a></code>'s <a href=#browsing-context>browsing context</a> is focused,
and all its <a href=#ancestor-browsing-context title="ancestor browsing context">ancestor
browsing contexts</a> are also focused, and the <a href=#top-level-browsing-context>top-level
browsing context</a> has the <i>system focus</i>. If the
<code><a href=#document>Document</a></code> has no <a href=#browsing-context>browsing context</a> or if its
<a href=#browsing-context>browsing context</a> has no <a href=#top-level-browsing-context>top-level browsing
context</a>, then the method will always return false.</p>

<p>The <dfn id=dom-window-focus title=dom-window-focus><code>focus()</code></dfn>
method on the <code><a href=#window>Window</a></code> object, when invoked, provides a
Expand Down
30 changes: 24 additions & 6 deletions index
Expand Up @@ -218,7 +218,7 @@

<header class=head id=head><p><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
<hgroup><h1>HTML5 (including next generation additions still in development)</h1>
<h2 class="no-num no-toc">Draft Standard &mdash; 4 December 2010</h2>
<h2 class="no-num no-toc">Draft Standard &mdash; 7 December 2010</h2>
</hgroup><p>You can take part in this work. <a href=http://www.whatwg.org/mailing-list>Join the working group's discussion list.</a></p>
<p><strong>Web designers!</strong> We have a <a href=http://blog.whatwg.org/faq/>FAQ</a>, a <a href=http://forums.whatwg.org/>forum</a>, and a <a href=http://www.whatwg.org/mailing-list#help>help mailing list</a> for you!</p>
<!--<p class="impl"><strong>Implementors!</strong> We have a <a href="http://www.whatwg.org/mailing-list#implementors">mailing list</a> for you too!</p>-->
Expand Down Expand Up @@ -46543,6 +46543,14 @@ out of 233&thinsp;257&thinsp;824 bytes available&lt;/meter&gt;&lt;/p&gt;</pre>
<ol><li><p>Let <var title="">target</var> be the element's
<code><a href=#document>Document</a></code>.</li>

<li><p>Let <var title="">target</var> has no <a href=#browsing-context>browsing
context</a>, abort these steps.</li>

<li><p>Let <var title="">target</var>'s <a href=#browsing-context>browsing
context</a> has no <a href=#top-level-browsing-context>top-level browsing context</a> (e.g.
it is a <a href=#nested-browsing-context>nested browsing context</a> with no <a href=#parent-browsing-context>parent
browsing context</a>), abort these steps.</li>

<li><p>If <var title="">target</var>'s <a href=#browsing-context>browsing
context</a> had the <a href=#sandboxed-automatic-features-browsing-context-flag>sandboxed automatic features browsing
context flag</a> set when <var title="">target</var> was
Expand Down Expand Up @@ -65519,7 +65527,14 @@ interface <dfn id=navigatorabilities>NavigatorAbilities</dfn> {

<hr><p>The <dfn id=focusing-steps>focusing steps</dfn> are as follows:</p>

<ol><li><p>If focusing the element will remove the focus from another
<ol><li><p>If the element is not <a href=#in-a-document title="in a Document">in a
<code>Document</code></a>, or if the element's
<code><a href=#document>Document</a></code> has no <a href=#browsing-context>browsing context</a>, or if
the element's <code><a href=#document>Document</a></code>' <a href=#browsing-context>browsing context</a>
has no <a href=#top-level-browsing-context>top-level browsing context</a>, then abort these
steps.</p>

<li><p>If focusing the element will remove the focus from another
element, then run the <a href=#unfocusing-steps>unfocusing steps</a> for that
element.</li>

Expand Down Expand Up @@ -65618,10 +65633,13 @@ interface <dfn id=navigatorabilities>NavigatorAbilities</dfn> {

<p>The <dfn id=dom-document-hasfocus title=dom-document-hasFocus><code>hasFocus()</code></dfn> method
on <code><a href=#htmldocument>HTMLDocument</a></code> objects must return true if the
document's <a href=#browsing-context>browsing context</a> is focused, and all its
<a href=#ancestor-browsing-context title="ancestor browsing context">ancestor browsing
contexts</a> are also focused, and the <a href=#top-level-browsing-context>top-level browsing
context</a> has the <i>system focus</i>.</p>
<code><a href=#document>Document</a></code>'s <a href=#browsing-context>browsing context</a> is focused,
and all its <a href=#ancestor-browsing-context title="ancestor browsing context">ancestor
browsing contexts</a> are also focused, and the <a href=#top-level-browsing-context>top-level
browsing context</a> has the <i>system focus</i>. If the
<code><a href=#document>Document</a></code> has no <a href=#browsing-context>browsing context</a> or if its
<a href=#browsing-context>browsing context</a> has no <a href=#top-level-browsing-context>top-level browsing
context</a>, then the method will always return false.</p>

<p>The <dfn id=dom-window-focus title=dom-window-focus><code>focus()</code></dfn>
method on the <code><a href=#window>Window</a></code> object, when invoked, provides a
Expand Down
26 changes: 22 additions & 4 deletions source
Expand Up @@ -52228,6 +52228,14 @@ out of 233&#x2009;257&#x2009;824 bytes available&lt;/meter>&lt;/p></pre>
<li><p>Let <var title="">target</var> be the element's
<code>Document</code>.</p></li>

<li><p>Let <var title="">target</var> has no <span>browsing
context</span>, abort these steps.</p></li>

<li><p>Let <var title="">target</var>'s <span>browsing
context</span> has no <span>top-level browsing context</span> (e.g.
it is a <span>nested browsing context</span> with no <span>parent
browsing context</span>), abort these steps.</p></li>

<li><p>If <var title="">target</var>'s <span>browsing
context</span> had the <span>sandboxed automatic features browsing
context flag</span> set when <var title="">target</var> was
Expand Down Expand Up @@ -74618,6 +74626,13 @@ interface <dfn>NavigatorAbilities</dfn> {

<ol>

<li><p>If the element is not <span title="in a Document">in a
<code>Document</code></span>, or if the element's
<code>Document</code> has no <span>browsing context</span>, or if
the element's <code>Document</code>' <span>browsing context</span>
has no <span>top-level browsing context</span>, then abort these
steps.</p>

<li><p>If focusing the element will remove the focus from another
element, then run the <span>unfocusing steps</span> for that
element.</p></li>
Expand Down Expand Up @@ -74737,10 +74752,13 @@ interface <dfn>NavigatorAbilities</dfn> {
<p>The <dfn
title="dom-document-hasFocus"><code>hasFocus()</code></dfn> method
on <code>HTMLDocument</code> objects must return true if the
document's <span>browsing context</span> is focused, and all its
<span title="ancestor browsing context">ancestor browsing
contexts</span> are also focused, and the <span>top-level browsing
context</span> has the <i>system focus</i>.</p>
<code>Document</code>'s <span>browsing context</span> is focused,
and all its <span title="ancestor browsing context">ancestor
browsing contexts</span> are also focused, and the <span>top-level
browsing context</span> has the <i>system focus</i>. If the
<code>Document</code> has no <span>browsing context</span> or if its
<span>browsing context</span> has no <span>top-level browsing
context</span>, then the method will always return false.</p>

<p>The <dfn title="dom-window-focus"><code>focus()</code></dfn>
method on the <code>Window</code> object, when invoked, provides a
Expand Down

0 comments on commit 542a44a

Please sign in to comment.