Last Comment Bug 158093 - Client-side imagemaps require default shape to be last
: Client-side imagemaps require default shape to be last
Status: RESOLVED INVALID
:
Product: Core
Classification: Components
Component: Layout (show other bugs)
: Trunk
: All Linux
: P3 normal (vote)
: Future
Assigned To: Marc Attinasi
: Chris Petersen
Mentors:
http://www.ee.surrey.ac.uk/Personal/L...
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2002-07-18 03:59 PDT by Lloyd Wood
Modified: 2003-04-13 13:38 PDT (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments

Description Lloyd Wood 2002-07-18 03:59:39 PDT
Client-side imagemaps require default shape to be the last shape specified
to work correctly; any shapes specified after the default shape in the given
map used are ignored entirely. Example URL compares imagemaps with default shape
specified first in list (nothing works bar the default) and last in list
(everything works as specified.)

This shouldn't be order-dependent.

Handling of default shapes seems poor in general - see also bug 123800,
where not having a client-side default shape leads to poor fallthrough to
and display of server-side imagemaps.
Comment 1 Peter K. Sheerin 2002-09-14 23:05:13 PDT
This is NOT a bug--it is order dependent, as per the specification:

"If two or more defined regions overlap, the region-defining element that
appears earliest in the document takes precedence (i.e., responds to user input)."

http://www.w3.org/TR/html401/struct/objects.html#h-13.6.1
Comment 2 Lloyd Wood 2002-09-16 03:49:43 PDT
Sorry, this is a bug, as the specification cited indicates. From:

http://www.w3.org/TR/html401/struct/objects.html#h-13.6.1

"If two or more defined regions overlap, the region-defining element that
appears earliest in the document takes precedence (i.e., responds to user input)."

Note that it says *region-defining* element. Now look at how the elements
are introduced in that document:

"shape = default|rect|circle|poly [CI]
    This attribute specifies the shape of a region. Possible values:

        * default: Specifies the entire region.
        * rect: Define a rectangular region.
        * circle: Define a circular region.
        * poly: Define a polygonal region."

Note that default is not a region-defining element. It's a region-*specifying*
element that indicates a known unique region with special properties (you don't
have to define coordinates). Subtle difference, but a careful choice of words
that falls in line with what common sense would suggest.

Default is what you should fall back to, regardless of when it is specified.
As the term that introduces it indicates, it's a special case. Everything
else overlaps with default; regions other than default take precedence.

(I can, however, believe that if you accidentally include two default regions in
your imagemap, the first one should take precedence.)

cheers,

L.
Comment 3 Boris Zbarsky [:bz] (TPAC) 2003-04-13 13:38:07 PDT
Sorry, but I think you're reading more into the difference between "defining"
and "specifying" than is warranted....

The current behavior, as far as I can tell, follows the spec, is consistent
(earlier elements always override later ones) and most importantly is compatible
with other browser.

Note You need to log in before you can comment on or make changes to this bug.