Closed Bug 564001 Opened 15 years ago Closed 15 years ago

Should use the first image map in tree order

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla2.0b4

People

(Reporter: Ms2ger, Assigned: Ms2ger)

References

()

Details

(Keywords: html5)

Attachments

(1 file, 3 obsolete files)

Currently we use the map that was first added to the document.
Attached patch Fix v1 (obsolete) — Splinter Review
Applies on top of bug 109445.
Attachment #444248 - Flags: review?(bzbarsky)
Comment on attachment 444248 [details] [diff] [review] Fix v1 This leaks the nsContentList if nothing else. Apart from that, how often do we call this code (looks like at least every paint of an image). How long does that DOM walk take? Is it really ok to no longer cache things here?
Attachment #444248 - Flags: review?(bzbarsky) → review-
Attached patch Patch v2 (obsolete) — Splinter Review
This should at least fix the leak. I'm afraid I don't know the answers to your other questions, though.
Attachment #444248 - Attachment is obsolete: true
Attachment #452547 - Flags: review?(bzbarsky)
How about figuring them out? For the first question, measure or breakpoint in the function and see what the stacks look like. For the second one, measure. For the third one, the answer depends on the other two, obviously.
Comment on attachment 452547 [details] [diff] [review] Patch v2 r- pending answers to my questions or some other convincing that the behavior change is ok.
Attachment #452547 - Flags: review?(bzbarsky) → review-
Attached patch Patch v3 (obsolete) — Splinter Review
So I never realized that nsContentList is actually live... I guess this should be better.
Attachment #452547 - Attachment is obsolete: true
Attachment #458409 - Flags: review?(bzbarsky)
Comment on attachment 458409 [details] [diff] [review] Patch v3 This looks fine, though a followup to maybe not use the nsIDOMHTML* interface to get the name and id might be good.
Attachment #458409 - Flags: review?(bzbarsky) → review+
Depends on: 581644
Thanks!
Whiteboard: [needs landing]
Attachment #458409 - Flags: approval2.0?
Got some rejects trying to apply this for landing. Also, use 'checkin-needed' to request landing.
I'll refresh when I get approval to get this landed.
Attachment #458409 - Flags: approval2.0? → approval2.0+
Thanks.
Attachment #458409 - Attachment is obsolete: true
Keywords: checkin-needed
Whiteboard: [needs landing]
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
And http://hg.mozilla.org/mozilla-central/rev/cc10699c5f6a to add the missing test file and fix tree red.
Thanks.
Target Milestone: --- → mozilla2.0b4
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: