Skip to content

Commit

Permalink
[e] (0) Use IDL to set setRangeText()'s selectionMode's default.
Browse files Browse the repository at this point in the history
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=23193
Affected topics: DOM APIs

git-svn-id: http://svn.whatwg.org/webapps@8184 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Sep 13, 2013
1 parent 2078715 commit cb8a9b5
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 15 deletions.
12 changes: 7 additions & 5 deletions complete.html
Expand Up @@ -45135,7 +45135,7 @@ <h4 id=the-input-element><span class=secno>4.10.7 </span>The <dfn><code>input</c
attribute unsigned long <a href=#dom-textarea/input-selectionend title=dom-textarea/input-selectionEnd>selectionEnd</a>;
attribute DOMString <a href=#dom-textarea/input-selectiondirection title=dom-textarea/input-selectionDirection>selectionDirection</a>;
void <a href=#dom-textarea/input-setrangetext title=dom-textarea/input-setRangeText>setRangeText</a>(DOMString replacement);
void <a href=#dom-textarea/input-setrangetext title=dom-textarea/input-setRangeText>setRangeText</a>(DOMString replacement, unsigned long start, unsigned long end, optional <a href=#selectionmode>SelectionMode</a> selectionMode);
void <a href=#dom-textarea/input-setrangetext title=dom-textarea/input-setRangeText>setRangeText</a>(DOMString replacement, unsigned long start, unsigned long end, optional <a href=#selectionmode>SelectionMode</a> selectionMode = "preserve");
void <a href=#dom-textarea/input-setselectionrange title=dom-textarea/input-setSelectionRange>setSelectionRange</a>(unsigned long start, unsigned long end, optional DOMString direction);

// <a href="#HTMLInputElement-partial">also has obsolete members</a>
Expand Down Expand Up @@ -51634,7 +51634,7 @@ <h4 id=the-textarea-element><span class=secno>4.10.13 </span>The <dfn><code>text
attribute unsigned long <a href=#dom-textarea/input-selectionend title=dom-textarea/input-selectionEnd>selectionEnd</a>;
attribute DOMString <a href=#dom-textarea/input-selectiondirection title=dom-textarea/input-selectionDirection>selectionDirection</a>;
void <a href=#dom-textarea/input-setrangetext title=dom-textarea/input-setRangeText>setRangeText</a>(DOMString replacement);
void <a href=#dom-textarea/input-setrangetext title=dom-textarea/input-setRangeText>setRangeText</a>(DOMString replacement, unsigned long start, unsigned long end, optional <a href=#selectionmode>SelectionMode</a> selectionMode);
void <a href=#dom-textarea/input-setrangetext title=dom-textarea/input-setRangeText>setRangeText</a>(DOMString replacement, unsigned long start, unsigned long end, optional <a href=#selectionmode>SelectionMode</a> selectionMode = "preserve");
void <a href=#dom-textarea/input-setselectionrange title=dom-textarea/input-setSelectionRange>setSelectionRange</a>(unsigned long start, unsigned long end, optional DOMString direction);
};</pre>
</dd>
Expand Down Expand Up @@ -51936,6 +51936,7 @@ <h4 id=the-textarea-element><span class=secno>4.10.13 </span>The <dfn><code>text

</dl><div class=impl>

<!--CLEANUP-->
<p>The <dfn id=dom-textarea-cols title=dom-textarea-cols><code>cols</code></dfn>, <dfn id=dom-textarea-placeholder title=dom-textarea-placeholder><code>placeholder</code></dfn>,
<dfn id=dom-textarea-required title=dom-textarea-required><code>required</code></dfn>, <dfn id=dom-textarea-rows title=dom-textarea-rows><code>rows</code></dfn>, and <dfn id=dom-textarea-wrap title=dom-textarea-wrap><code>wrap</code></dfn> attributes must
<a href=#reflect>reflect</a> the respective content attributes of the same
Expand Down Expand Up @@ -54591,18 +54592,19 @@ <h4 id=textFieldSelection><span class=secno>4.10.20 </span>APIs for the text fie
attribute unsigned long <a href=#dom-textarea/input-selectionend title=dom-textarea/input-selectionEnd>selectionEnd</a>;
attribute DOMString <a href=#dom-textarea/input-selectiondirection title=dom-textarea/input-selectionDirection>selectionDirection</a>;
void <a href=#dom-textarea/input-setrangetext title=dom-textarea/input-setRangeText>setRangeText</a>(DOMString replacement);
void <a href=#dom-textarea/input-setrangetext title=dom-textarea/input-setRangeText>setRangeText</a>(DOMString replacement, unsigned long start, unsigned long end, optional <a href=#selectionmode>SelectionMode</a> selectionMode);
void <a href=#dom-textarea/input-setrangetext title=dom-textarea/input-setRangeText>setRangeText</a>(DOMString replacement, unsigned long start, unsigned long end, optional <a href=#selectionmode>SelectionMode</a> selectionMode = "preserve");
void <a href=#dom-textarea/input-setselectionrange title=dom-textarea/input-setSelectionRange>setSelectionRange</a>(unsigned long start, unsigned long end, optional DOMString direction = "preserve");</pre>
<!-- v2: also add textLength? it seems to be widely used -->

<!--CLEANUP-->
<p>The <code title=dom-textarea/input-setRangeText><a href=#dom-textarea/input-setrangetext>setRangeText</a></code> method
uses the following enumeration:</p>

<pre class=idl>enum <dfn id=selectionmode>SelectionMode</dfn> {
"<a href=#dom-selectionmode-select title=dom-SelectionMode-select>select</a>",
"<a href=#dom-selectionmode-start title=dom-SelectionMode-start>start</a>",
"<a href=#dom-selectionmode-end title=dom-SelectionMode-end>end</a>",
"<a href=#dom-selectionmode-preserve title=dom-SelectionMode-preserve>preserve</a>",
"<a href=#dom-selectionmode-preserve title=dom-SelectionMode-preserve>preserve</a>", // default
};</pre>

<p>These methods and attributes expose and control the selection of
Expand Down Expand Up @@ -54846,7 +54848,7 @@ <h4 id=textFieldSelection><span class=secno>4.10.20 </span>APIs for the text fie

</dd>

<dt>If the fourth argument's value is "<dfn id=dom-selectionmode-preserve title=dom-SelectionMode-preserve><code>preserve</code></dfn>", or if the argument was omitted</dt>
<dt>If the fourth argument's value is "<dfn id=dom-selectionmode-preserve title=dom-SelectionMode-preserve><code>preserve</code></dfn>" (the default)</dt>

<dd>

Expand Down
12 changes: 7 additions & 5 deletions index
Expand Up @@ -45135,7 +45135,7 @@ interface <dfn id=htmlformelement>HTMLFormElement</dfn> : <a href=#htmlelement>H
attribute unsigned long <a href=#dom-textarea/input-selectionend title=dom-textarea/input-selectionEnd>selectionEnd</a>;
attribute DOMString <a href=#dom-textarea/input-selectiondirection title=dom-textarea/input-selectionDirection>selectionDirection</a>;
void <a href=#dom-textarea/input-setrangetext title=dom-textarea/input-setRangeText>setRangeText</a>(DOMString replacement);
void <a href=#dom-textarea/input-setrangetext title=dom-textarea/input-setRangeText>setRangeText</a>(DOMString replacement, unsigned long start, unsigned long end, optional <a href=#selectionmode>SelectionMode</a> selectionMode);
void <a href=#dom-textarea/input-setrangetext title=dom-textarea/input-setRangeText>setRangeText</a>(DOMString replacement, unsigned long start, unsigned long end, optional <a href=#selectionmode>SelectionMode</a> selectionMode = "preserve");
void <a href=#dom-textarea/input-setselectionrange title=dom-textarea/input-setSelectionRange>setSelectionRange</a>(unsigned long start, unsigned long end, optional DOMString direction);

// <a href="#HTMLInputElement-partial">also has obsolete members</a>
Expand Down Expand Up @@ -51634,7 +51634,7 @@ interface <dfn id=htmloptionelement>HTMLOptionElement</dfn> : <a href=#htmleleme
attribute unsigned long <a href=#dom-textarea/input-selectionend title=dom-textarea/input-selectionEnd>selectionEnd</a>;
attribute DOMString <a href=#dom-textarea/input-selectiondirection title=dom-textarea/input-selectionDirection>selectionDirection</a>;
void <a href=#dom-textarea/input-setrangetext title=dom-textarea/input-setRangeText>setRangeText</a>(DOMString replacement);
void <a href=#dom-textarea/input-setrangetext title=dom-textarea/input-setRangeText>setRangeText</a>(DOMString replacement, unsigned long start, unsigned long end, optional <a href=#selectionmode>SelectionMode</a> selectionMode);
void <a href=#dom-textarea/input-setrangetext title=dom-textarea/input-setRangeText>setRangeText</a>(DOMString replacement, unsigned long start, unsigned long end, optional <a href=#selectionmode>SelectionMode</a> selectionMode = "preserve");
void <a href=#dom-textarea/input-setselectionrange title=dom-textarea/input-setSelectionRange>setSelectionRange</a>(unsigned long start, unsigned long end, optional DOMString direction);
};</pre>
</dd>
Expand Down Expand Up @@ -51936,6 +51936,7 @@ interface <dfn id=htmloptionelement>HTMLOptionElement</dfn> : <a href=#htmleleme

</dl><div class=impl>

<!--CLEANUP-->
<p>The <dfn id=dom-textarea-cols title=dom-textarea-cols><code>cols</code></dfn>, <dfn id=dom-textarea-placeholder title=dom-textarea-placeholder><code>placeholder</code></dfn>,
<dfn id=dom-textarea-required title=dom-textarea-required><code>required</code></dfn>, <dfn id=dom-textarea-rows title=dom-textarea-rows><code>rows</code></dfn>, and <dfn id=dom-textarea-wrap title=dom-textarea-wrap><code>wrap</code></dfn> attributes must
<a href=#reflect>reflect</a> the respective content attributes of the same
Expand Down Expand Up @@ -54591,18 +54592,19 @@ MIT Room 32-G524
attribute unsigned long <a href=#dom-textarea/input-selectionend title=dom-textarea/input-selectionEnd>selectionEnd</a>;
attribute DOMString <a href=#dom-textarea/input-selectiondirection title=dom-textarea/input-selectionDirection>selectionDirection</a>;
void <a href=#dom-textarea/input-setrangetext title=dom-textarea/input-setRangeText>setRangeText</a>(DOMString replacement);
void <a href=#dom-textarea/input-setrangetext title=dom-textarea/input-setRangeText>setRangeText</a>(DOMString replacement, unsigned long start, unsigned long end, optional <a href=#selectionmode>SelectionMode</a> selectionMode);
void <a href=#dom-textarea/input-setrangetext title=dom-textarea/input-setRangeText>setRangeText</a>(DOMString replacement, unsigned long start, unsigned long end, optional <a href=#selectionmode>SelectionMode</a> selectionMode = "preserve");
void <a href=#dom-textarea/input-setselectionrange title=dom-textarea/input-setSelectionRange>setSelectionRange</a>(unsigned long start, unsigned long end, optional DOMString direction = "preserve");</pre>
<!-- v2: also add textLength? it seems to be widely used -->

<!--CLEANUP-->
<p>The <code title=dom-textarea/input-setRangeText><a href=#dom-textarea/input-setrangetext>setRangeText</a></code> method
uses the following enumeration:</p>

<pre class=idl>enum <dfn id=selectionmode>SelectionMode</dfn> {
"<a href=#dom-selectionmode-select title=dom-SelectionMode-select>select</a>",
"<a href=#dom-selectionmode-start title=dom-SelectionMode-start>start</a>",
"<a href=#dom-selectionmode-end title=dom-SelectionMode-end>end</a>",
"<a href=#dom-selectionmode-preserve title=dom-SelectionMode-preserve>preserve</a>",
"<a href=#dom-selectionmode-preserve title=dom-SelectionMode-preserve>preserve</a>", // default
};</pre>

<p>These methods and attributes expose and control the selection of
Expand Down Expand Up @@ -54846,7 +54848,7 @@ MIT Room 32-G524

</dd>

<dt>If the fourth argument's value is "<dfn id=dom-selectionmode-preserve title=dom-SelectionMode-preserve><code>preserve</code></dfn>", or if the argument was omitted</dt>
<dt>If the fourth argument's value is "<dfn id=dom-selectionmode-preserve title=dom-SelectionMode-preserve><code>preserve</code></dfn>" (the default)</dt>

<dd>

Expand Down
12 changes: 7 additions & 5 deletions source
Expand Up @@ -49436,7 +49436,7 @@ interface <dfn>HTMLFormElement</dfn> : <span>HTMLElement</span> {
attribute unsigned long <span title="dom-textarea/input-selectionEnd">selectionEnd</span>;
attribute DOMString <span title="dom-textarea/input-selectionDirection">selectionDirection</span>;
void <span title="dom-textarea/input-setRangeText">setRangeText</span>(DOMString replacement);
void <span title="dom-textarea/input-setRangeText">setRangeText</span>(DOMString replacement, unsigned long start, unsigned long end, optional <span>SelectionMode</span> selectionMode);
void <span title="dom-textarea/input-setRangeText">setRangeText</span>(DOMString replacement, unsigned long start, unsigned long end, optional <span>SelectionMode</span> selectionMode = "preserve");
void <span title="dom-textarea/input-setSelectionRange">setSelectionRange</span>(unsigned long start, unsigned long end, optional DOMString direction);
};</pre>
</dd>
Expand Down Expand Up @@ -56696,7 +56696,7 @@ interface <dfn>HTMLOptionElement</dfn> : <span>HTMLElement</span> {
attribute unsigned long <span title="dom-textarea/input-selectionEnd">selectionEnd</span>;
attribute DOMString <span title="dom-textarea/input-selectionDirection">selectionDirection</span>;
void <span title="dom-textarea/input-setRangeText">setRangeText</span>(DOMString replacement);
void <span title="dom-textarea/input-setRangeText">setRangeText</span>(DOMString replacement, unsigned long start, unsigned long end, optional <span>SelectionMode</span> selectionMode);
void <span title="dom-textarea/input-setRangeText">setRangeText</span>(DOMString replacement, unsigned long start, unsigned long end, optional <span>SelectionMode</span> selectionMode = "preserve");
void <span title="dom-textarea/input-setSelectionRange">setSelectionRange</span>(unsigned long start, unsigned long end, optional DOMString direction);
};</pre>
</dd>
Expand Down Expand Up @@ -57058,6 +57058,7 @@ interface <dfn>HTMLOptionElement</dfn> : <span>HTMLElement</span> {

<div class="impl">

<!--CLEANUP-->
<p>The <dfn title="dom-textarea-cols"><code>cols</code></dfn>, <dfn
title="dom-textarea-placeholder"><code>placeholder</code></dfn>,
<dfn title="dom-textarea-required"><code>required</code></dfn>, <dfn
Expand Down Expand Up @@ -60236,10 +60237,11 @@ MIT Room 32-G524
attribute unsigned long <span title="dom-textarea/input-selectionEnd">selectionEnd</span>;
attribute DOMString <span title="dom-textarea/input-selectionDirection">selectionDirection</span>;
void <span title="dom-textarea/input-setRangeText">setRangeText</span>(DOMString replacement);
void <span title="dom-textarea/input-setRangeText">setRangeText</span>(DOMString replacement, unsigned long start, unsigned long end, optional <span>SelectionMode</span> selectionMode);
void <span title="dom-textarea/input-setRangeText">setRangeText</span>(DOMString replacement, unsigned long start, unsigned long end, optional <span>SelectionMode</span> selectionMode = "preserve");
void <span title="dom-textarea/input-setSelectionRange">setSelectionRange</span>(unsigned long start, unsigned long end, optional DOMString direction = "preserve");</pre>
<!-- v2: also add textLength? it seems to be widely used -->

<!--CLEANUP-->
<p>The <code
title="dom-textarea/input-setRangeText">setRangeText</code> method
uses the following enumeration:</p>
Expand All @@ -60248,7 +60250,7 @@ MIT Room 32-G524
"<span title="dom-SelectionMode-select">select</span>",
"<span title="dom-SelectionMode-start">start</span>",
"<span title="dom-SelectionMode-end">end</span>",
"<span title="dom-SelectionMode-preserve">preserve</span>",
"<span title="dom-SelectionMode-preserve">preserve</span>", // default
};</pre>

<p>These methods and attributes expose and control the selection of
Expand Down Expand Up @@ -60527,7 +60529,7 @@ MIT Room 32-G524

</dd>

<dt>If the fourth argument's value is "<dfn title="dom-SelectionMode-preserve"><code>preserve</code></dfn>", or if the argument was omitted</dt>
<dt>If the fourth argument's value is "<dfn title="dom-SelectionMode-preserve"><code>preserve</code></dfn>" (the default)</dt>

<dd>

Expand Down

0 comments on commit cb8a9b5

Please sign in to comment.