Closed Bug 66835 Opened 24 years ago Closed 24 years ago

fix warnings from jst's nsGenericElement checkin

Categories

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

defect

Tracking

()

VERIFIED FIXED
Future

People

(Reporter: dbaron, Assigned: bryner)

Details

(Keywords: dom1)

Attachments

(2 files)

I'm working on a patch to fix the warnings from jst's checkin making content objects inherit from nsGenericElement, using |using|. It seems to work for me (RedHat gcc-2.96-70), and I'm using the HAVE_CPP_AMBIGUITY_RESOLVING_USING macro set by autoconf and also set for Mac. I'm not sure whether the autoconf test is exactly what we want, though. (It's not used anywhere else.) Anyway, I'll attach a patch that shows the general approach. I've fixed many of the warnings that can be fixed by changing nsGenericElement or nsGenericHTMLElement, but some can be fixed only on the different content objects. I've only done nsHTMLAnchorElement as a sample. Any thoughts on whether this is a good idea? It would sure be nice not to have to look at these warnings...
Status: NEW → ASSIGNED
Priority: -- → P3
Target Milestone: --- → mozilla0.8
Target Milestone: mozilla0.8 → mozilla0.9
Keywords: dom1
Component: DOM Level 1 → DOM HTML
QA contact Update
QA Contact: janc → desale
Will this fix these warnings? -- Warning : 'nsGenericElement::GetAttribute(const nsAString &, nsAString &)' hides inherited virtual function 'nsIContent::GetAttribute(int, nsIAtom *, nsAString & )const ' nsGenericElement.h line 361 }; Warning : 'nsGenericElement::SetAttribute(const nsAString &, const nsAString &)' hides inherited virtual function 'nsIContent::SetAttribute(nsINodeInfo *, const nsAString &, int)' nsGenericElement.h line 361 };
Yes, it should. I think jst said he has a different fix for this, and he's not sure which to use. (I think his fix is renaming one of the two |SetAttribute|/|GetAttribute| pairs of methods, but I'm not sure.)
Reality check. Moving out to 0.9.1.
Target Milestone: mozilla0.9 → mozilla0.9.1
Target Milestone: mozilla0.9.1 → mozilla0.9.2
Updating QA contact to Shivakiran Tummala.
QA Contact: desale → stummala
Target Milestone: mozilla0.9.2 → Future
Attached patch patchSplinter Review
Ok, this patch fixes the method hiding warnings by changing Attribute to Attr in nsIContent method names.
r=jag
Bryner, you're my hero for fixing all these warnings I introduced way back when, sr=jst for the changes, all I found when reviewing was a few indendtation nits: - nsDOMAttributeMap.cpp: @@ -291,7 +291,7 @@ nsresult attrResult; nsAutoString value; - attrResult = mContent->GetAttribute(nameSpaceID, nameAtom, + attrResult = mContent->GetAttr(nameSpaceID, nameAtom, *getter_AddRefs(prefix), value); nsGenericHTMLElement.cpp: @@ -1583,7 +1583,7 @@ // We still rely on the old way of setting the attribute. - return NS_STATIC_CAST(nsIContent *, this)->SetAttribute(nsid, atom, aValue, + return NS_STATIC_CAST(nsIContent *, this)->SetAttr(nsid, atom, aValue, aNotify); - nsXULContentBuilder.cpp: else { - aRealElement->UnsetAttribute(attribNameSpaceID, + aRealElement->UnsetAttr(attribNameSpaceID, attribName, PR_TRUE); } @@ -1398,7 +1398,7 @@ - nsXULTemplateBuilder.cpp: - rv = aRuleElement->GetAttributeNameAt(i, attrNameSpaceID, + rv = aRuleElement->GetAttrNameAt(i, attrNameSpaceID, *getter_AddRefs(attr), *getter_AddRefs(prefix)); if (NS_FAILED(rv)) return rv; @@ -2152,7 +2152,7 @@ and also around line 2310: - element->GetAttributeNameAt(i, nameSpaceID, *getter_AddRefs(attr), + element->GetAttrNameAt(i, nameSpaceID, *getter_AddRefs(attr), *getter_AddRefs(prefix));
I'll take this since I have the patch.
Assignee: dbaron → bryner
assignee_accessible: 1 → 0
Status: ASSIGNED → NEW
CC list accessible: false
qacontact_accessible: 1 → 0
Not accessible to reporter
Checked in.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
assignee_accessible: 0 → 1
CC list accessible: true
qacontact_accessible: 0 → 1
Accessible to reporter
Fixing database corruption caused by bug 95743. Pay no attention to the man behind the curtain.
This is strictly a development issue, warning messages in the code are used for debugging and does not have any greater impact. Marking verified as per developer comments above.
Status: RESOLVED → VERIFIED
Component: DOM: HTML → DOM: Core & HTML
QA Contact: stummala → general
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: