Skip to content

Commit dfe8b08

Browse files
rename to PlainTextRange + tpac changes pt 2
1 parent 202f881 commit dfe8b08

File tree

1 file changed

+33
-38
lines changed

1 file changed

+33
-38
lines changed

source

Lines changed: 33 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -49832,7 +49832,7 @@ interface <dfn interface>HTMLInputElement</dfn> : <span>HTMLElement</span> {
4983249832
one, or the empty string otherwise, and then run the current <span>value sanitization
4983349833
algorithm</span>, if one is defined.</span></p>
4983449834

49835-
<p>If the element <span>supports plain text ranges</span> and this operation changes its
49835+
<p>If the element <span data-x="supports plain text ranges">supports plain text ranges</span> and this operation changes its
4983649836
<span data-x="concept-fe-value">value</span>, then the user agent must run the
4983749837
<span>plain text range full replacement steps</span> with the element, the old value's
4983849838
<span>length</span>, and the new value's <span>length</span>.</p>
@@ -49882,8 +49882,9 @@ interface <dfn interface>HTMLInputElement</dfn> : <span>HTMLElement</span> {
4988249882
data-x="concept-input-type-file-selected">selected files</span>, and then invoke the <span>value
4988349883
sanitization algorithm</span>, if the <code data-x="attr-input-type">type</code> attribute's
4988449884
current state defines one.</p>
49885+
</div>
4988549886

49886-
<p>If the element <span>supports plain text ranges</span> and its
49887+
<p>If the element <span data-x="supports plain text ranges">supports plain text ranges</span> and its
4988749888
<span data-x="concept-fe-value">value</span> has changed as a result of this algorithm, then the
4988849889
user agent must run the <span>plain text range full replacement steps</span> with the element, the
4988949890
old value's <span>length</span>, and the new value's <span>length</span>.</p>
@@ -50169,7 +50170,6 @@ interface <dfn interface>HTMLInputElement</dfn> : <span>HTMLElement</span> {
5016950170
</div>
5017050171

5017150172

50172-
5017350173
<h5>States of the <code data-x="attr-input-type">type</code> attribute</h5>
5017450174

5017550175

@@ -54812,11 +54812,11 @@ You cannot submit this form when the field is incorrect.</samp></pre>
5481254812
<li><p>Invoke the <span>value sanitization algorithm</span>, if the element's <code
5481354813
data-x="attr-input-type">type</code> attribute's current state defines one.</p></li>
5481454814

54815-
<li><p>If the element's <span data-x="concept-fe-value">value</span> is different from
54816-
<var>oldValue</var>, and the element <span>supports plain text ranges</span>, then the user
54817-
agent must run the <span>plain text range full replacement steps</span> with
54818-
<var>element</var>, <var>oldValue</var>'s <span>length</span>, and the current
54819-
<span data-x="concept-fe-value">value</span>'s <span>length</span>.</p></li>
54815+
<li><p>If the element's <span data-x="concept-fe-value">value</span> is different from
54816+
<var>oldValue</var>, and the element <span data-x="supports plain text ranges">supports plain text ranges</span>, then run the
54817+
<span>plain text range full replacement steps</span> with the element, <var>oldValue</var>'s
54818+
<span>length</span>, and the current <span data-x="concept-fe-value">value</span>'s
54819+
<span>length</span>.</p></li>
5482054820

5482154821
<li><p>If the element's <span data-x="concept-fe-value">value</span> (after applying the
5482254822
<span>value sanitization algorithm</span>) is different from <var>oldValue</var>, and the
@@ -57548,10 +57548,9 @@ interface <dfn interface>HTMLTextAreaElement</dfn> : <span>HTMLElement</span> {
5754857548
interaction before queuing the task; for example, a user agent could wait for the user to have not
5754957549
hit a key for 100ms, so as to only fire the event when the user pauses, instead of continuously
5755057550
for each keystroke.</p>
57551-
<p>Before queuing that task, the user agent must run the
57552-
<a href="#form-control-range-adjustment">form control range value mutation algorithm</a> for this
57553-
element, using the edit's <var>offset</var>, <var>deleted length</var>, and <var>inserted length</var>
57554-
to describe the change.</p>
57551+
<p>Before queuing that task, if the element <span data-x="supports plain text ranges">supports plain text ranges</span>, then run the
57552+
<span>plain text range value mutation steps</span> with the element, the edit's <var>offset</var>,
57553+
<var>deleted length</var>, and <var>inserted length</var> to describe the change.</p>
5755557554
</div>
5755657555
<!-- same text is present in the <input> section -->
5755757556

@@ -57573,23 +57572,24 @@ interface <dfn interface>HTMLTextAreaElement</dfn> : <span>HTMLElement</span> {
5757357572
element's <span data-x="concept-fe-dirty">dirty value flag</span> is false, set the element's
5757457573
<span data-x="concept-textarea-raw-value">raw value</span> to its <span>child text
5757557574
content</span>. If this changes the element's <span data-x="concept-textarea-raw-value">raw value</span>,
57576-
then run the <a href="#form-control-range-adjustment">form control range value mutation algorithm</a>
57577-
for the element, with a change offset of 0, a deleted length equal to the length of the previous
57578-
<span data-x="concept-fe-api-value">API value</span>, and an inserted length equal to the length
57579-
of the new <span data-x="concept-fe-api-value">API value</span>.</p>
57575+
and the element <span data-x="supports plain text ranges">supports plain text ranges</span>, then the user agent must run the
57576+
<span>plain text range full replacement steps</span> with the element, the length of the previous
57577+
<span data-x="concept-fe-api-value">API value</span>, and the length of the new
57578+
<span data-x="concept-fe-api-value">API value</span>.</p>
5758057579
</div>
5758157580

5758257581
<div algorithm>
5758357582
<p>The <span data-x="concept-form-reset-control">reset algorithm</span> for <code>textarea</code>
5758457583
elements is to set the <span>user validity</span> to false, the <span
5758557584
data-x="concept-fe-dirty">dirty value flag</span> back to false, and the <span
5758657585
data-x="concept-textarea-raw-value">raw value</span> to its <span>child text
57587-
content</span>. If this changes the element's <span data-x="concept-fe-api-value">API value</span>,
57588-
then run the <a href="#form-control-range-adjustment">form control range value mutation algorithm</a>
57589-
for the element, with a change offset of 0, a deleted length equal to the length of the previous
57590-
<span data-x="concept-fe-api-value">API value</span>, and an inserted length equal to the length
57591-
of the new <span data-x="concept-fe-api-value">API value</span>.</p>
57592-
</div>
57586+
content</span>. If this changes the element's
57587+
<span data-x="concept-fe-api-value">API value</span>, and the element
57588+
<span data-x="supports plain text ranges">supports plain text ranges</span>, then the user agent must run the
57589+
<span>plain text range full replacement steps</span> with the element, the length of the previous
57590+
<span data-x="concept-fe-api-value">API value</span>, and the length of the new
57591+
<span data-x="concept-fe-api-value">API value</span>.</p>
57592+
/div>
5759357593

5759457594
<div algorithm>
5759557595
<p>When a <code>textarea</code> element is popped off the <span>stack of open elements</span> of
@@ -57846,11 +57846,11 @@ interface <dfn interface>HTMLTextAreaElement</dfn> : <span>HTMLElement</span> {
5784657846
<div algorithm>
5784757847
<p>The <code data-x="dom-textarea-defaultValue">defaultValue</code> attribute's setter must
5784857848
<span>string replace all</span> with the given value within this element.
57849-
If this changes the element's <span data-x="concept-textarea-raw-value">raw value</span>,
57850-
then run the <a href="#form-control-range-adjustment">form control range value mutation algorithm</a>
57851-
for the element, with a change offset of 0, a deleted length equal to the length of the previous
57852-
<span data-x="concept-fe-api-value">API value</span>, and an inserted length equal to the length
57853-
of the new <span data-x="concept-fe-api-value">API value</span>.</p>
57849+
If this changes the element's <span data-x="concept-textarea-raw-value">raw value</span>, and the
57850+
element <span data-x="supports plain text ranges">supports plain text ranges</span>, then the user
57851+
agent must run the <span>plain text range full replacement steps</span> with the element, the
57852+
length of the previous <span data-x="concept-fe-api-value">API value</span>, and the length of the
57853+
new <span data-x="concept-fe-api-value">API value</span>.</p>
5785457854
</div>
5785557855

5785657856
<div algorithm>
@@ -57868,10 +57868,10 @@ interface <dfn interface>HTMLTextAreaElement</dfn> : <span>HTMLElement</span> {
5786857868

5786957869
<li><p>Set this element's <span data-x="concept-fe-dirty">dirty value flag</span> to true.</p></li>
5787057870

57871-
<li><p>If this changes the element's <span data-x="concept-fe-api-value">API value</span>, then run the
57872-
<a href="#form-control-range-adjustment">form control range value mutation algorithm</a> for this
57873-
element, with a change offset of 0, a deleted length equal to the <span>length</span> of
57874-
<var>oldAPIValue</var>, and an inserted length equal to the <span>length</span> of the element's new
57871+
<li><p>If this changes the element's <span data-x="concept-fe-api-value">API value</span>, and the
57872+
element <span data-x="supports plain text ranges">supports plain text ranges</span>, then the user
57873+
agent must run the <span>plain text range full replacement steps</span> with this element, the
57874+
<span>length</span> of <var>oldAPIValue</var>, and the <span>length</span> of the element's new
5787557875
<span data-x="concept-fe-api-value">API value</span>.</p></li>
5787657876

5787757877
<li><p>If the new <span data-x="concept-fe-api-value">API value</span> is different from
@@ -61730,11 +61730,6 @@ MIT Room 32-G524
6173061730

6173161731
<h4 id="textFieldSelection">APIs for the text control selections</h4>
6173261732

61733-
<p class="note">
61734-
Text-entry controls support <code>FormControlRange</code>. Liveness is maintained by HTML's
61735-
<a href="#algo-adjust-fcr">form-control range adjustment</a> algorithm, and the algorithms
61736-
in this section invoke it whenever they modify a control's value string.</p>
61737-
6173861733
<!-- v2 idea: DOM Range APIs to expose the textarea/input edited value (ack martijnw) -->
6173961734

6174061735
<p>The <code>input</code> and <code>textarea</code> elements define several attributes and methods
@@ -62187,8 +62182,8 @@ MIT Room 32-G524
6218762182

6218862183
<li><p>Let <var>deleted count</var> be max(0, <var>end</var> minus <var>start</var>).</p></li>
6218962184

62190-
<li><p>If this element <a href="#supports-form-control-range">supports form control range</a>,
62191-
then run the <a href="#form-control-range-adjustment">form control range value mutation algorithm</a>
62185+
<li><p>If this element <a>supports plain text ranges</a>,
62186+
then run the <a href="#plain-text-range-adjustment">plain text range value mutation algorithm</a>
6219262187
with this element, <var>start</var>, <var>deleted count</var>, and <var>new length</var>.</p></li>
6219362188

6219462189
<li>

0 commit comments

Comments
 (0)