hixie: Limit the number of text DND entries to one per type. (whatwg r5747)

hixie: Limit the number of text DND entries to one per type. (whatwg
r5747)

http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.4607&r2=1.4608&f=h
http://html5.org/tools/web-apps-tracker?from=5746&to=5747

===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.4607
retrieving revision 1.4608
diff -u -d -r1.4607 -r1.4608
--- Overview.html 7 Jan 2011 00:40:25 -0000 1.4607
+++ Overview.html 7 Jan 2011 03:20:37 -0000 1.4608
@@ -50797,6 +50797,11 @@
       encouraged to use only <a href="#mime-type" title="MIME type">MIME types</a>
       or custom strings (without spaces).</p>
 
+      <p>There is a limit of one <i>Plain Unicode string</i> item per
+      <a href="#the-drag-data-item-type-string" title="The drag data item type string">item type
+      string</a>.</p> <!-- DND-v4: consider limiting the structured
+      objects too -->
+
      </dd>
 
      <dt>The actual data</dt>
@@ -51057,10 +51062,10 @@
 
    </li>
 
-   <li><p>Remove each item in the <a href="#drag-data-store-item-list">drag data store item
+   <li><p>Remove the item in the <a href="#drag-data-store-item-list">drag data store item
    list</a> whose <a href="#the-drag-data-item-kind" title="the drag data item kind">kind</a>
    is <i>Plain Unicode string</i> and whose <a href="#the-drag-data-item-type-string" title="the drag data
-   item type string">type string</a> is equal to <var title="">format</var>.</li>
+   item type string">type string</a> is equal to <var title="">format</var>, if there is one.</li>
 
   </ol><p class="note">The <code title="dom-DataTransfer-clearData"><a href="#dom-datatransfer-cleardata">clearData()</a></code> method does
   not affect whether any files were included in the drag, so the <code title="dom-DataTransfer-types"><a href="#dom-datatransfer-types">types</a></code> attribute's list might
@@ -51090,10 +51095,10 @@
 
    </li>
 
-   <li><p>Remove each item in the <a href="#drag-data-store-item-list">drag data store item
+   <li><p>Remove the item in the <a href="#drag-data-store-item-list">drag data store item
    list</a> whose <a href="#the-drag-data-item-kind" title="the drag data item kind">kind</a>
    is <i>Plain Unicode string</i> and whose <a href="#the-drag-data-item-type-string" title="the drag data
-   item type string">type string</a> is equal to <var title="">format</var>.</li>
+   item type string">type string</a> is equal to <var title="">format</var>, if there is one.</li>
 
    <li><p>Add an item to the <a href="#drag-data-store-item-list">drag data store item list</a>
    whose <a href="#the-drag-data-item-kind" title="the drag data item kind">kind</a> is <i>Plain
@@ -51128,8 +51133,8 @@
    item type string">type string</a> is equal to <var title="">format</var>, return the empty string and abort these
    steps.</li>
 
-   <li><p>Let <var title="">result</var> be the data of the first item
-   to the <a href="#drag-data-store-item-list">drag data store item list</a> whose <a href="#the-drag-data-item-kind" title="the drag data item kind">kind</a> is <i>Plain Unicode
+   <li><p>Let <var title="">result</var> be the data of the item
+   in the <a href="#drag-data-store-item-list">drag data store item list</a> whose <a href="#the-drag-data-item-kind" title="the drag data item kind">kind</a> is <i>Plain Unicode
    string</i> and whose <a href="#the-drag-data-item-type-string" title="the drag data item type
    string">type string</a> is equal to <var title="">format</var>.</li>
 
@@ -51312,10 +51317,11 @@
   an indexed property</dfn> <var title="">i</var> of a
   <code><a href="#datatransferitems">DataTransferItems</a></code> object, the user agent must return a
   <code><a href="#datatransferitem">DataTransferItem</a></code> object representing the <var title="">i</var>th item in the <a href="#drag-data-store">drag data store</a>. The
-  same object must be returned each time. The
+  same object must be returned each time a particular item is obtained
+  from this <code><a href="#datatransferitems">DataTransferItems</a></code> object. The
   <code><a href="#datatransferitem">DataTransferItem</a></code> object must be associated with the
   same <code><a href="#datatransfer">DataTransfer</a></code> object as the
-  <code><a href="#datatransferitems">DataTransferItems</a></code> object when it is created.</p>
+  <code><a href="#datatransferitems">DataTransferItems</a></code> object when it is first created.</p>
 
   <p>To <dfn id="dom-datatransferitems-removeitem" title="dom-DataTransferItems-removeItem">delete an
   existing indexed property</dfn> <var title="">i</var> of a
@@ -51350,13 +51356,20 @@
 
      <dd>
 
-      <p>Add an item to the <a href="#drag-data-store-item-list">drag data store item list</a>
-      whose <a href="#the-drag-data-item-kind" title="the drag data item kind">kind</a> is
-      <i>Plain Unicode string</i>, whose <a href="#the-drag-data-item-type-string" title="the drag data
-      item type string">type string</a> is equal to the value of
-      the method's second argument, <a href="#converted-to-ascii-lowercase">converted to ASCII
-      lowercase</a>, and whose data is the string given by the
-      method's first argument.</p>
+      <p>If there is already an item in the <a href="#drag-data-store-item-list">drag data store item
+      list</a> whose <a href="#the-drag-data-item-kind" title="the drag data item
+      kind">kind</a> is <i>Plain Unicode string</i> and whose <a href="#the-drag-data-item-type-string" title="the drag data item type string">type string</a> is
+      equal to the value of the method's second argument,
+      <a href="#converted-to-ascii-lowercase">converted to ASCII lowercase</a>, then throw a
+      <code><a href="#not_supported_err">NOT_SUPPORTED_ERR</a></code> exception and abort these
+      steps.</p>
+
+      <p>Otherwise, add an item to the <a href="#drag-data-store-item-list">drag data store item
+      list</a> whose <a href="#the-drag-data-item-kind" title="the drag data item
+      kind">kind</a> is <i>Plain Unicode string</i>, whose <a href="#the-drag-data-item-type-string" title="the drag data item type string">type string</a> is
+      equal to the value of the method's second argument,
+      <a href="#converted-to-ascii-lowercase">converted to ASCII lowercase</a>, and whose data is the
+      string given by the method's first argument.</p>
 
      </dd>
 
@@ -51389,7 +51402,7 @@
 
      </dd>
 
-<!--DND-v4:
+<!--DND-v4: (might want to prevent duplicates like for strings; see above)
      <dt>Otherwise
 
      <dd>

Received on Wednesday, 12 January 2011 02:44:11 UTC