[html5] r5649 - [e] (0) cleanup around the drag-and-drop work

whatwg at whatwg.org whatwg at whatwg.org
Thu Oct 28 16:14:49 PDT 2010


Author: ianh
Date: 2010-10-28 16:14:48 -0700 (Thu, 28 Oct 2010)
New Revision: 5649

Modified:
   complete.html
   index
   source
Log:
[e] (0) cleanup around the drag-and-drop work

Modified: complete.html
===================================================================
--- complete.html	2010-10-28 22:51:48 UTC (rev 5648)
+++ complete.html	2010-10-28 23:14:48 UTC (rev 5649)
@@ -961,12 +961,7 @@
      <li><a href=#the-drag-data-store><span class=secno>8.7.2 </span>The drag data store</a></li>
      <li><a href=#the-datatransfer-interface><span class=secno>8.7.3 </span>The <code>DataTransfer</code> interface</a></li>
      <li><a href=#the-dragevent-interface><span class=secno>8.7.4 </span>The <code>DragEvent</code> interface</a></li>
-     <li><a href=#drag-and-drop-processing-model><span class=secno>8.7.5 </span>Drag-and-drop processing model</a>
-      <ol>
-       <li><a href=#when-the-drag-and-drop-operation-starts-or-ends-in-another-document><span class=secno>8.7.5.1 </span>When the drag-and-drop operation starts or ends in another
-  document</a></li>
-       <li><a href=#when-the-drag-and-drop-operation-starts-or-ends-in-another-application><span class=secno>8.7.5.2 </span>When the drag-and-drop operation starts or ends in another
-  application</a></ol></li>
+     <li><a href=#drag-and-drop-processing-model><span class=secno>8.7.5 </span>Drag-and-drop processing model</a></li>
      <li><a href=#dndevents><span class=secno>8.7.6 </span>Events summary</a></li>
      <li><a href=#the-draggable-attribute><span class=secno>8.7.7 </span>The <code>draggable</code> attribute</a></li>
      <li><a href=#security-risks-in-the-drag-and-drop-model><span class=secno>8.7.8 </span>Security risks in the drag-and-drop model</a></ol></li>
@@ -66575,8 +66570,8 @@
    </li>
 
    <li><p><a href=#create-a-drag-data-store>Create a drag data store</a>. All the DND events
-   fired subsequently by this algorithm must use this <a href=#drag-data-store>drag data
-   store</a>.</li>
+   fired subsequently by the steps in this section must use this
+   <a href=#drag-data-store>drag data store</a>.</li>
 
    <li>
 
@@ -66595,8 +66590,10 @@
     <a href=#source-node>source node</a> is the element that is being dragged.</p>
 
     <p>Otherwise, the <a href=#source-node>source node</a> is part of another
-    document or application, and user agents must not actually fire
-    events at it when this algorithm requires that they do so.</p>
+    document or application. When this specification requires that an
+    event be dispatched at the <a href=#source-node>source node</a> in this case,
+    the user agent must instead follow the platform-specific
+    conventions relevant to that situation.</p>
 
     <p class=note>Multiple events are fired on the <a href=#source-node>source
     node</a> during the course of the drag-and-drop operation.</p>
@@ -66649,6 +66646,17 @@
     outside a <a href=#browsing-context>browsing context</a>, for example from a file
     system manager application.</p>
 
+    <p>If the drag initiated outside of the application, the user
+    agent must add items to the <a href=#drag-data-store-item-list>drag data store item list</a>
+    as appropriate for the data being dragged, honoring platform
+    conventions where appropriate; however, if the platform
+    conventions do not use <a href=#mime-type title="MIME type">MIME types</a>
+    to label dragged data, the user agent must make a best-effort
+    attempt to map the types to MIME types, and, in any case, all the
+    <a href=#the-drag-data-item-type-string title="the drag data item type string">drag data item type
+    strings</a> must be <a href=#converted-to-ascii-lowercase>converted to ASCII
+    lowercase</a>.</p>
+
    </li>
 
    <!-- v2: text/html as an export format -->
@@ -66756,13 +66764,15 @@
    <li>
 
     <p>If it is an element that is being dragged, then set the
-    <span>drag data store list of elements</span> to contain just the
+    <a href=#drag-data-store-elements-list>drag data store elements list</a> to contain just the
     <a href=#source-node>source node</a>.</p>
 
     <p>Otherwise, update the <a href=#drag-data-store-default-feedback>drag data store default
     feedback</a> as appropriate for the user agent (if the user is
     dragging the selection, then the selection would likely be the
-    basis for this feedback).</p>
+    basis for this feedback; if the drag began outside the user agent,
+    then the platform conventions for determining the drag feedback
+    should be used).</p>
 
     <p class=note>Script can use the <code title=dom-DataTransfer-addElement><a href=#dom-datatransfer-addelement>addElement()</a></code> method to
     add further elements to the list of what is being dragged. (This
@@ -66803,8 +66813,8 @@
      pixels from the left side and from the top side of the image
      respectively. <a href=#refsCSS>[CSS]</a></li>
 
-     <li>The elements in the <span>drag data store element
-     list</span>, if any.</li>
+     <li>The elements in the <a href=#drag-data-store-elements-list>drag data store elements
+     list</a>, if any.</li>
 
      <li>The <a href=#drag-data-store-default-feedback>drag data store default feedback</a>.</li>
 
@@ -66881,12 +66891,17 @@
       element</a>, then update the <a href=#current-target-element>current target
       element</a> as follows:</p>
 
-      <dl class=switch><dt>If the new <a href=#immediate-user-selection>immediate user selection</a> is null, or
-       is in a non-DOM document or application</dt>
+      <dl class=switch><dt>If the new <a href=#immediate-user-selection>immediate user selection</a> is null</dt>
 
-       <dd><p>Set the <a href=#current-target-element>current target element</a> to the same
-       value.</dd>
+       <dd><p>Set the <a href=#current-target-element>current target element</a> to null
+       also.</dd>
 
+       <dt>If the new <a href=#immediate-user-selection>immediate user selection</a> is in a
+       non-DOM document or application</dt>
+
+       <dd><p>Set the <a href=#current-target-element>current target element</a> to the
+       <a href=#immediate-user-selection>immediate user selection</a>.</dd>
+
        <dt>Otherwise</dt>
 
        <dd>
@@ -67080,7 +67095,7 @@
          <dt>Otherwise</dt>
 
          <dd><p>Reset the <a href=#current-drag-operation>current drag operation</a> to
-         "<code title="">none</code>".</p>~</dd>
+         "<code title="">none</code>".</dd>
 
         </dl></li>
 
@@ -67137,56 +67152,15 @@
   make sense to scroll the page so that the user can drop the link
   lower on the page.</p>
 
-  </div>
-
-
-  <div class=impl>
-
-  <h5 id=when-the-drag-and-drop-operation-starts-or-ends-in-another-document><span class=secno>8.7.5.1 </span>When the drag-and-drop operation starts or ends in another
-  document</h5>
-
-  <p>The model described above is independent of which
+  <p class=note>This model is independent of which
   <code><a href=#document>Document</a></code> object the nodes involved are from; the events
-  must be fired as described above and the rest of the processing
-  model must be followed as described above, irrespective of how many
-  documents are involved in the operation.</p>
+  are fired as described above and the rest of the processing model
+  runs as described above, irrespective of how many documents are
+  involved in the operation.</p>
 
   </div>
 
 
-
-  <div class=impl>
-
-  <h5 id=when-the-drag-and-drop-operation-starts-or-ends-in-another-application><span class=secno>8.7.5.2 </span>When the drag-and-drop operation starts or ends in another
-  application</h5>
-
-  <p>If the drag is initiated in another application, the <a href=#source-node>source
-  node</a> is not a DOM node, and the user agent must use
-  platform-specific conventions instead when the requirements above
-  involve the source node. User agents in this situation must act as
-  if the dragged data had been added to the <code><a href=#datatransfer>DataTransfer</a></code>
-  object when the drag started, even though no <code title=event-dragstart><a href=#event-dragstart>dragstart</a></code> event was actually fired;
-  user agents must similarly use platform-specific conventions when
-  deciding on what drag feedback to use.</p>
-
-  <p>All the format strings must be <a href=#converted-to-ascii-lowercase>converted to ASCII
-  lowercase</a>. If the platform conventions do not use <a href=#mime-type title="MIME type">MIME types</a> to label the dragged data, the
-  user agent must map the types to MIME types first.</p>
-
-  <p>If a drag is started in a document but ends in another
-  application, then the user agent must instead replace the parts of
-  the processing model relating to handling the <em>target</em>
-  according to platform-specific conventions.</p>
-
-  <p>In any case, scripts running in the context of the document must
-  not be able to distinguish the case of a drag-and-drop operation
-  being started or ended in another application from the case of a
-  drag-and-drop operation being started or ended in another document
-  from another domain.</p>
-
-  </div>
-
-
   <h4 id=dndevents><span class=secno>8.7.6 </span>Events summary</h4>
 
   <p><i>This section is non-normative.</i></p>

Modified: index
===================================================================
--- index	2010-10-28 22:51:48 UTC (rev 5648)
+++ index	2010-10-28 23:14:48 UTC (rev 5649)
@@ -968,12 +968,7 @@
      <li><a href=#the-drag-data-store><span class=secno>8.7.2 </span>The drag data store</a></li>
      <li><a href=#the-datatransfer-interface><span class=secno>8.7.3 </span>The <code>DataTransfer</code> interface</a></li>
      <li><a href=#the-dragevent-interface><span class=secno>8.7.4 </span>The <code>DragEvent</code> interface</a></li>
-     <li><a href=#drag-and-drop-processing-model><span class=secno>8.7.5 </span>Drag-and-drop processing model</a>
-      <ol>
-       <li><a href=#when-the-drag-and-drop-operation-starts-or-ends-in-another-document><span class=secno>8.7.5.1 </span>When the drag-and-drop operation starts or ends in another
-  document</a></li>
-       <li><a href=#when-the-drag-and-drop-operation-starts-or-ends-in-another-application><span class=secno>8.7.5.2 </span>When the drag-and-drop operation starts or ends in another
-  application</a></ol></li>
+     <li><a href=#drag-and-drop-processing-model><span class=secno>8.7.5 </span>Drag-and-drop processing model</a></li>
      <li><a href=#dndevents><span class=secno>8.7.6 </span>Events summary</a></li>
      <li><a href=#the-draggable-attribute><span class=secno>8.7.7 </span>The <code>draggable</code> attribute</a></li>
      <li><a href=#security-risks-in-the-drag-and-drop-model><span class=secno>8.7.8 </span>Security risks in the drag-and-drop model</a></ol></li>
@@ -66581,8 +66576,8 @@
    </li>
 
    <li><p><a href=#create-a-drag-data-store>Create a drag data store</a>. All the DND events
-   fired subsequently by this algorithm must use this <a href=#drag-data-store>drag data
-   store</a>.</li>
+   fired subsequently by the steps in this section must use this
+   <a href=#drag-data-store>drag data store</a>.</li>
 
    <li>
 
@@ -66601,8 +66596,10 @@
     <a href=#source-node>source node</a> is the element that is being dragged.</p>
 
     <p>Otherwise, the <a href=#source-node>source node</a> is part of another
-    document or application, and user agents must not actually fire
-    events at it when this algorithm requires that they do so.</p>
+    document or application. When this specification requires that an
+    event be dispatched at the <a href=#source-node>source node</a> in this case,
+    the user agent must instead follow the platform-specific
+    conventions relevant to that situation.</p>
 
     <p class=note>Multiple events are fired on the <a href=#source-node>source
     node</a> during the course of the drag-and-drop operation.</p>
@@ -66655,6 +66652,17 @@
     outside a <a href=#browsing-context>browsing context</a>, for example from a file
     system manager application.</p>
 
+    <p>If the drag initiated outside of the application, the user
+    agent must add items to the <a href=#drag-data-store-item-list>drag data store item list</a>
+    as appropriate for the data being dragged, honoring platform
+    conventions where appropriate; however, if the platform
+    conventions do not use <a href=#mime-type title="MIME type">MIME types</a>
+    to label dragged data, the user agent must make a best-effort
+    attempt to map the types to MIME types, and, in any case, all the
+    <a href=#the-drag-data-item-type-string title="the drag data item type string">drag data item type
+    strings</a> must be <a href=#converted-to-ascii-lowercase>converted to ASCII
+    lowercase</a>.</p>
+
    </li>
 
    <!-- v2: text/html as an export format -->
@@ -66762,13 +66770,15 @@
    <li>
 
     <p>If it is an element that is being dragged, then set the
-    <span>drag data store list of elements</span> to contain just the
+    <a href=#drag-data-store-elements-list>drag data store elements list</a> to contain just the
     <a href=#source-node>source node</a>.</p>
 
     <p>Otherwise, update the <a href=#drag-data-store-default-feedback>drag data store default
     feedback</a> as appropriate for the user agent (if the user is
     dragging the selection, then the selection would likely be the
-    basis for this feedback).</p>
+    basis for this feedback; if the drag began outside the user agent,
+    then the platform conventions for determining the drag feedback
+    should be used).</p>
 
     <p class=note>Script can use the <code title=dom-DataTransfer-addElement><a href=#dom-datatransfer-addelement>addElement()</a></code> method to
     add further elements to the list of what is being dragged. (This
@@ -66809,8 +66819,8 @@
      pixels from the left side and from the top side of the image
      respectively. <a href=#refsCSS>[CSS]</a></li>
 
-     <li>The elements in the <span>drag data store element
-     list</span>, if any.</li>
+     <li>The elements in the <a href=#drag-data-store-elements-list>drag data store elements
+     list</a>, if any.</li>
 
      <li>The <a href=#drag-data-store-default-feedback>drag data store default feedback</a>.</li>
 
@@ -66887,12 +66897,17 @@
       element</a>, then update the <a href=#current-target-element>current target
       element</a> as follows:</p>
 
-      <dl class=switch><dt>If the new <a href=#immediate-user-selection>immediate user selection</a> is null, or
-       is in a non-DOM document or application</dt>
+      <dl class=switch><dt>If the new <a href=#immediate-user-selection>immediate user selection</a> is null</dt>
 
-       <dd><p>Set the <a href=#current-target-element>current target element</a> to the same
-       value.</dd>
+       <dd><p>Set the <a href=#current-target-element>current target element</a> to null
+       also.</dd>
 
+       <dt>If the new <a href=#immediate-user-selection>immediate user selection</a> is in a
+       non-DOM document or application</dt>
+
+       <dd><p>Set the <a href=#current-target-element>current target element</a> to the
+       <a href=#immediate-user-selection>immediate user selection</a>.</dd>
+
        <dt>Otherwise</dt>
 
        <dd>
@@ -67086,7 +67101,7 @@
          <dt>Otherwise</dt>
 
          <dd><p>Reset the <a href=#current-drag-operation>current drag operation</a> to
-         "<code title="">none</code>".</p>~</dd>
+         "<code title="">none</code>".</dd>
 
         </dl></li>
 
@@ -67143,56 +67158,15 @@
   make sense to scroll the page so that the user can drop the link
   lower on the page.</p>
 
-  </div>
-
-
-  <div class=impl>
-
-  <h5 id=when-the-drag-and-drop-operation-starts-or-ends-in-another-document><span class=secno>8.7.5.1 </span>When the drag-and-drop operation starts or ends in another
-  document</h5>
-
-  <p>The model described above is independent of which
+  <p class=note>This model is independent of which
   <code><a href=#document>Document</a></code> object the nodes involved are from; the events
-  must be fired as described above and the rest of the processing
-  model must be followed as described above, irrespective of how many
-  documents are involved in the operation.</p>
+  are fired as described above and the rest of the processing model
+  runs as described above, irrespective of how many documents are
+  involved in the operation.</p>
 
   </div>
 
 
-
-  <div class=impl>
-
-  <h5 id=when-the-drag-and-drop-operation-starts-or-ends-in-another-application><span class=secno>8.7.5.2 </span>When the drag-and-drop operation starts or ends in another
-  application</h5>
-
-  <p>If the drag is initiated in another application, the <a href=#source-node>source
-  node</a> is not a DOM node, and the user agent must use
-  platform-specific conventions instead when the requirements above
-  involve the source node. User agents in this situation must act as
-  if the dragged data had been added to the <code><a href=#datatransfer>DataTransfer</a></code>
-  object when the drag started, even though no <code title=event-dragstart><a href=#event-dragstart>dragstart</a></code> event was actually fired;
-  user agents must similarly use platform-specific conventions when
-  deciding on what drag feedback to use.</p>
-
-  <p>All the format strings must be <a href=#converted-to-ascii-lowercase>converted to ASCII
-  lowercase</a>. If the platform conventions do not use <a href=#mime-type title="MIME type">MIME types</a> to label the dragged data, the
-  user agent must map the types to MIME types first.</p>
-
-  <p>If a drag is started in a document but ends in another
-  application, then the user agent must instead replace the parts of
-  the processing model relating to handling the <em>target</em>
-  according to platform-specific conventions.</p>
-
-  <p>In any case, scripts running in the context of the document must
-  not be able to distinguish the case of a drag-and-drop operation
-  being started or ended in another application from the case of a
-  drag-and-drop operation being started or ended in another document
-  from another domain.</p>
-
-  </div>
-
-
   <h4 id=dndevents><span class=secno>8.7.6 </span>Events summary</h4>
 
   <p><i>This section is non-normative.</i></p>

Modified: source
===================================================================
--- source	2010-10-28 22:51:48 UTC (rev 5648)
+++ source	2010-10-28 23:14:48 UTC (rev 5649)
@@ -75909,8 +75909,8 @@
    </li>
 
    <li><p><span>Create a drag data store</span>. All the DND events
-   fired subsequently by this algorithm must use this <span>drag data
-   store</span>.</p></li>
+   fired subsequently by the steps in this section must use this
+   <span>drag data store</span>.</p></li>
 
    <li>
 
@@ -75929,8 +75929,10 @@
     <span>source node</span> is the element that is being dragged.</p>
 
     <p>Otherwise, the <span>source node</span> is part of another
-    document or application, and user agents must not actually fire
-    events at it when this algorithm requires that they do so.</p>
+    document or application. When this specification requires that an
+    event be dispatched at the <span>source node</span> in this case,
+    the user agent must instead follow the platform-specific
+    conventions relevant to that situation.</p>
 
     <p class="note">Multiple events are fired on the <span>source
     node</span> during the course of the drag-and-drop operation.</p>
@@ -75991,6 +75993,17 @@
     outside a <span>browsing context</span>, for example from a file
     system manager application.</p>
 
+    <p>If the drag initiated outside of the application, the user
+    agent must add items to the <span>drag data store item list</span>
+    as appropriate for the data being dragged, honoring platform
+    conventions where appropriate; however, if the platform
+    conventions do not use <span title="MIME type">MIME types</span>
+    to label dragged data, the user agent must make a best-effort
+    attempt to map the types to MIME types, and, in any case, all the
+    <span title="the drag data item type string">drag data item type
+    strings</span> must be <span>converted to ASCII
+    lowercase</span>.</p>
+
    </li>
 
    <!-- v2: text/html as an export format -->
@@ -76128,13 +76141,15 @@
    <li>
 
     <p>If it is an element that is being dragged, then set the
-    <span>drag data store list of elements</span> to contain just the
+    <span>drag data store elements list</span> to contain just the
     <span>source node</span>.</p>
 
     <p>Otherwise, update the <span>drag data store default
     feedback</span> as appropriate for the user agent (if the user is
     dragging the selection, then the selection would likely be the
-    basis for this feedback).</p>
+    basis for this feedback; if the drag began outside the user agent,
+    then the platform conventions for determining the drag feedback
+    should be used).</p>
 
     <p class="note">Script can use the <code
     title="dom-DataTransfer-addElement">addElement()</code> method to
@@ -76179,7 +76194,7 @@
      pixels from the left side and from the top side of the image
      respectively. <a href="#refsCSS">[CSS]</a></li>
 
-     <li>The elements in the <span>drag data store element
+     <li>The elements in the <span>drag data store elements
      list</span>, if any.</li>
 
      <li>The <span>drag data store default feedback</span>.</li>
@@ -76273,12 +76288,17 @@
 
       <dl class="switch">
 
-       <dt>If the new <span>immediate user selection</span> is null, or
-       is in a non-DOM document or application</dt>
+       <dt>If the new <span>immediate user selection</span> is null</dt>
 
-       <dd><p>Set the <span>current target element</span> to the same
-       value.</p></dd>
+       <dd><p>Set the <span>current target element</span> to null
+       also.</p></dd>
 
+       <dt>If the new <span>immediate user selection</span> is in a
+       non-DOM document or application</dt>
+
+       <dd><p>Set the <span>current target element</span> to the
+       <span>immediate user selection</span>.</p></dd>
+
        <dt>Otherwise</dt>
 
        <dd>
@@ -76539,7 +76559,7 @@
          <dt>Otherwise</dt>
 
          <dd><p>Reset the <span>current drag operation</span> to
-         "<code title="">none</code>".</p>~</dd>
+         "<code title="">none</code>".</p></dd>
 
         </dl>
 
@@ -76609,58 +76629,15 @@
   make sense to scroll the page so that the user can drop the link
   lower on the page.</p>
 
-  </div>
-
-
-  <div class="impl">
-
-  <h5>When the drag-and-drop operation starts or ends in another
-  document</h5>
-
-  <p>The model described above is independent of which
+  <p class="note">This model is independent of which
   <code>Document</code> object the nodes involved are from; the events
-  must be fired as described above and the rest of the processing
-  model must be followed as described above, irrespective of how many
-  documents are involved in the operation.</p>
+  are fired as described above and the rest of the processing model
+  runs as described above, irrespective of how many documents are
+  involved in the operation.</p>
 
   </div>
 
 
-
-  <div class="impl">
-
-  <h5>When the drag-and-drop operation starts or ends in another
-  application</h5>
-
-  <p>If the drag is initiated in another application, the <span>source
-  node</span> is not a DOM node, and the user agent must use
-  platform-specific conventions instead when the requirements above
-  involve the source node. User agents in this situation must act as
-  if the dragged data had been added to the <code>DataTransfer</code>
-  object when the drag started, even though no <code
-  title="event-dragstart">dragstart</code> event was actually fired;
-  user agents must similarly use platform-specific conventions when
-  deciding on what drag feedback to use.</p>
-
-  <p>All the format strings must be <span>converted to ASCII
-  lowercase</span>. If the platform conventions do not use <span
-  title="MIME type">MIME types</span> to label the dragged data, the
-  user agent must map the types to MIME types first.</p>
-
-  <p>If a drag is started in a document but ends in another
-  application, then the user agent must instead replace the parts of
-  the processing model relating to handling the <em>target</em>
-  according to platform-specific conventions.</p>
-
-  <p>In any case, scripts running in the context of the document must
-  not be able to distinguish the case of a drag-and-drop operation
-  being started or ended in another application from the case of a
-  drag-and-drop operation being started or ended in another document
-  from another domain.</p>
-
-  </div>
-
-
   <h4 id="dndevents">Events summary</h4>
 
   <p><i>This section is non-normative.</i></p>




More information about the Commit-Watchers mailing list