Beginning on October 25th, 2016, Persona will no longer be an option for authentication on BMO. For more details see Persona Deprecated.
Last Comment Bug 694503 - image map doesn't get updated when map element is removed as part of container subtree
: image map doesn't get updated when map element is removed as part of containe...
Product: Core
Classification: Components
Component: Layout: Images (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla10
Assigned To: Olli Pettay [:smaug]
: Jet Villegas (:jet)
: 712963 (view as bug list)
Depends on:
Blocks: 690417
  Show dependency treegraph
Reported: 2011-10-13 23:12 PDT by alexander :surkov
Modified: 2012-03-06 23:46 PST (History)
3 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

testcase (621 bytes, text/html)
2011-10-13 23:12 PDT, alexander :surkov
no flags Details
patch (5.93 KB, patch)
2011-10-27 16:56 PDT, Olli Pettay [:smaug]
no flags Details | Diff | Splinter Review
patch (9.61 KB, patch)
2011-10-28 10:27 PDT, Olli Pettay [:smaug]
bzbarsky: review+
Details | Diff | Splinter Review

Description alexander :surkov 2011-10-13 23:12:36 PDT
Created attachment 567016 [details]

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
Comment 1 Olli Pettay [:smaug] 2011-10-14 03:00:39 PDT
Comment 2 Olli Pettay [:smaug] 2011-10-14 03:12:52 PDT
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.
Comment 3 Olli Pettay [:smaug] 2011-10-14 05:56:24 PDT
I guess I could take this.
Comment 4 Olli Pettay [:smaug] 2011-10-27 16:56:49 PDT
Created attachment 570119 [details] [diff] [review]

But we really need to fix image map handling. 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.
Comment 5 Olli Pettay [:smaug] 2011-10-28 10:27:37 PDT
Created attachment 570297 [details] [diff] [review]

Handle also name/id changes.

Uploaded to try
Comment 6 Boris Zbarsky [:bz] (still a bit busy) 2011-10-28 20:35:52 PDT
Comment on attachment 570297 [details] [diff] [review]

Why do we need to null-check mImageFrame in ParentChainChanged but not AttributeChanged?

r=me with those made consistent.
Comment 7 Olli Pettay [:smaug] 2011-10-29 03:42:08 PDT
mImageFrame is null checked in both places.
Comment 8 Olli Pettay [:smaug] 2011-10-29 06:56:32 PDT
Comment 9 Boris Zbarsky [:bz] (still a bit busy) 2011-12-22 09:07:27 PST
*** Bug 712963 has been marked as a duplicate of this bug. ***

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