Closed
Bug 581644
Opened 14 years ago
Closed 13 years ago
Don't use nsIDOMHTMLMapElement in nsHTMLDocument::GetImageMap
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla5
People
(Reporter: Ms2ger, Assigned: Ms2ger)
References
Details
Attachments
(1 file, 4 obsolete files)
8.52 KB,
patch
|
Details | Diff | Splinter Review |
See bug 564001 comment 7.
Assignee | ||
Comment 1•14 years ago
|
||
Attachment #466143 -
Flags: review?(peterv)
Comment 2•14 years ago
|
||
Comment on attachment 466143 [details] [diff] [review] Patch v1 I think you should also make GetImageMap return a nsIContent, and let callers do the QI if needed. Also, why are you removing the error checking for the GetAttr calls?
Attachment #466143 -
Flags: review?(peterv) → review-
Comment 3•14 years ago
|
||
(In reply to comment #2) > make GetImageMap return a nsIContent Or Element.
Assignee | ||
Comment 4•14 years ago
|
||
Now returns Element. In the GetAttr call, I'm not actually changing behavior here, as GetId and GetName just return the empty string if the attribute is absent, like GetAttr.
Attachment #466143 -
Attachment is obsolete: true
Attachment #468129 -
Flags: review?(peterv)
Comment 5•14 years ago
|
||
Comment on attachment 468129 [details] [diff] [review] Patch v2 >diff --git a/content/html/document/src/nsHTMLDocument.cpp b/content/html/document/src/nsHTMLDocument.cpp >+ map->GetAttr(kNameSpaceID_None, nsGkAtoms::id, name); >+ PRBool match = name.Equals(aMapName); I'd just use AttrValueIs instead. >+ > if (!match) { >- rv = map->GetName(name); >- NS_ENSURE_SUCCESS(rv, nsnull); >- >+ map->GetAttr(kNameSpaceID_None, nsGkAtoms::name, name); > match = name.Equals(aMapName, nsCaseInsensitiveStringComparator()); Same here. >-#ifndef nsIHTMLDocument_h___ >-#define nsIHTMLDocument_h___ >+ >+#ifndef nsIHTMLDocument_h >+#define nsIHTMLDocument_h No need for this change, and afaict it makes these inconsistent with the rest of the tree. Please revert.
Attachment #468129 -
Flags: review?(peterv) → review+
Assignee | ||
Comment 6•14 years ago
|
||
Now with AttrValueIs... This function is actually starting to look sane now. > >-#ifndef nsIHTMLDocument_h___ > >-#define nsIHTMLDocument_h___ > >+ > >+#ifndef nsIHTMLDocument_h > >+#define nsIHTMLDocument_h > > No need for this change, and afaict it makes these inconsistent with the rest > of the tree. Please revert. As was mentioned in bug 514661 comment 25, all names with two consecutive underscores are reserved to the implementation, and the rest of the tree uses roughly any style you can imagine. Your call, though; I'll revert if you prefer.
Attachment #468129 -
Attachment is obsolete: true
Comment 7•14 years ago
|
||
Please remove #include "nsIDOMHTMLMapElement.h" from nsHTMLDocument.h also.
Assignee | ||
Updated•14 years ago
|
Whiteboard: [needs landing]
Assignee | ||
Comment 9•13 years ago
|
||
Attachment #483422 -
Attachment is obsolete: true
Assignee | ||
Updated•13 years ago
|
Keywords: checkin-needed
Whiteboard: [needs landing]
Comment 10•13 years ago
|
||
The patch no longer applies correctly. Could you update it?
Keywords: checkin-needed
Comment 11•13 years ago
|
||
My bad, I didn't apply the deps before this patch...
Keywords: checkin-needed
Comment 12•13 years ago
|
||
http://hg.mozilla.org/projects/cedar/rev/9df21e557f71
Whiteboard: fixed-in-cedar
Updated•13 years ago
|
Keywords: checkin-needed
Comment 13•13 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/9df21e557f71
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Whiteboard: fixed-in-cedar
Target Milestone: --- → mozilla2.2
You need to log in
before you can comment on or make changes to this bug.
Description
•