Skip to content

Commit

Permalink
[] (0) framework for image map processing model
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.whatwg.org/webapps@567 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Feb 6, 2007
1 parent c3f28f2 commit 927f5c5
Show file tree
Hide file tree
Showing 2 changed files with 87 additions and 30 deletions.
72 changes: 50 additions & 22 deletions index
Original file line number Diff line number Diff line change
Expand Up @@ -11473,7 +11473,7 @@ brighter. A &lt;b>rat&lt;/b> scurries past the corner wall.&lt;/p></pre>

<dd><code title=attr-img-src><a href="#src">src</a></code> (required)

<dd><code title=attr-hyperlink-usemap><a href="#usemap2">usemap</a></code>
<dd><code title=attr-hyperlink-usemap><a href="#usemap1">usemap</a></code>

<dd><code title=attr-img-ismap><a href="#ismap">ismap</a></code> (but only
if one of the ancestor elements is an <code><a href="#a0">a</a></code>
Expand Down Expand Up @@ -11571,7 +11571,7 @@ brighter. A &lt;b>rat&lt;/b> scurries past the corner wall.&lt;/p></pre>
href="#img0">img</a></code> element.

<p>The <code title=attr-hyperlink-usemap><a
href="#usemap2">usemap</a></code> attribute, if present, can indicate that
href="#usemap1">usemap</a></code> attribute, if present, can indicate that
the image has an associated <a href="#image">image map</a>.

<p>The <dfn id=ismap title=attr-img-ismap><code>ismap</code></dfn>
Expand Down Expand Up @@ -11914,7 +11914,7 @@ brighter. A &lt;b>rat&lt;/b> scurries past the corner wall.&lt;/p></pre>
(required if <code title=attr-object-data><a href="#data">data</a></code>
is not given)

<dd><code title=attr-hyperlink-usemap><a href="#usemap2">usemap</a></code>
<dd><code title=attr-hyperlink-usemap><a href="#usemap1">usemap</a></code>

<dd><code title=attr-object-height>height</code>

Expand Down Expand Up @@ -12150,7 +12150,7 @@ brighter. A &lt;b>rat&lt;/b> scurries past the corner wall.&lt;/p></pre>
capabilities, with the user agent picking the best one it supports.

<p>The <code title=attr-hyperlink-usemap><a
href="#usemap2">usemap</a></code> attribute, if present while the <code><a
href="#usemap1">usemap</a></code> attribute, if present while the <code><a
href="#object0">object</a></code> element represents an image, can
indicate that the object has an associated <a href="#image">image map</a>.
The attribute must be ignored if the <code><a
Expand Down Expand Up @@ -13533,7 +13533,7 @@ interface <dfn id=imagedata>ImageData</dfn> {

<p>The <dfn id=name3 title=attr-map-name><code>name</code></dfn> attribute
gives the name of the image map, so that it can be referenced using the
<code title=attr-hyperlink-usemap><a href="#usemap2">usemap</a></code>
<code title=attr-hyperlink-usemap><a href="#usemap1">usemap</a></code>
attribute of <code><a href="#img0">img</a></code> and <code><a
href="#object0">object</a></code> elements.

Expand Down Expand Up @@ -13574,7 +13574,7 @@ interface <dfn id=imagedata>ImageData</dfn> {

<dd><code title=attr-area-alt><a href="#alt1">alt</a></code>

<dd><code title=attr-area-coords><a href="#coords1">coords</a></code>
<dd><code title=attr-area-coords><a href="#coords">coords</a></code>

<dd><code title=attr-area-shape><a href="#shape">shape</a></code>

Expand Down Expand Up @@ -13631,7 +13631,7 @@ interface <dfn id=imagedata>ImageData</dfn> {

<p>In both cases, the <code title=attr-area-shape><a
href="#shape">shape</a></code> and <code title=attr-area-coords><a
href="#coords1">coords</a></code> attributes specify the area.
href="#coords">coords</a></code> attributes specify the area.

<p>The <dfn id=shape title=attr-area-shape><code>shape</code></dfn>
attribute is an <a href="#enumerated">enumerated attribute</a>. The
Expand Down Expand Up @@ -13709,24 +13709,24 @@ interface <dfn id=imagedata>ImageData</dfn> {

<p>In the <a href="#circle" title=attr-area-shape-circle>circle state</a>,
<code><a href="#area0">area</a></code> elements must have a <code
title=attr-area-coords><a href="#coords1">coords</a></code> attribute
title=attr-area-coords><a href="#coords">coords</a></code> attribute
present, with three integers, the last of which must be non-negative.

<p>In the <a href="#default" title=attr-area-shape-default>default
state</a> state, <code><a href="#area0">area</a></code> elements must not
have a <code title=attr-area-coords><a href="#coords1">coords</a></code>
have a <code title=attr-area-coords><a href="#coords">coords</a></code>
attribute.

<p>In the <a href="#polygon" title=attr-area-shape-poly>polygon state</a>,
<code><a href="#area0">area</a></code> elements must have a <code
title=attr-area-coords><a href="#coords1">coords</a></code> attribute with
title=attr-area-coords><a href="#coords">coords</a></code> attribute with
at least six integers, and the number of integers must be even.

<p>In the <a href="#rectangle" title=attr-area-shape-rect>rectangle
state</a>, <code><a href="#area0">area</a></code> elements must have a
<code title=attr-area-coords><a href="#coords1">coords</a></code>
attribute with exactly four integers, the first of which must be less than
the third, and the second of which must be less than the fourth.
<code title=attr-area-coords><a href="#coords">coords</a></code> attribute
with exactly four integers, the first of which must be less than the
third, and the second of which must be less than the fourth.

<p>Interactive user agents should allow users to <a href="#following1"
title="following hyperlinks">follow hyperlinks</a> created for <a
Expand Down Expand Up @@ -13805,17 +13805,38 @@ interface <dfn id=imagedata>ImageData</dfn> {
href="#map0">map</a></code> element) by specifying a <dfn id=usemap1
title=attr-hyperlink-usemap><code>usemap</code></dfn> attribute on the
<code><a href="#img0">img</a></code> or <code><a
href="#object0">object</a></code> element.
href="#object0">object</a></code> element. The <code
title=attr-area-usemap>usemap</code> attribute, if specified, must be a <a
href="#valid6">valid hashed ID reference</a> to a <code><a
href="#map0">map</a></code> element.

<p>The <coode title=attr-area-usemap>usemap attribute, if specified, must
be a <a href="#valid6">valid hashed ID reference</a> to a <code><a
href="#map0">map</a></code> element.</coode>
<p>If an <code><a href="#img0">img</a></code> element or an <code><a
href="#object0">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:

<p class=big-issue><dfn id=valid7>valid area</dfn>, <dfn id=usemap2
title=attr-hyperlink-usemap><code>usemap</code></dfn>, <dfn id=coords1
title=attr-area-coords><code>coords</code></dfn>, <dfn id=server>server
side image map</dfn>.</p>
<!-- coords parsing:
<ol class=big-issue></ol>

<p>Having obtained the list of <code><a href="#area0">area</a></code>
elements that form the image map, 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="#img0">img</a></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="#object0">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="#img0">img</a></code> elements.

<ol class=big-issue></ol>

<p>If the user agent intends to show the image and allow interaction with
the image to select hyperlinks:

<ol class=big-issue><!-- coords parsing:

1. use rules for parsing lists of integers to get list of coords
2. treat those with missing coords as hidden shapes, focusable but not covering any part of the image
Expand All @@ -13835,6 +13856,9 @@ interface <dfn id=imagedata>ImageData</dfn> {
if c < a and d < b: c,d,a,b
circ, poly: none
-->
</ol>

<p class=big-issue><dfn id=valid7>valid area</dfn>

<p class=big-issue>mouse clicks on an image where an area is result in
clicks dispatched at the area, not the image.
Expand All @@ -13843,6 +13867,10 @@ interface <dfn id=imagedata>ImageData</dfn> {
focus go to the first such element. tabbing around can select the area
multiple times however

<p class=big-issue><dfn id=server>server side image map</dfn>.</p>
<!-- XXX
might want to move this section to the links section? -->

<h3 id=tabular><span class=secno>3.15. </span>Tabular data</h3>

<h4 id=the-table><span class=secno>3.15.1. </span>The <dfn
Expand Down
45 changes: 37 additions & 8 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -11827,17 +11827,40 @@ interface <dfn>ImageData</dfn> {
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.</p>
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
title="attr-area-usemap">usemap</code> attribute specified, user
agents must process it as follows:</p>

<ol class="big-issue">
</ol>

<p>Having obtained the list of <code>area</code> elements that form
the image map, interactive user agents must process the list in one
of two ways.</p>

<p>The <coode 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 the user agent intends to show the text that the
<code>img</code> element represents, then it must use the following
steps.</p>

<p class="big-issue"><dfn>valid area</dfn>, <dfn
title="attr-hyperlink-usemap"><code>usemap</code></dfn>, <dfn
title="attr-area-coords"><code>coords</code></dfn>, <dfn>server side
image map</dfn>.</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>

<ol class="big-issue">
</ol>

<p>If the user agent intends to show the image and allow interaction
with the image to select hyperlinks:</p>

<ol class="big-issue">
<!-- coords parsing:

1. use rules for parsing lists of integers to get list of coords
Expand All @@ -11858,6 +11881,9 @@ interface <dfn>ImageData</dfn> {
if c < a and d < b: c,d,a,b
circ, poly: none
-->
</ol>

<p class="big-issue"><dfn>valid area</dfn></p>

<p class="big-issue">mouse clicks on an image where an area is
result in clicks dispatched at the area, not the image.</p>
Expand All @@ -11866,6 +11892,9 @@ interface <dfn>ImageData</dfn> {
the focus go to the first such element. tabbing around can select
the area multiple times however</p>

<p class="big-issue"><dfn>server side image map</dfn>.</p> <!-- XXX
might want to move this section to the links section? -->


<h3>Tabular data</h3>

Expand Down

0 comments on commit 927f5c5

Please sign in to comment.