Skip to content

Commit

Permalink
[giow] (0) Limit the number of text DND entries to one per type.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.whatwg.org/webapps@5747 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jan 7, 2011
1 parent 41442f7 commit 793084f
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 48 deletions.
45 changes: 29 additions & 16 deletions complete.html
Expand Up @@ -67325,6 +67325,11 @@ <h4 id=the-drag-data-store><span class=secno>8.7.2 </span>The drag data store</h
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>
Expand Down Expand Up @@ -67596,10 +67601,10 @@ <h4 id=the-datatransfer-interface><span class=secno>8.7.3 </span>The <code><a hr

</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
Expand Down Expand Up @@ -67629,10 +67634,10 @@ <h4 id=the-datatransfer-interface><span class=secno>8.7.3 </span>The <code><a hr

</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
Expand Down Expand Up @@ -67667,8 +67672,8 @@ <h4 id=the-datatransfer-interface><span class=secno>8.7.3 </span>The <code><a hr
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>

Expand Down Expand Up @@ -67860,10 +67865,11 @@ <h5 id=the-datatransferitems-interface><span class=secno>8.7.3.1 </span>The <cod
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
Expand Down Expand Up @@ -67898,13 +67904,20 @@ <h5 id=the-datatransferitems-interface><span class=secno>8.7.3.1 </span>The <cod

<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>

Expand Down Expand Up @@ -67937,7 +67950,7 @@ <h5 id=the-datatransferitems-interface><span class=secno>8.7.3.1 </span>The <cod

</dd>

<!--DND-v4:
<!--DND-v4: (might want to prevent duplicates like for strings; see above)
<dt>Otherwise

<dd>
Expand Down
45 changes: 29 additions & 16 deletions index
Expand Up @@ -67333,6 +67333,11 @@ interface <dfn id=navigatorabilities>NavigatorAbilities</dfn> {
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>
Expand Down Expand Up @@ -67604,10 +67609,10 @@ interface <dfn id=navigatorabilities>NavigatorAbilities</dfn> {

</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
Expand Down Expand Up @@ -67637,10 +67642,10 @@ interface <dfn id=navigatorabilities>NavigatorAbilities</dfn> {

</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
Expand Down Expand Up @@ -67675,8 +67680,8 @@ interface <dfn id=navigatorabilities>NavigatorAbilities</dfn> {
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>

Expand Down Expand Up @@ -67868,10 +67873,11 @@ DND-v5: <span>DataTransferItem</span> <span title="dom-DataTransferItems-add">a
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
Expand Down Expand Up @@ -67906,13 +67912,20 @@ DND-v5: <span>DataTransferItem</span> <span title="dom-DataTransferItems-add">a

<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>

Expand Down Expand Up @@ -67945,7 +67958,7 @@ DND-v5: <span>DataTransferItem</span> <span title="dom-DataTransferItems-add">a

</dd>

<!--DND-v4:
<!--DND-v4: (might want to prevent duplicates like for strings; see above)
<dt>Otherwise

<dd>
Expand Down
47 changes: 31 additions & 16 deletions source
Expand Up @@ -76712,6 +76712,11 @@ interface <dfn>NavigatorAbilities</dfn> {
encouraged to use only <span title="MIME type">MIME types</span>
or custom strings (without spaces).</p>

<p>There is a limit of one <i>Plain Unicode string</i> item per
<span title="The drag data item type string">item type
string</span>.</p> <!-- DND-v4: consider limiting the structured
objects too -->

</dd>

<dt>The actual data</dt>
Expand Down Expand Up @@ -77033,11 +77038,11 @@ interface <dfn>NavigatorAbilities</dfn> {

</li>

<li><p>Remove each item in the <span>drag data store item
<li><p>Remove the item in the <span>drag data store item
list</span> whose <span title="the drag data item kind">kind</span>
is <i>Plain Unicode string</i> and whose <span title="the drag data
item type string">type string</span> is equal to <var
title="">format</var>.</p></li>
title="">format</var>, if there is one.</p></li>

</ol>

Expand Down Expand Up @@ -77080,11 +77085,11 @@ interface <dfn>NavigatorAbilities</dfn> {

</li>

<li><p>Remove each item in the <span>drag data store item
<li><p>Remove the item in the <span>drag data store item
list</span> whose <span title="the drag data item kind">kind</span>
is <i>Plain Unicode string</i> and whose <span title="the drag data
item type string">type string</span> is equal to <var
title="">format</var>.</p></li>
title="">format</var>, if there is one.</p></li>

<li><p>Add an item to the <span>drag data store item list</span>
whose <span title="the drag data item kind">kind</span> is <i>Plain
Expand Down Expand Up @@ -77131,8 +77136,8 @@ interface <dfn>NavigatorAbilities</dfn> {
title="">format</var>, return the empty string and abort these
steps.</p></li>

<li><p>Let <var title="">result</var> be the data of the first item
to the <span>drag data store item list</span> whose <span
<li><p>Let <var title="">result</var> be the data of the item
in the <span>drag data store item list</span> whose <span
title="the drag data item kind">kind</span> is <i>Plain Unicode
string</i> and whose <span title="the drag data item type
string">type string</span> is equal to <var
Expand Down Expand Up @@ -77360,10 +77365,11 @@ DND-v5: <span>DataTransferItem</span> <span title="dom-DataTransferItems-add">a
<code>DataTransferItems</code> object, the user agent must return a
<code>DataTransferItem</code> object representing the <var
title="">i</var>th item in the <span>drag data store</span>. The
same object must be returned each time. The
same object must be returned each time a particular item is obtained
from this <code>DataTransferItems</code> object. The
<code>DataTransferItem</code> object must be associated with the
same <code>DataTransfer</code> object as the
<code>DataTransferItems</code> object when it is created.</p>
<code>DataTransferItems</code> object when it is first created.</p>

<p>To <dfn title="dom-DataTransferItems-removeItem">delete an
existing indexed property</dfn> <var title="">i</var> of a
Expand Down Expand Up @@ -77409,13 +77415,22 @@ DND-v5: <span>DataTransferItem</span> <span title="dom-DataTransferItems-add">a

<dd>

<p>Add an item to the <span>drag data store item list</span>
whose <span title="the drag data item kind">kind</span> is
<i>Plain Unicode string</i>, whose <span title="the drag data
item type string">type string</span> is equal to the value of
the method's second argument, <span>converted to ASCII
lowercase</span>, and whose data is the string given by the
method's first argument.</p>
<p>If there is already an item in the <span>drag data store item
list</span> whose <span title="the drag data item
kind">kind</span> is <i>Plain Unicode string</i> and whose <span
title="the drag data item type string">type string</span> is
equal to the value of the method's second argument,
<span>converted to ASCII lowercase</span>, then throw a
<code>NOT_SUPPORTED_ERR</code> exception and abort these
steps.</p>

<p>Otherwise, add an item to the <span>drag data store item
list</span> whose <span title="the drag data item
kind">kind</span> is <i>Plain Unicode string</i>, whose <span
title="the drag data item type string">type string</span> is
equal to the value of the method's second argument,
<span>converted to ASCII lowercase</span>, and whose data is the
string given by the method's first argument.</p>

</dd>

Expand Down Expand Up @@ -77449,7 +77464,7 @@ DND-v5: <span>DataTransferItem</span> <span title="dom-DataTransferItems-add">a

</dd>

<!--DND-v4:
<!--DND-v4: (might want to prevent duplicates like for strings; see above)
<dt>Otherwise

<dd>
Expand Down

0 comments on commit 793084f

Please sign in to comment.