Skip to content

Commit

Permalink
[giow] (2) Tighten up the definition of how selections are deleted in…
Browse files Browse the repository at this point in the history
… drag-and-drop.

Affected topics: HTML

git-svn-id: http://svn.whatwg.org/webapps@7154 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jun 28, 2012
1 parent 7cd3e9c commit 6337594
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 60 deletions.
48 changes: 28 additions & 20 deletions complete.html
Original file line number Diff line number Diff line change
Expand Up @@ -3174,8 +3174,8 @@ <h4 id=resources><span class=secno>2.1.1 </span>Resources</h4>
rendered, even if, unbeknownst to the implementation, the image also
contained animation data.</p>

<p class=example>A MPEG-4 video file would not be considered to be
in a supported format if the compression format used was not
<p class=example>An MPEG-4 video file would not be considered to
be in a supported format if the compression format used was not
supported, even if the implementation could determine the dimensions
of the movie from the file's metadata.</p>

Expand Down Expand Up @@ -76402,10 +76402,10 @@ <h4 id=editing-apis><span class=secno>8.6.4 </span>Editing APIs</h4>
<dfn id=dom-document-querycommandsupported title=dom-document-queryCommandSupported><code>queryCommandSupported()</code></dfn>, and
<dfn id=dom-document-querycommandvalue title=dom-document-queryCommandValue><code>queryCommandValue()</code></dfn>

methods, and text selections are defined in the HTML Editing APIs
specification. The interaction of editing and the undo/redo features
in user agents is defined by the UndoManager and DOM Transaction
specification. <a href=#refsEDITING>[EDITING]</a> <a href=#refsUNDO>[UNDO]</a></p>
methods, text selections, and the <dfn id=delete-the-selection>delete the selection</dfn>
algorithm are defined in the HTML Editing APIs specification. The
interaction of editing and the undo/redo features in user agents is
defined by the UndoManager and DOM Transaction specification. <a href=#refsEDITING>[EDITING]</a> <a href=#refsUNDO>[UNDO]</a></p>

<!-- those might get merged in here eventually -->

Expand Down Expand Up @@ -78488,22 +78488,16 @@ <h4 id=drag-and-drop-processing-model><span class=secno>8.7.5 </span>Drag-and-dr
default action of the <code title=event-dragend><a href=#event-dragend>dragend</a></code>
event:</p>

<dl class=switch><dt>If <var title="">dropped</var> is true, and the
<a href=#current-target-element>current target element</a> is a text field (e.g.
<code><a href=#the-textarea-element>textarea</a></code>, or an <code><a href=#the-input-element>input</a></code> element whose
<code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the
<a href="#text-(type=text)-state-and-search-state-(type=search)" title=attr-input-type-text>Text</a> state), and the
<dl class=switch><dt>If <var title="">dropped</var> is true, the <a href=#current-target-element>current
target element</a> is a <i>text field</i> (see below), the
<a href=#current-drag-operation>current drag operation</a> is "<code title="">move</code>", and the source of the drag-and-drop
operation is a selection in the DOM</dt>
operation is a selection in the DOM that is entirely contained
within an <a href=#editing-host>editing host</a></dt>

<dd><p>The user agent should delete the range representing the
dragged selection from the DOM.</dd>
<dd><p><a href=#delete-the-selection>Delete the selection</a>.</dd>

<dt>If <var title="">dropped</var> is true, and the
<a href=#current-target-element>current target element</a> is a text field (e.g.
<code><a href=#the-textarea-element>textarea</a></code>, or an <code><a href=#the-input-element>input</a></code> element whose
<code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the
<a href="#text-(type=text)-state-and-search-state-(type=search)" title=attr-input-type-text>Text</a> state), and the
<dt>If <var title="">dropped</var> is true, the <a href=#current-target-element>current
target element</a> is a <i>text field</i> (see below), the
<a href=#current-drag-operation>current drag operation</a> is "<code title="">move</code>", and the source of the drag-and-drop
operation is a selection in a text field</dt>

Expand All @@ -78522,7 +78516,21 @@ <h4 id=drag-and-drop-processing-model><span class=secno>8.7.5 </span>Drag-and-dr

<dd><p>The event has no default action.</dd>

</dl></li>
</dl><p>For the purposes of this step, a <i>text field</i> is a
<code><a href=#the-textarea-element>textarea</a></code> element or an <code><a href=#the-input-element>input</a></code> element
whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in
one of the
<a href="#text-(type=text)-state-and-search-state-(type=search)" title=attr-input-type-text>Text</a>,
<a href="#text-(type=text)-state-and-search-state-(type=search)" title=attr-input-type-search>Search</a>,
<a href="#telephone-state-(type=tel)" title=attr-input-type-tel>Tel</a>,
<a href="#url-state-(type=url)" title=attr-input-type-url>URL</a>,
<a href="#e-mail-state-(type=email)" title=attr-input-type-email>E-mail</a>,
<a href="#password-state-(type=password)" title=attr-input-type-password>Password</a>, or
<a href="#number-state-(type=number)" title=attr-input-type-number>Number</a>
states.</p>


</li>

</ol></li>

Expand Down
48 changes: 28 additions & 20 deletions index
Original file line number Diff line number Diff line change
Expand Up @@ -3174,8 +3174,8 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
rendered, even if, unbeknownst to the implementation, the image also
contained animation data.</p>

<p class=example>A MPEG-4 video file would not be considered to be
in a supported format if the compression format used was not
<p class=example>An MPEG-4 video file would not be considered to
be in a supported format if the compression format used was not
supported, even if the implementation could determine the dimensions
of the movie from the file's metadata.</p>

Expand Down Expand Up @@ -76402,10 +76402,10 @@ addShortcutKeyLabel(document.getElementById('c'));</pre>
<dfn id=dom-document-querycommandsupported title=dom-document-queryCommandSupported><code>queryCommandSupported()</code></dfn>, and
<dfn id=dom-document-querycommandvalue title=dom-document-queryCommandValue><code>queryCommandValue()</code></dfn>

methods, and text selections are defined in the HTML Editing APIs
specification. The interaction of editing and the undo/redo features
in user agents is defined by the UndoManager and DOM Transaction
specification. <a href=#refsEDITING>[EDITING]</a> <a href=#refsUNDO>[UNDO]</a></p>
methods, text selections, and the <dfn id=delete-the-selection>delete the selection</dfn>
algorithm are defined in the HTML Editing APIs specification. The
interaction of editing and the undo/redo features in user agents is
defined by the UndoManager and DOM Transaction specification. <a href=#refsEDITING>[EDITING]</a> <a href=#refsUNDO>[UNDO]</a></p>

<!-- those might get merged in here eventually -->

Expand Down Expand Up @@ -78488,22 +78488,16 @@ dictionary <dfn id=drageventinit>DragEventInit</dfn> : <a href=#mouseeventinit>M
default action of the <code title=event-dragend><a href=#event-dragend>dragend</a></code>
event:</p>

<dl class=switch><dt>If <var title="">dropped</var> is true, and the
<a href=#current-target-element>current target element</a> is a text field (e.g.
<code><a href=#the-textarea-element>textarea</a></code>, or an <code><a href=#the-input-element>input</a></code> element whose
<code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the
<a href="#text-(type=text)-state-and-search-state-(type=search)" title=attr-input-type-text>Text</a> state), and the
<dl class=switch><dt>If <var title="">dropped</var> is true, the <a href=#current-target-element>current
target element</a> is a <i>text field</i> (see below), the
<a href=#current-drag-operation>current drag operation</a> is "<code title="">move</code>", and the source of the drag-and-drop
operation is a selection in the DOM</dt>
operation is a selection in the DOM that is entirely contained
within an <a href=#editing-host>editing host</a></dt>

<dd><p>The user agent should delete the range representing the
dragged selection from the DOM.</dd>
<dd><p><a href=#delete-the-selection>Delete the selection</a>.</dd>

<dt>If <var title="">dropped</var> is true, and the
<a href=#current-target-element>current target element</a> is a text field (e.g.
<code><a href=#the-textarea-element>textarea</a></code>, or an <code><a href=#the-input-element>input</a></code> element whose
<code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the
<a href="#text-(type=text)-state-and-search-state-(type=search)" title=attr-input-type-text>Text</a> state), and the
<dt>If <var title="">dropped</var> is true, the <a href=#current-target-element>current
target element</a> is a <i>text field</i> (see below), the
<a href=#current-drag-operation>current drag operation</a> is "<code title="">move</code>", and the source of the drag-and-drop
operation is a selection in a text field</dt>

Expand All @@ -78522,7 +78516,21 @@ dictionary <dfn id=drageventinit>DragEventInit</dfn> : <a href=#mouseeventinit>M

<dd><p>The event has no default action.</dd>

</dl></li>
</dl><p>For the purposes of this step, a <i>text field</i> is a
<code><a href=#the-textarea-element>textarea</a></code> element or an <code><a href=#the-input-element>input</a></code> element
whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in
one of the
<a href="#text-(type=text)-state-and-search-state-(type=search)" title=attr-input-type-text>Text</a>,
<a href="#text-(type=text)-state-and-search-state-(type=search)" title=attr-input-type-search>Search</a>,
<a href="#telephone-state-(type=tel)" title=attr-input-type-tel>Tel</a>,
<a href="#url-state-(type=url)" title=attr-input-type-url>URL</a>,
<a href="#e-mail-state-(type=email)" title=attr-input-type-email>E-mail</a>,
<a href="#password-state-(type=password)" title=attr-input-type-password>Password</a>, or
<a href="#number-state-(type=number)" title=attr-input-type-number>Number</a>
states.</p>


</li>

</ol></li>

Expand Down
48 changes: 28 additions & 20 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -2046,8 +2046,8 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
rendered, even if, unbeknownst to the implementation, the image also
contained animation data.</p>

<p class="example">A MPEG-4 video file would not be considered to be
in a supported format if the compression format used was not
<p class="example">An MPEG-4 video file would not be considered to
be in a supported format if the compression format used was not
supported, even if the implementation could determine the dimensions
of the movie from the file's metadata.</p>

Expand Down Expand Up @@ -89413,11 +89413,11 @@ addShortcutKeyLabel(document.getElementById('c'));</pre>
<dfn title="dom-document-queryCommandSupported"><code>queryCommandSupported()</code></dfn>, and
<dfn title="dom-document-queryCommandValue"><code>queryCommandValue()</code></dfn>

methods, and text selections are defined in the HTML Editing APIs
specification. The interaction of editing and the undo/redo features
in user agents is defined by the UndoManager and DOM Transaction
specification. <a href="#refsEDITING">[EDITING]</a> <a
href="#refsUNDO">[UNDO]</a></p>
methods, text selections, and the <dfn>delete the selection</dfn>
algorithm are defined in the HTML Editing APIs specification. The
interaction of editing and the undo/redo features in user agents is
defined by the UndoManager and DOM Transaction specification. <a
href="#refsEDITING">[EDITING]</a> <a href="#refsUNDO">[UNDO]</a></p>

<!-- those might get merged in here eventually -->

Expand Down Expand Up @@ -91918,23 +91918,17 @@ dictionary <dfn>DragEventInit</dfn> : <span>MouseEventInit</span> {

<dl class="switch">

<dt>If <var title="">dropped</var> is true, and the
<span>current target element</span> is a text field (e.g.
<code>textarea</code>, or an <code>input</code> element whose
<code title="attr-input-type">type</code> attribute is in the
<span title="attr-input-type-text">Text</span> state), and the
<dt>If <var title="">dropped</var> is true, the <span>current
target element</span> is a <i>text field</i> (see below), the
<span>current drag operation</span> is "<code
title="">move</code>", and the source of the drag-and-drop
operation is a selection in the DOM</dt>
operation is a selection in the DOM that is entirely contained
within an <span>editing host</span></dt>

<dd><p>The user agent should delete the range representing the
dragged selection from the DOM.</p></dd>
<dd><p><span>Delete the selection</span>.</p></dd>

<dt>If <var title="">dropped</var> is true, and the
<span>current target element</span> is a text field (e.g.
<code>textarea</code>, or an <code>input</code> element whose
<code title="attr-input-type">type</code> attribute is in the
<span title="attr-input-type-text">Text</span> state), and the
<dt>If <var title="">dropped</var> is true, the <span>current
target element</span> is a <i>text field</i> (see below), the
<span>current drag operation</span> is "<code
title="">move</code>", and the source of the drag-and-drop
operation is a selection in a text field</dt>
Expand All @@ -91957,6 +91951,20 @@ dictionary <dfn>DragEventInit</dfn> : <span>MouseEventInit</span> {

</dl>

<p>For the purposes of this step, a <i>text field</i> is a
<code>textarea</code> element or an <code>input</code> element
whose <code title="attr-input-type">type</code> attribute is in
one of the
<span title="attr-input-type-text">Text</span>,
<span title="attr-input-type-search">Search</span>,
<span title="attr-input-type-tel">Tel</span>,
<span title="attr-input-type-url">URL</span>,
<span title="attr-input-type-email">E-mail</span>,
<span title="attr-input-type-password">Password</span>, or
<span title="attr-input-type-number">Number</span>
states.</p>


</li>

</ol>
Expand Down

0 comments on commit 6337594

Please sign in to comment.