Closed Bug 694503 Opened 8 years ago Closed 8 years ago
image map doesn't get updated when map element is removed as part of container subtree
nsImageMap register mutation observer on map element, mutation observer doesn't get notified when root is removed as part of containing subtree. Steps to reproduce: 1) hover of imagemap, hand cursor appears on imagemap mouseover 2) remove area element, no hand cursor on corresponding imagemap area 3) remove the container of map element from DOM, hand cursor appears on imagemap
Component: DOM → Layout: Images
QA Contact: general → layout.images
Seems like imagemap handling is pretty much static. It is all set when nsImageFrame first time uses imagemap for something, and after that the image frame points to the same map element, even if the id of it changes etc. nsImageMap should probably use ReferencedElement to track the changes.
I guess I could take this.
Assignee: nobody → Olli.Pettay
But we really need to fix image map handling. http://mxr.mozilla.org/mozilla-central/source/accessible/src/html/nsHTMLImageMapAccessible.cpp#181 should be fixed to not use primaryframe of area elements (since we need to get rid of primary frames in that case) After that fixing focus handling, also remove support for <a> elements as synonyms to area etc.
Handle also name/id changes. Uploaded to try
Comment on attachment 570297 [details] [diff] [review] patch Why do we need to null-check mImageFrame in ParentChainChanged but not AttributeChanged? r=me with those made consistent.
Attachment #570297 - Flags: review?(bzbarsky) → review+
mImageFrame is null checked in both places.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.