Skip to content

Commit

Permalink
[e] (0) Fix example that didn't make much sense in <map> section...
Browse files Browse the repository at this point in the history
Affected topics: HTML

git-svn-id: http://svn.whatwg.org/webapps@8650 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed May 30, 2014
1 parent 4557434 commit 88f8bf1
Show file tree
Hide file tree
Showing 3 changed files with 113 additions and 39 deletions.
73 changes: 55 additions & 18 deletions complete.html
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@
</script><body onload=init()>
<header class="head with-buttons" id=head><p><a href=//www.whatwg.org/ class=logo><img width=101 src=/images/logo alt=WHATWG height=101></a></p>
<hgroup><h1 class=allcaps>HTML</h1>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 23 May 2014</h2>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 30 May 2014</h2>
</hgroup><div>
<div>
<a href=//whatwg.org/html><span><strong>Multipage Version</strong> <code>whatwg.org/html</code></span></a>
Expand Down Expand Up @@ -20997,9 +20997,11 @@ <h4 id=the-img-element><span class=secno>4.7.1 </span>The <dfn><code>img</code><
must obtain images immediately.</p>

<p>A user agent that obtains images immediately must synchronously <a href=#update-the-image-data>update the image
data</a> of an <code><a href=#the-img-element>img</a></code> element whenever that element is created with a <code title=attr-img-src><a href=#attr-img-src>src</a></code> attribute, a <code title=attr-img-srcset><a href=#attr-img-srcset>srcset</a></code>
attribute, or both. A user agent that obtains images immediately must also synchronously
<a href=#update-the-image-data>update the image data</a> of an <code><a href=#the-img-element>img</a></code> element whenever that element has its
data</a> of an <code><a href=#the-img-element>img</a></code> element that has the
<a href=#img-parser-created title=img-parser-created>parser-created flag</a> set to true whenever that element is
inserted into another <code><a href=#node>Node</a></code>. A user agent that obtains images immediately must also synchronously
<a href=#update-the-image-data>update the image data</a> of an <code><a href=#the-img-element>img</a></code> element whenever that element
is created and has the <a href=#img-parser-created title=img-parser-created>parser-created flag</a> unset, or has its
<code title=attr-img-src><a href=#attr-img-src>src</a></code>, <code title=attr-img-srcset><a href=#attr-img-srcset>srcset</a></code>, or <code title=attr-img-crossorigin><a href=#attr-img-crossorigin>crossorigin</a></code> attribute set, changed, or removed, and whenever
that element's <a href=#concept-node-adopt-ext title=concept-node-adopt-ext>adopting steps</a> are run.</p> <!-- Note
how this does NOT happen when the base URL changes (except for when adopted into a new doc) -->
Expand All @@ -21023,6 +21025,17 @@ <h4 id=the-img-element><span class=secno>4.7.1 </span>The <dfn><code>img</code><
that there are 300 device pixels per CSS inch, and thus if the image data is 300x600, it has an
intrinsic dimension of 96 CSS pixels by 192 CSS pixels.</p>

<p>Each <code><a href=#the-img-element>img</a></code> element has a <dfn id=img-parser-created title=img-parser-created>parser-created flag</dfn> that must be set to false
when the element is created, unless otherwise specified.

<p class=note>The <a href=#html-parser>HTML parser</a> and the <a href=#xml-parser>XML parser</a>
will set the <a href=#img-parser-created title=img-parser-created>parser-created flag</a> to true
when they create an <code><a href=#the-img-element>img</a></code> element,
both when parsing a fragment and when parsing a document.</p>

<p class=note>When an <code><a href=#the-img-element>img</a></code> element is <a href=#concept-node-clone title=concept-node-clone>cloned</a>,
the <a href=#img-parser-created title=img-parser-created>parser-created flag</a> is <em>not</em> copied.</p>

<p>Each <code><a href=#document>Document</a></code> object must have a <dfn id=list-of-available-images>list of available images</dfn>. Each image
in this list is identified by a tuple consisting of an <a href=#absolute-url>absolute URL</a>, a <a href=#cors-settings-attribute>CORS
settings attribute</a> mode, and, if the mode is not <a href=#attr-crossorigin-none title=attr-crossorigin-none>No
Expand All @@ -21036,7 +21049,15 @@ <h4 id=the-img-element><span class=secno>4.7.1 </span>The <dfn><code>img</code><
<p>When the user agent is to <dfn id=update-the-image-data>update the image data</dfn> of an <code><a href=#the-img-element>img</a></code> element, it
must run the following steps:</p>

<ol><li><p>Return the <code><a href=#the-img-element>img</a></code> element to the <a href=#img-none title=img-none>unavailable</a>
<ol><li><p>If the element's <code><a href=#document>Document</a></code> is not the <a href=#active-document>active document</a>,
abort these steps.</li>

<li><p>Let <var>parser-created</var> be the value of the element's
<a href=#img-parser-created title=img-parser-created>parser-created flag</a>.</li>

<li><p>Set the element's <a href=#img-parser-created title=img-parser-created>parser-created flag</a> to false.</li>

<li><p>Return the <code><a href=#the-img-element>img</a></code> element to the <a href=#img-none title=img-none>unavailable</a>
state.</p>

<li><p>If an instance of the <a href=#fetch title=fetch>fetching</a> algorithm is still running for
Expand All @@ -21049,12 +21070,9 @@ <h4 id=the-img-element><span class=secno>4.7.1 </span>The <dfn><code>img</code><

<li>

<p>If the element has a <code title=attr-img-srcset><a href=#attr-img-srcset>srcset</a></code> attribute specified, then
let <var title="">selected source</var> and <var title="">selected pixel density</var> be the
URL and pixel density that results from <a href=#processing-the-image-candidates>processing the image candidates</a>,
respectively.

Otherwise, if the element has a <code title=attr-img-src><a href=#attr-img-src>src</a></code> attribute specified and
<p>If the element does not have a <code title=attr-img-srcset><a href=#attr-img-srcset>srcset</a></code> attribute specified <!--XXX and
it does not have a parent or it has a parent but it is not a <code>picture</code> element,-->
and it has a <code title=attr-img-src><a href=#attr-img-src>src</a></code> attribute specified and
its value is not the empty string, let <var title="">selected source</var> be the value of the
element's <code title=attr-img-src><a href=#attr-img-src>src</a></code> attribute, and <var title="">selected pixel
density</var> be 1.0. Otherwise, let <var title="">selected source</var> be null and <var title="">selected pixel density</var> be undefined.</p>
Expand Down Expand Up @@ -21083,7 +21101,8 @@ <h4 id=the-img-element><span class=secno>4.7.1 </span>The <dfn><code>img</code><

</ol></li>

<li><p>Asynchronously <a href=#await-a-stable-state>await a stable state</a>, allowing the <a href=#concept-task title=concept-task>task</a> that invoked this algorithm to continue. The <a href=#synchronous-section>synchronous
<li><p>If <var>parser-created</var> is false, asynchronously <a href=#await-a-stable-state>await a stable state</a>, allowing the <a href=#concept-task title=concept-task>task</a> that invoked this algorithm to continue.
Otherwise, continue running the steps in the <a href=#synchronous-section>synchronous section</a>. The <a href=#synchronous-section>synchronous
section</a> consists of all the remaining steps of this algorithm until the algorithm says the
<a href=#synchronous-section>synchronous section</a> has ended. (Steps in <a href=#synchronous-section title="synchronous
section">synchronous sections</a> are marked with &#x231b;.)</li>
Expand All @@ -21102,12 +21121,30 @@ <h4 id=the-img-element><span class=secno>4.7.1 </span>The <dfn><code>img</code><

<li>

<p>&#x231b; If <var title="">selected source</var> is null, then set the element to the <a href=#img-error title=img-error>broken</a> state, <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a simple
event</a> named <code title=event-error><a href=#event-error>error</a></code> at the <code><a href=#the-img-element>img</a></code> element, and
abort these steps.</p>
<p>&#x231b; If the element has a <code title=attr-img-srcset><a href=#attr-img-srcset>srcset</a></code> attribute specified<!--
XXX or it has a parent that is a <code>picture</code> element-->, then
let <var title="">selected source</var> and <var title="">selected pixel density</var> be the
URL and pixel density that results from <a href=#processing-the-image-candidates>processing the image candidates</a>,
respectively.

</li>

<li>

<p>&#x231b; If <var title="">selected source</var> is null, run these substeps:</p>

<ol><li><p>&#x231b; Set the element to the <a href=#img-error title=img-error>broken</a> state.</li>

<li><p>&#x231b; If the element has a <code title=attr-img-src><a href=#attr-img-src>src</a></code> attribute
or a <code title=attr-img-srcset><a href=#attr-img-srcset>srcset</a></code> attribute<!-- XXX
or a parent that is a <code>picture</code> element-->,
<a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a simple
event</a> named <code title=event-error><a href=#event-error>error</a></code> at the <code><a href=#the-img-element>img</a></code> element

<li><p>&#x231b; Abort this algorithm.</li>

</ol></li>

<li>

<p>&#x231b; <a href=#queue-a-task>Queue a task</a> to <a href=#fire-a-progress-event>fire a progress event</a> named <code title=event-loadstart><a href=#event-loadstart>loadstart</a></code> at
Expand Down Expand Up @@ -31624,11 +31661,11 @@ <h4 id=the-map-element><span class=secno>4.7.11 </span>The <dfn><code>map</code>
&lt;A HREF="/clothes/"&gt;Clothes&lt;/A&gt;
&lt;AREA ALT="Clothes" COORDS="0,0,100,50" HREF="/clothes/"&gt; |
&lt;A HREF="/toys/"&gt;Toys&lt;/A&gt;
&lt;AREA ALT="Toys" COORDS="0,0,100,50" HREF="/toys/"&gt; |
&lt;AREA ALT="Toys" COORDS="100,0,200,50" HREF="/toys/"&gt; |
&lt;A HREF="/food/"&gt;Food&lt;/A&gt;
&lt;AREA ALT="Food" COORDS="0,0,100,50" HREF="/food/"&gt; |
&lt;AREA ALT="Food" COORDS="200,0,300,50" HREF="/food/"&gt; |
&lt;A HREF="/books/"&gt;Books&lt;/A&gt;
&lt;AREA ALT="Books" COORDS="0,0,100,50" HREF="/books/"&gt;
&lt;AREA ALT="Books" COORDS="300,0,400,50" HREF="/books/"&gt;
&lt;/MAP&gt;
&lt;/FOOTER&gt;</pre>

Expand Down
73 changes: 55 additions & 18 deletions index
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@
</script><body onload=init()>
<header class="head with-buttons" id=head><p><a href=//www.whatwg.org/ class=logo><img width=101 src=/images/logo alt=WHATWG height=101></a></p>
<hgroup><h1 class=allcaps>HTML</h1>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 23 May 2014</h2>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 30 May 2014</h2>
</hgroup><div>
<div>
<a href=//whatwg.org/html><span><strong>Multipage Version</strong> <code>whatwg.org/html</code></span></a>
Expand Down Expand Up @@ -20997,9 +20997,11 @@ interface <dfn id=htmlimageelement>HTMLImageElement</dfn> : <a href=#htmlelement
must obtain images immediately.</p>

<p>A user agent that obtains images immediately must synchronously <a href=#update-the-image-data>update the image
data</a> of an <code><a href=#the-img-element>img</a></code> element whenever that element is created with a <code title=attr-img-src><a href=#attr-img-src>src</a></code> attribute, a <code title=attr-img-srcset><a href=#attr-img-srcset>srcset</a></code>
attribute, or both. A user agent that obtains images immediately must also synchronously
<a href=#update-the-image-data>update the image data</a> of an <code><a href=#the-img-element>img</a></code> element whenever that element has its
data</a> of an <code><a href=#the-img-element>img</a></code> element that has the
<a href=#img-parser-created title=img-parser-created>parser-created flag</a> set to true whenever that element is
inserted into another <code><a href=#node>Node</a></code>. A user agent that obtains images immediately must also synchronously
<a href=#update-the-image-data>update the image data</a> of an <code><a href=#the-img-element>img</a></code> element whenever that element
is created and has the <a href=#img-parser-created title=img-parser-created>parser-created flag</a> unset, or has its
<code title=attr-img-src><a href=#attr-img-src>src</a></code>, <code title=attr-img-srcset><a href=#attr-img-srcset>srcset</a></code>, or <code title=attr-img-crossorigin><a href=#attr-img-crossorigin>crossorigin</a></code> attribute set, changed, or removed, and whenever
that element's <a href=#concept-node-adopt-ext title=concept-node-adopt-ext>adopting steps</a> are run.</p> <!-- Note
how this does NOT happen when the base URL changes (except for when adopted into a new doc) -->
Expand All @@ -21023,6 +21025,17 @@ interface <dfn id=htmlimageelement>HTMLImageElement</dfn> : <a href=#htmlelement
that there are 300 device pixels per CSS inch, and thus if the image data is 300x600, it has an
intrinsic dimension of 96 CSS pixels by 192 CSS pixels.</p>

<p>Each <code><a href=#the-img-element>img</a></code> element has a <dfn id=img-parser-created title=img-parser-created>parser-created flag</dfn> that must be set to false
when the element is created, unless otherwise specified.

<p class=note>The <a href=#html-parser>HTML parser</a> and the <a href=#xml-parser>XML parser</a>
will set the <a href=#img-parser-created title=img-parser-created>parser-created flag</a> to true
when they create an <code><a href=#the-img-element>img</a></code> element,
both when parsing a fragment and when parsing a document.</p>

<p class=note>When an <code><a href=#the-img-element>img</a></code> element is <a href=#concept-node-clone title=concept-node-clone>cloned</a>,
the <a href=#img-parser-created title=img-parser-created>parser-created flag</a> is <em>not</em> copied.</p>

<p>Each <code><a href=#document>Document</a></code> object must have a <dfn id=list-of-available-images>list of available images</dfn>. Each image
in this list is identified by a tuple consisting of an <a href=#absolute-url>absolute URL</a>, a <a href=#cors-settings-attribute>CORS
settings attribute</a> mode, and, if the mode is not <a href=#attr-crossorigin-none title=attr-crossorigin-none>No
Expand All @@ -21036,7 +21049,15 @@ interface <dfn id=htmlimageelement>HTMLImageElement</dfn> : <a href=#htmlelement
<p>When the user agent is to <dfn id=update-the-image-data>update the image data</dfn> of an <code><a href=#the-img-element>img</a></code> element, it
must run the following steps:</p>

<ol><li><p>Return the <code><a href=#the-img-element>img</a></code> element to the <a href=#img-none title=img-none>unavailable</a>
<ol><li><p>If the element's <code><a href=#document>Document</a></code> is not the <a href=#active-document>active document</a>,
abort these steps.</li>

<li><p>Let <var>parser-created</var> be the value of the element's
<a href=#img-parser-created title=img-parser-created>parser-created flag</a>.</li>

<li><p>Set the element's <a href=#img-parser-created title=img-parser-created>parser-created flag</a> to false.</li>

<li><p>Return the <code><a href=#the-img-element>img</a></code> element to the <a href=#img-none title=img-none>unavailable</a>
state.</p>

<li><p>If an instance of the <a href=#fetch title=fetch>fetching</a> algorithm is still running for
Expand All @@ -21049,12 +21070,9 @@ interface <dfn id=htmlimageelement>HTMLImageElement</dfn> : <a href=#htmlelement

<li>

<p>If the element has a <code title=attr-img-srcset><a href=#attr-img-srcset>srcset</a></code> attribute specified, then
let <var title="">selected source</var> and <var title="">selected pixel density</var> be the
URL and pixel density that results from <a href=#processing-the-image-candidates>processing the image candidates</a>,
respectively.

Otherwise, if the element has a <code title=attr-img-src><a href=#attr-img-src>src</a></code> attribute specified and
<p>If the element does not have a <code title=attr-img-srcset><a href=#attr-img-srcset>srcset</a></code> attribute specified <!--XXX and
it does not have a parent or it has a parent but it is not a <code>picture</code> element,-->
and it has a <code title=attr-img-src><a href=#attr-img-src>src</a></code> attribute specified and
its value is not the empty string, let <var title="">selected source</var> be the value of the
element's <code title=attr-img-src><a href=#attr-img-src>src</a></code> attribute, and <var title="">selected pixel
density</var> be 1.0. Otherwise, let <var title="">selected source</var> be null and <var title="">selected pixel density</var> be undefined.</p>
Expand Down Expand Up @@ -21083,7 +21101,8 @@ interface <dfn id=htmlimageelement>HTMLImageElement</dfn> : <a href=#htmlelement

</ol></li>

<li><p>Asynchronously <a href=#await-a-stable-state>await a stable state</a>, allowing the <a href=#concept-task title=concept-task>task</a> that invoked this algorithm to continue. The <a href=#synchronous-section>synchronous
<li><p>If <var>parser-created</var> is false, asynchronously <a href=#await-a-stable-state>await a stable state</a>, allowing the <a href=#concept-task title=concept-task>task</a> that invoked this algorithm to continue.
Otherwise, continue running the steps in the <a href=#synchronous-section>synchronous section</a>. The <a href=#synchronous-section>synchronous
section</a> consists of all the remaining steps of this algorithm until the algorithm says the
<a href=#synchronous-section>synchronous section</a> has ended. (Steps in <a href=#synchronous-section title="synchronous
section">synchronous sections</a> are marked with &#x231b;.)</li>
Expand All @@ -21102,12 +21121,30 @@ interface <dfn id=htmlimageelement>HTMLImageElement</dfn> : <a href=#htmlelement

<li>

<p>&#x231b; If <var title="">selected source</var> is null, then set the element to the <a href=#img-error title=img-error>broken</a> state, <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a simple
event</a> named <code title=event-error><a href=#event-error>error</a></code> at the <code><a href=#the-img-element>img</a></code> element, and
abort these steps.</p>
<p>&#x231b; If the element has a <code title=attr-img-srcset><a href=#attr-img-srcset>srcset</a></code> attribute specified<!--
XXX or it has a parent that is a <code>picture</code> element-->, then
let <var title="">selected source</var> and <var title="">selected pixel density</var> be the
URL and pixel density that results from <a href=#processing-the-image-candidates>processing the image candidates</a>,
respectively.

</li>

<li>

<p>&#x231b; If <var title="">selected source</var> is null, run these substeps:</p>

<ol><li><p>&#x231b; Set the element to the <a href=#img-error title=img-error>broken</a> state.</li>

<li><p>&#x231b; If the element has a <code title=attr-img-src><a href=#attr-img-src>src</a></code> attribute
or a <code title=attr-img-srcset><a href=#attr-img-srcset>srcset</a></code> attribute<!-- XXX
or a parent that is a <code>picture</code> element-->,
<a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a simple
event</a> named <code title=event-error><a href=#event-error>error</a></code> at the <code><a href=#the-img-element>img</a></code> element

<li><p>&#x231b; Abort this algorithm.</li>

</ol></li>

<li>

<p>&#x231b; <a href=#queue-a-task>Queue a task</a> to <a href=#fire-a-progress-event>fire a progress event</a> named <code title=event-loadstart><a href=#event-loadstart>loadstart</a></code> at
Expand Down Expand Up @@ -31624,11 +31661,11 @@ dictionary <dfn id=trackeventinit>TrackEventInit</dfn> : <a href=#eventinit>Even
&lt;A HREF="/clothes/"&gt;Clothes&lt;/A&gt;
&lt;AREA ALT="Clothes" COORDS="0,0,100,50" HREF="/clothes/"&gt; |
&lt;A HREF="/toys/"&gt;Toys&lt;/A&gt;
&lt;AREA ALT="Toys" COORDS="0,0,100,50" HREF="/toys/"&gt; |
&lt;AREA ALT="Toys" COORDS="100,0,200,50" HREF="/toys/"&gt; |
&lt;A HREF="/food/"&gt;Food&lt;/A&gt;
&lt;AREA ALT="Food" COORDS="0,0,100,50" HREF="/food/"&gt; |
&lt;AREA ALT="Food" COORDS="200,0,300,50" HREF="/food/"&gt; |
&lt;A HREF="/books/"&gt;Books&lt;/A&gt;
&lt;AREA ALT="Books" COORDS="0,0,100,50" HREF="/books/"&gt;
&lt;AREA ALT="Books" COORDS="300,0,400,50" HREF="/books/"&gt;
&lt;/MAP&gt;
&lt;/FOOTER&gt;</pre>

Expand Down
Loading

0 comments on commit 88f8bf1

Please sign in to comment.