RESOLVED FIXED 49086
Incorrect image map used when multiple maps have the same name
https://bugs.webkit.org/show_bug.cgi?id=49086
Summary Incorrect image map used when multiple maps have the same name
Darin Adler
Reported 2010-11-05 13:00:27 PDT
Incorrect image map used when multiple maps have the same name
Attachments
Patch (18.88 KB, patch)
2010-11-05 13:06 PDT, Darin Adler
ap: review+
Darin Adler
Comment 1 2010-11-05 13:06:58 PDT
Darin Adler
Comment 2 2010-11-05 13:08:12 PDT
Alexey Proskuryakov
Comment 3 2010-11-05 14:58:08 PDT
Comment on attachment 73104 [details] Patch It seems a little strange that image map names are tracked in the same way as element IDs, but names in general are handled elsewhere in a very different manner (see e.g. JSHTMLDocument::nameGetter()). I guess that's fine as long as we always want the duplicate that's first in document order, but it's still surprising. Perhaps I don't understand what's so special about map names - why is there even HTMLMapElement::m_name when the same value is in an attribute, perhaps lowercased? The test needs a subtest to make sure that the latest dynamically added map doesn't get precedence (note that subtest 5 re-adds the first element, so it doesn't test for that). It also needs an XHTML version, making sure that names are case sensitive. Do all tests pass in Firefox?
Darin Adler
Comment 4 2010-11-05 16:08:54 PDT
(In reply to comment #3) > Do all tests pass in Firefox? They do not. Firefox has different behavior. But HTML5 specifies the behavior the test asks for.
Darin Adler
Comment 5 2010-11-05 16:10:52 PDT
(In reply to comment #3) > Why is there even HTMLMapElement::m_name when the same value is in an attribute, perhaps lowercased? There’s no good reason for that. There was a lot of that in the DOM implementation in the old days and I’ve removed a lot of it over time. It could and probably should be fixed. > The test needs a subtest to make sure that the latest dynamically added map doesn't get precedence Easy to add. Will do. > It also needs an XHTML version, making sure that names are case sensitive. Much less pleasant to add. Will do.
Darin Adler
Comment 6 2010-11-08 10:50:40 PST
Note You need to log in before you can comment on or make changes to this bug.