Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[giow] (1) autofill: requestAutocomplete() should not need the form i…
…n a Document; section-* should be opaque.

Affected topics: HTML

git-svn-id: http://svn.whatwg.org/webapps@8648 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed May 22, 2014
1 parent ce240bd commit b5cf45a
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 12 deletions.
16 changes: 12 additions & 4 deletions complete.html
Expand Up @@ -48520,9 +48520,10 @@ <h6 id=processing-model-2><span class=secno>4.10.19.8.2 </span>Processing model<
<p>The <a href=#autofill-hint-set>autofill hint set</a> identifies what address or contact information type the user
agent is to look at, e.g. "<code title=attr-fe-autocomplete-shipping><a href=#attr-fe-autocomplete-shipping>shipping</a></code> <code title=attr-fe-autocomplete-fax><a href=#attr-fe-autocomplete-fax>fax</a></code>" or "<code title=attr-fe-autocomplete-billing><a href=#attr-fe-autocomplete-billing>billing</a></code>".</p>

<!--CLEANUP-->
<p>The <a href=#autofill-scope>autofill scope</a> identifies the group of fields that are to be filled with the
information from the same source, and consists of the <a href=#autofill-hint-set>autofill hint set</a> with, if
applicable, the "<code title="">section-*</code>" prefix, e.g. "billing", "<code title="">section-parent shipping</code>", or "<code title="">section-child home
applicable, the "<code title="">section-*</code>" prefix, e.g. "<code title="">billing</code>", "<code title="">section-parent shipping</code>", or "<code title="">section-child home
shipping</code>".</p>

<p>These values are defined as the result of running the following algorithm:</p>
Expand Down Expand Up @@ -48934,6 +48935,13 @@ <h6 id=processing-model-2><span class=secno>4.10.19.8.2 </span>Processing model<
<p class=example>Similarly, if a form for some reason contained both a "<code title=attr-fe-autocomplete-cc-exp><a href=#attr-fe-autocomplete-cc-exp>cc-exp</a></code>" field and a "<code title=attr-fe-autocomplete-cc-exp-month><a href=#attr-fe-autocomplete-cc-exp-month>cc-exp-month</a></code>" field, and the user agent
prefilled the form, then the month component of the former would have to match the latter.</p>

<p>The "<code title="">section-*</code>" tokens in the <a href=#autofill-scope>autofill scope</a> are opaque;
user agents must not attempt to derive meaning from the precise values of these tokens.</p>

<p class=example>For example, it would not be conforming if the user agent decided that it
should offer the address it knows to be the user's daughter's address for "<code title="">section-child</code>" and the addresses it knows to be the user's spouses' addresses for
"<code title="">section-spouse</code>".

<p>The autocompletion mechanism must be implemented by the user agent acting as if the user had
modified the <a href="#control's-data">control's data</a>, and must be done at a time where the element is <i title=concept-fe-mutable><a href=#concept-fe-mutable>mutable</a></i> (e.g. just after the element has been inserted into the
document, or when the user agent <a href=#stop-parsing title="stop parsing">stops parsing</a>). User agents
Expand All @@ -48946,6 +48954,7 @@ <h6 id=processing-model-2><span class=secno>4.10.19.8.2 </span>Processing model<
the field. It would not be conforming to somehow set the <code><a href=#the-select-element>select</a></code> element to the value
"Evan", since the user could not have done so themselves.</p>

<!--CLEANUP-->
<p>A user agent prefilling a form control's <a href=#concept-fe-value title=concept-fe-value>value</a> must not
cause that control to <a href=#suffering-from-a-type-mismatch title="suffering from a type mismatch">suffer from a type
mismatch</a>, <a href=#suffering-from-being-too-long title="suffering from being too long">suffer from being too long</a>,
Expand Down Expand Up @@ -49048,8 +49057,6 @@ <h6 id=user-interface-for-bulk-autofill><span class=secno>4.10.19.8.3 </span>Use

<ul><li><p>the algorithm is not <a href=#allowed-to-show-a-popup>allowed to show a popup</a></li>

<li><p><var title="">form</var> is not <a href=#in-a-document>in a <code>Document</code></a></li>

<li><p><var title="">form</var>'s <code><a href=#document>Document</a></code> is not <a href=#fully-active>fully
active</a></li>

Expand All @@ -49059,7 +49066,8 @@ <h6 id=user-interface-for-bulk-autofill><span class=secno>4.10.19.8.3 </span>Use
<li><p>the user has disabled this feature for this <var title="">form</var>'s
<code><a href=#document>Document</a></code>'s <a href=#origin>origin</a></li>

<li><p>the user agent does not support this <var title="">form</var>'s fields</li>
<li><p>the user agent does not support this <var title="">form</var>'s fields (e.g. the form
has different fields whose <a href=#autofill-scope>autofill scope</a> use different "<code title="">section-*</code>" tokens)</li>

<li><p>the <var title="">form</var> was obtained via unencrypted channels and the user agent
does not support autofill in such situations</li>
Expand Down
16 changes: 12 additions & 4 deletions index
Expand Up @@ -48520,9 +48520,10 @@ MIT Room 32-G524
<p>The <a href=#autofill-hint-set>autofill hint set</a> identifies what address or contact information type the user
agent is to look at, e.g. "<code title=attr-fe-autocomplete-shipping><a href=#attr-fe-autocomplete-shipping>shipping</a></code> <code title=attr-fe-autocomplete-fax><a href=#attr-fe-autocomplete-fax>fax</a></code>" or "<code title=attr-fe-autocomplete-billing><a href=#attr-fe-autocomplete-billing>billing</a></code>".</p>

<!--CLEANUP-->
<p>The <a href=#autofill-scope>autofill scope</a> identifies the group of fields that are to be filled with the
information from the same source, and consists of the <a href=#autofill-hint-set>autofill hint set</a> with, if
applicable, the "<code title="">section-*</code>" prefix, e.g. "billing", "<code title="">section-parent shipping</code>", or "<code title="">section-child home
applicable, the "<code title="">section-*</code>" prefix, e.g. "<code title="">billing</code>", "<code title="">section-parent shipping</code>", or "<code title="">section-child home
shipping</code>".</p>

<p>These values are defined as the result of running the following algorithm:</p>
Expand Down Expand Up @@ -48934,6 +48935,13 @@ MIT Room 32-G524
<p class=example>Similarly, if a form for some reason contained both a "<code title=attr-fe-autocomplete-cc-exp><a href=#attr-fe-autocomplete-cc-exp>cc-exp</a></code>" field and a "<code title=attr-fe-autocomplete-cc-exp-month><a href=#attr-fe-autocomplete-cc-exp-month>cc-exp-month</a></code>" field, and the user agent
prefilled the form, then the month component of the former would have to match the latter.</p>

<p>The "<code title="">section-*</code>" tokens in the <a href=#autofill-scope>autofill scope</a> are opaque;
user agents must not attempt to derive meaning from the precise values of these tokens.</p>

<p class=example>For example, it would not be conforming if the user agent decided that it
should offer the address it knows to be the user's daughter's address for "<code title="">section-child</code>" and the addresses it knows to be the user's spouses' addresses for
"<code title="">section-spouse</code>".

<p>The autocompletion mechanism must be implemented by the user agent acting as if the user had
modified the <a href="#control's-data">control's data</a>, and must be done at a time where the element is <i title=concept-fe-mutable><a href=#concept-fe-mutable>mutable</a></i> (e.g. just after the element has been inserted into the
document, or when the user agent <a href=#stop-parsing title="stop parsing">stops parsing</a>). User agents
Expand All @@ -48946,6 +48954,7 @@ MIT Room 32-G524
the field. It would not be conforming to somehow set the <code><a href=#the-select-element>select</a></code> element to the value
"Evan", since the user could not have done so themselves.</p>

<!--CLEANUP-->
<p>A user agent prefilling a form control's <a href=#concept-fe-value title=concept-fe-value>value</a> must not
cause that control to <a href=#suffering-from-a-type-mismatch title="suffering from a type mismatch">suffer from a type
mismatch</a>, <a href=#suffering-from-being-too-long title="suffering from being too long">suffer from being too long</a>,
Expand Down Expand Up @@ -49048,8 +49057,6 @@ MIT Room 32-G524

<ul><li><p>the algorithm is not <a href=#allowed-to-show-a-popup>allowed to show a popup</a></li>

<li><p><var title="">form</var> is not <a href=#in-a-document>in a <code>Document</code></a></li>

<li><p><var title="">form</var>'s <code><a href=#document>Document</a></code> is not <a href=#fully-active>fully
active</a></li>

Expand All @@ -49059,7 +49066,8 @@ MIT Room 32-G524
<li><p>the user has disabled this feature for this <var title="">form</var>'s
<code><a href=#document>Document</a></code>'s <a href=#origin>origin</a></li>

<li><p>the user agent does not support this <var title="">form</var>'s fields</li>
<li><p>the user agent does not support this <var title="">form</var>'s fields (e.g. the form
has different fields whose <a href=#autofill-scope>autofill scope</a> use different "<code title="">section-*</code>" tokens)</li>

<li><p>the <var title="">form</var> was obtained via unencrypted channels and the user agent
does not support autofill in such situations</li>
Expand Down
18 changes: 14 additions & 4 deletions source
Expand Up @@ -52164,9 +52164,10 @@ MIT Room 32-G524
data-x="attr-fe-autocomplete-fax">fax</code>" or "<code
data-x="attr-fe-autocomplete-billing">billing</code>".</p>

<!--CLEANUP-->
<p>The <span>autofill scope</span> identifies the group of fields that are to be filled with the
information from the same source, and consists of the <span>autofill hint set</span> with, if
applicable, the "<code data-x="">section-*</code>" prefix, e.g. "billing", "<code
applicable, the "<code data-x="">section-*</code>" prefix, e.g. "<code data-x="">billing</code>", "<code
data-x="">section-parent shipping</code>", or "<code data-x="">section-child home
shipping</code>".</p>

Expand Down Expand Up @@ -52694,6 +52695,14 @@ MIT Room 32-G524
data-x="attr-fe-autocomplete-cc-exp-month">cc-exp-month</code>" field, and the user agent
prefilled the form, then the month component of the former would have to match the latter.</p>

<p>The "<code data-x="">section-*</code>" tokens in the <span>autofill scope</span> are opaque;
user agents must not attempt to derive meaning from the precise values of these tokens.</p>

<p class="example">For example, it would not be conforming if the user agent decided that it
should offer the address it knows to be the user's daughter's address for "<code
data-x="">section-child</code>" and the addresses it knows to be the user's spouses' addresses for
"<code data-x="">section-spouse</code>".

<p>The autocompletion mechanism must be implemented by the user agent acting as if the user had
modified the <span>control's data</span>, and must be done at a time where the element is <i
data-x="concept-fe-mutable">mutable</i> (e.g. just after the element has been inserted into the
Expand All @@ -52707,6 +52716,7 @@ MIT Room 32-G524
the field. It would not be conforming to somehow set the <code>select</code> element to the value
"Evan", since the user could not have done so themselves.</p>

<!--CLEANUP-->
<p>A user agent prefilling a form control's <span data-x="concept-fe-value">value</span> must not
cause that control to <span data-x="suffering from a type mismatch">suffer from a type
mismatch</span>, <span data-x="suffering from being too long">suffer from being too long</span>,
Expand Down Expand Up @@ -52828,8 +52838,6 @@ MIT Room 32-G524

<li><p>the algorithm is not <span>allowed to show a popup</span></p></li>

<li><p><var data-x="">form</var> is not <span>in a <code>Document</code></span></p></li>

<li><p><var data-x="">form</var>'s <code>Document</code> is not <span>fully
active</span></p></li>

Expand All @@ -52839,7 +52847,9 @@ MIT Room 32-G524
<li><p>the user has disabled this feature for this <var data-x="">form</var>'s
<code>Document</code>'s <span>origin</span></p></li>

<li><p>the user agent does not support this <var data-x="">form</var>'s fields</p></li>
<li><p>the user agent does not support this <var data-x="">form</var>'s fields (e.g. the form
has different fields whose <span>autofill scope</span> use different "<code
data-x="">section-*</code>" tokens)</p></li>

<li><p>the <var data-x="">form</var> was obtained via unencrypted channels and the user agent
does not support autofill in such situations</p></li>
Expand Down

0 comments on commit b5cf45a

Please sign in to comment.