Skip to content

Commit

Permalink
[iw] (2) Prepare the image map section so that the spec can support <…
Browse files Browse the repository at this point in the history
…input type=image usemap> when we add <input>. This is compatible with HTML4, but maybe this shouldn't be supported.

git-svn-id: http://svn.whatwg.org/webapps@985 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Aug 8, 2007
1 parent e2ea6b9 commit 5b41f3b
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 33 deletions.
38 changes: 23 additions & 15 deletions index
Original file line number Diff line number Diff line change
Expand Up @@ -16807,18 +16807,23 @@ notes on what would need to be defined for dashed lines:
<p>An <dfn id=image>image map</dfn> allows geometric areas on an image to
be associated with <a href="#hyperlinks" title=hyperlink>hyperlinks</a>.

<p>An image, in the form of an <code><a href="#img">img</a></code> element
or an <code><a href="#object">object</a></code> element representing an
image, may be associated with an image map (in the form of a <code><a
<p>An image, in the form of an <code><a href="#img">img</a></code> element,
an <code>input</code> element whose <code
title=attr-input-type>type</code> attribute is in the <span
title=attr-input-type-image>Image state</span>, or an <code><a
href="#object">object</a></code> element representing an image, may be
associated with an image map (in the form of a <code><a
href="#map">map</a></code> element) by specifying a <dfn id=usemap1
title=attr-hyperlink-usemap><code>usemap</code></dfn> attribute on the
<code><a href="#img">img</a></code> or <code><a
<code><a href="#img">img</a></code>, <code>input</code>, or <code><a
href="#object">object</a></code> element. The <code
title=attr-area-usemap>usemap</code> attribute, if specified, must be a <a
href="#valid7">valid hashed ID reference</a> to a <code><a
href="#map">map</a></code> element.

<p>If an <code><a href="#img">img</a></code> element or an <code><a
<p>If an <code><a href="#img">img</a></code> element, an <code>input</code>
element whose <code title=attr-input-type>type</code> attribute is in the
<span title=attr-input-type-image>Image state</span>, or an <code><a
href="#object">object</a></code> element representing an image has a <code
title=attr-area-usemap>usemap</code> attribute specified, user agents must
process it as follows:
Expand All @@ -16844,14 +16849,14 @@ notes on what would need to be defined for dashed lines:
interactive user agents must process the list in one of two ways.

<p>If the user agent intends to show the text that the <code><a
href="#img">img</a></code> element represents, then it must use the
following steps.
href="#img">img</a></code> or <code>input</code> element represents, then
it must use the following steps.

<p class=note>In user agents that do not support images, or that have
images disabled, <code><a href="#object">object</a></code> elements cannot
represent images, and thus this section never applies (the fallback
content is shown instead). The following steps therefore only apply to
<code><a href="#img">img</a></code> elements.
<code><a href="#img">img</a></code> and <code>input</code> elements.

<ol>
<li>
Expand All @@ -16874,15 +16879,17 @@ notes on what would need to be defined for dashed lines:
<p>Each remaining <code><a href="#area">area</a></code> element in <var
title="">areas</var> represents a <a href="#hyperlinks">hyperlink</a>.
Those hyperlinks should all be made available to the user in a manner
associated with the text of the <code><a href="#img">img</a></code>
element.</p>
associated with the text of the <code><a href="#img">img</a></code> or
<code>input</code> element.</p>

<p>In this context, user agents may represent <code><a
href="#area">area</a></code> and <code><a href="#img">img</a></code>
elements with no specified <code title="">alt</code> attributes, or
whose <code title="">alt</code> attributes are the empty string or some
other non-visible text, in a user-agent-defined fashion intended to
indicate the lack of suitable author-provided text.
indicate the lack of suitable author-provided text. (This does not apply
to <code>input</code> elements as they have default <code
title=attr-input-alt>alt</code> text.)
</ol>

<p>If the user agent intends to show the image and allow interaction with
Expand Down Expand Up @@ -17067,8 +17074,8 @@ notes on what would need to be defined for dashed lines:

<p>For historical reasons, the coordinates must be interpreted relative
to the <em>displayed</em> image, even if it stretched using CSS or the
<code title=attr-img-width><a href="#width">width</a></code> and <code
title=attr-img-height><a href="#height">height</a></code> attributes.</p>
image element's <code title="">width</code> and <code
title="">height</code> attributes.</p>
</ol>

<p>Mouse clicks on an image associated with a set of layered shapes per the
Expand All @@ -17082,8 +17089,9 @@ notes on what would need to be defined for dashed lines:

<p class=note>Because a <code><a href="#map">map</a></code> element (and
its <code><a href="#area">area</a></code> elements) can be associated with
multiple <code><a href="#img">img</a></code> elements, it is possible for
an <code><a href="#area">area</a></code> element to correspond to multiple
multiple <code><a href="#img">img</a></code>, <code>input</code>, and
<code><a href="#object">object</a></code> elements, it is possible for an
<code><a href="#area">area</a></code> element to correspond to multiple
focusable areas of the document.

<p>Image maps are <em><a href="#live">live</a></em>; if the DOM is mutated,
Expand Down
44 changes: 26 additions & 18 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -14456,18 +14456,23 @@ notes on what would need to be defined for dashed lines:
<p>An <dfn>image map</dfn> allows geometric areas on an image to be
associated with <span title="hyperlink">hyperlinks</span>.</p>

<p>An image, in the form of an <code>img</code> element or an
<p>An image, in the form of an <code>img</code> element, an
<code>input</code> element whose <code
title="attr-input-type">type</code> attribute is in the <span
title="attr-input-type-image">Image state</span>, or an
<code>object</code> element representing an image, may be associated
with an image map (in the form of a <code>map</code> element) by
specifying a <dfn
title="attr-hyperlink-usemap"><code>usemap</code></dfn> attribute on
the <code>img</code> or <code>object</code> element. The <code
title="attr-area-usemap">usemap</code> attribute, if specified, must
be a <span>valid hashed ID reference</span> to a <code>map</code>
element.</p>

<p>If an <code>img</code> element or an <code>object</code> element
representing an image has a <code
the <code>img</code>, <code>input</code>, or <code>object</code>
element. The <code title="attr-area-usemap">usemap</code> attribute,
if specified, must be a <span>valid hashed ID reference</span> to a
<code>map</code> element.</p>

<p>If an <code>img</code> element, an <code>input</code> element
whose <code title="attr-input-type">type</code> attribute is in the
<span title="attr-input-type-image">Image state</span>, or an
<code>object</code> element representing an image has a <code
title="attr-area-usemap">usemap</code> attribute specified, user
agents must process it as follows:</p>

Expand All @@ -14492,14 +14497,14 @@ notes on what would need to be defined for dashed lines:
agents must process the list in one of two ways.</p>

<p>If the user agent intends to show the text that the
<code>img</code> element represents, then it must use the following
steps.</p>
<code>img</code> or <code>input</code> element represents, then it
must use the following steps.</p>

<p class="note">In user agents that do not support images, or that
have images disabled, <code>object</code> elements cannot represent
images, and thus this section never applies (the fallback content is
shown instead). The following steps therefore only apply to
<code>img</code> elements.</p>
<code>img</code> and <code>input</code> elements.</p>

<ol>

Expand All @@ -14519,14 +14524,17 @@ notes on what would need to be defined for dashed lines:
<li><p>Each remaining <code>area</code> element in <var
title="">areas</var> represents a <span>hyperlink</span>. Those
hyperlinks should all be made available to the user in a manner
associated with the text of the <code>img</code> element.</p>
associated with the text of the <code>img</code> or
<code>input</code> element.</p>

<p>In this context, user agents may represent <code>area</code> and
<code>img</code> elements with no specified <code
title="">alt</code> attributes, or whose <code title="">alt</code>
attributes are the empty string or some other non-visible text, in
a user-agent-defined fashion intended to indicate the lack of
suitable author-provided text.</p></li>
suitable author-provided text. (This does not apply to
<code>input</code> elements as they have default <code
title="attr-input-alt">alt</code> text.)</p></li>

</ol>

Expand Down Expand Up @@ -14699,8 +14707,8 @@ notes on what would need to be defined for dashed lines:

<p>For historical reasons, the coordinates must be interpreted
relative to the <em>displayed</em> image, even if it stretched
using CSS or the <code title="attr-img-width">width</code> and
<code title="attr-img-height">height</code> attributes.</p>
using CSS or the image element's <code title="">width</code> and
<code title="">height</code> attributes.</p>

</li>

Expand All @@ -14718,9 +14726,9 @@ notes on what would need to be defined for dashed lines:

<p class="note">Because a <code>map</code> element (and its
<code>area</code> elements) can be associated with multiple
<code>img</code> elements, it is possible for an <code>area</code>
element to correspond to multiple focusable areas of the
document.</p>
<code>img</code>, <code>input</code>, and <code>object</code>
elements, it is possible for an <code>area</code> element to
correspond to multiple focusable areas of the document.</p>

<p>Image maps are <em>live</em>; if the DOM is mutated, then the
user agent must act as if it had rerun the algorithms for image
Expand Down

0 comments on commit 5b41f3b

Please sign in to comment.