[html5] r6753 - [giow] (2) Compatibility fix for how events are fired when nothing is focused an [...]

whatwg at whatwg.org whatwg at whatwg.org
Tue Oct 25 11:40:18 PDT 2011


Author: ianh
Date: 2011-10-25 11:40:16 -0700 (Tue, 25 Oct 2011)
New Revision: 6753

Modified:
   complete.html
   index
   source
Log:
[giow] (2) Compatibility fix for how events are fired when nothing is focused and there's no body element. Also, editorial tweaks around how drag and drop events are fired to the body element.
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=14534

Modified: complete.html
===================================================================
--- complete.html	2011-10-25 04:35:03 UTC (rev 6752)
+++ complete.html	2011-10-25 18:40:16 UTC (rev 6753)
@@ -9641,10 +9641,7 @@
   </dl><p><dfn id=the-body-element-0>The body element</dfn> of a document is the first child of
   <a href=#the-html-element-0>the <code>html</code> element</a> that is either a
   <code><a href=#the-body-element>body</a></code> element or a <code><a href=#frameset>frameset</a></code> element. If
-  there is no such element, it is null. <span class=impl>If the body
-  element is null, then when the specification requires that events be
-  fired at "the body element", they must instead be fired at the
-  <code><a href=#document>Document</a></code> object.</span></p>
+  there is no such element, it is null.</p>
 
   <div class=impl>
 
@@ -71637,7 +71634,10 @@
   <p>When an element is <i>focused</i>, key events received by the
   document must be targeted at that element. There may be no element
   focused; when no element is focused, key events received by the
-  document must be targeted at <a href=#the-body-element-0>the body element</a>.</p>
+  document must be targeted at <a href=#the-body-element-0>the body element</a>, if there
+  is one, or else at the <code><a href=#document>Document</a></code>'s root element, if
+  there is one. If there is no root element, key events must not be
+  fired.</p>
 
   <p>User agents may track focus for each <a href=#browsing-context>browsing
   context</a> or <code><a href=#document>Document</a></code> individually, or may support
@@ -74262,17 +74262,12 @@
          <dd>
 
           <p><a href=#fire-a-dnd-event>Fire a DND event</a> named <code title=event-dragenter><a href=#event-dragenter>dragenter</a></code> at <a href=#the-body-element-0>the body
-          element</a>, and set the <a href=#current-target-element>current target
-          element</a> to <a href=#the-body-element-0>the body element</a>, regardless
-          of whether that event was canceled or not.</p>
+          element</a>, if there is one, or at the
+          <code><a href=#document>Document</a></code> object, if not. Then, and set the
+          <a href=#current-target-element>current target element</a> to <a href=#the-body-element-0>the body
+          element</a>, regardless of whether that event was
+          canceled or not.</p>
 
-          <p class=note>If <a href=#the-body-element-0>the body element</a> is null,
-          then the event will be fired at the <code><a href=#document>Document</a></code>
-          object (as required by the definition of <a href=#the-body-element-0>the body
-          element</a>), but the <a href=#current-target-element>current target element</a>
-          would be set to null, not the <code><a href=#document>Document</a></code>
-          object.</dd>
-
         </dl></dd>
 
       </dl></li>

Modified: index
===================================================================
--- index	2011-10-25 04:35:03 UTC (rev 6752)
+++ index	2011-10-25 18:40:16 UTC (rev 6753)
@@ -9641,10 +9641,7 @@
   </dl><p><dfn id=the-body-element-0>The body element</dfn> of a document is the first child of
   <a href=#the-html-element-0>the <code>html</code> element</a> that is either a
   <code><a href=#the-body-element>body</a></code> element or a <code><a href=#frameset>frameset</a></code> element. If
-  there is no such element, it is null. <span class=impl>If the body
-  element is null, then when the specification requires that events be
-  fired at "the body element", they must instead be fired at the
-  <code><a href=#document>Document</a></code> object.</span></p>
+  there is no such element, it is null.</p>
 
   <div class=impl>
 
@@ -71637,7 +71634,10 @@
   <p>When an element is <i>focused</i>, key events received by the
   document must be targeted at that element. There may be no element
   focused; when no element is focused, key events received by the
-  document must be targeted at <a href=#the-body-element-0>the body element</a>.</p>
+  document must be targeted at <a href=#the-body-element-0>the body element</a>, if there
+  is one, or else at the <code><a href=#document>Document</a></code>'s root element, if
+  there is one. If there is no root element, key events must not be
+  fired.</p>
 
   <p>User agents may track focus for each <a href=#browsing-context>browsing
   context</a> or <code><a href=#document>Document</a></code> individually, or may support
@@ -74262,17 +74262,12 @@
          <dd>
 
           <p><a href=#fire-a-dnd-event>Fire a DND event</a> named <code title=event-dragenter><a href=#event-dragenter>dragenter</a></code> at <a href=#the-body-element-0>the body
-          element</a>, and set the <a href=#current-target-element>current target
-          element</a> to <a href=#the-body-element-0>the body element</a>, regardless
-          of whether that event was canceled or not.</p>
+          element</a>, if there is one, or at the
+          <code><a href=#document>Document</a></code> object, if not. Then, and set the
+          <a href=#current-target-element>current target element</a> to <a href=#the-body-element-0>the body
+          element</a>, regardless of whether that event was
+          canceled or not.</p>
 
-          <p class=note>If <a href=#the-body-element-0>the body element</a> is null,
-          then the event will be fired at the <code><a href=#document>Document</a></code>
-          object (as required by the definition of <a href=#the-body-element-0>the body
-          element</a>), but the <a href=#current-target-element>current target element</a>
-          would be set to null, not the <code><a href=#document>Document</a></code>
-          object.</dd>
-
         </dl></dd>
 
       </dl></li>

Modified: source
===================================================================
--- source	2011-10-25 04:35:03 UTC (rev 6752)
+++ source	2011-10-25 18:40:16 UTC (rev 6753)
@@ -9750,10 +9750,7 @@
   <p><dfn>The body element</dfn> of a document is the first child of
   <span>the <code>html</code> element</span> that is either a
   <code>body</code> element or a <code>frameset</code> element. If
-  there is no such element, it is null. <span class="impl">If the body
-  element is null, then when the specification requires that events be
-  fired at "the body element", they must instead be fired at the
-  <code>Document</code> object.</span></p>
+  there is no such element, it is null.</p>
 
   <div class="impl">
 
@@ -81522,7 +81519,10 @@
   <p>When an element is <i>focused</i>, key events received by the
   document must be targeted at that element. There may be no element
   focused; when no element is focused, key events received by the
-  document must be targeted at <span>the body element</span>.</p>
+  document must be targeted at <span>the body element</span>, if there
+  is one, or else at the <code>Document</code>'s root element, if
+  there is one. If there is no root element, key events must not be
+  fired.</p>
 
   <p>User agents may track focus for each <span>browsing
   context</span> or <code>Document</code> individually, or may support
@@ -84608,17 +84608,12 @@
 
           <p><span>Fire a DND event</span> named <code
           title="event-dragenter">dragenter</code> at <span>the body
-          element</span>, and set the <span>current target
-          element</span> to <span>the body element</span>, regardless
-          of whether that event was canceled or not.</p>
+          element</span>, if there is one, or at the
+          <code>Document</code> object, if not. Then, and set the
+          <span>current target element</span> to <span>the body
+          element</span>, regardless of whether that event was
+          canceled or not.</p>
 
-          <p class="note">If <span>the body element</span> is null,
-          then the event will be fired at the <code>Document</code>
-          object (as required by the definition of <span>the body
-          element</span>), but the <span>current target element</span>
-          would be set to null, not the <code>Document</code>
-          object.</p></dd>
-
         </dl>
 
        </dd>




More information about the Commit-Watchers mailing list