[html5] r5702 - [e] (0) Fix the focusing-related parts of the spec to handle orphaned nested bro [...]

whatwg at whatwg.org whatwg at whatwg.org
Mon Dec 6 16:18:12 PST 2010


Author: ianh
Date: 2010-12-06 16:18:08 -0800 (Mon, 06 Dec 2010)
New Revision: 5702

Modified:
   complete.html
   index
   source
Log:
[e] (0) Fix the focusing-related parts of the spec to handle orphaned nested browsing contexts

Modified: complete.html
===================================================================
--- complete.html	2010-12-04 01:32:37 UTC (rev 5701)
+++ complete.html	2010-12-07 00:18:08 UTC (rev 5702)
@@ -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 — 4 December 2010</h2>
+    <h2 class="no-num no-toc">Draft Standard — 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>-->
@@ -46562,6 +46562,14 @@
   <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
@@ -65512,7 +65520,14 @@
 
   <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>
 
@@ -65611,10 +65626,13 @@
 
   <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

Modified: index
===================================================================
--- index	2010-12-04 01:32:37 UTC (rev 5701)
+++ index	2010-12-07 00:18:08 UTC (rev 5702)
@@ -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 — 4 December 2010</h2>
+    <h2 class="no-num no-toc">Draft Standard — 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>-->
@@ -46543,6 +46543,14 @@
   <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
@@ -65519,7 +65527,14 @@
 
   <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>
 
@@ -65618,10 +65633,13 @@
 
   <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

Modified: source
===================================================================
--- source	2010-12-04 01:32:37 UTC (rev 5701)
+++ source	2010-12-07 00:18:08 UTC (rev 5702)
@@ -52228,6 +52228,14 @@
    <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
@@ -74618,6 +74626,13 @@
 
   <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>
@@ -74737,10 +74752,13 @@
   <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




More information about the Commit-Watchers mailing list