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)
Core
DOM: Core & HTML
Tracking
()
VERIFIED
FIXED
Future
People
(Reporter: dbaron, Assigned: bryner)
Details
(Keywords: dom1)
Attachments
(2 files)
4.63 KB,
patch
|
Details | Diff | Splinter Review | |
323.63 KB,
patch
|
Details | Diff | Splinter Review |
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...
Reporter | ||
Comment 1•24 years ago
|
||
Reporter | ||
Updated•24 years ago
|
Status: NEW → ASSIGNED
Priority: -- → P3
Target Milestone: --- → mozilla0.8
Reporter | ||
Updated•24 years ago
|
Target Milestone: mozilla0.8 → mozilla0.9
Updated•24 years ago
|
Component: DOM Level 1 → DOM HTML
Comment 3•24 years ago
|
||
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 };
Reporter | ||
Comment 4•24 years ago
|
||
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.)
Reporter | ||
Comment 5•24 years ago
|
||
Reality check. Moving out to 0.9.1.
Target Milestone: mozilla0.9 → mozilla0.9.1
Reporter | ||
Updated•24 years ago
|
Target Milestone: mozilla0.9.1 → mozilla0.9.2
Reporter | ||
Updated•24 years ago
|
Target Milestone: mozilla0.9.2 → Future
Assignee | ||
Comment 7•24 years ago
|
||
Assignee | ||
Comment 8•24 years ago
|
||
Ok, this patch fixes the method hiding warnings by changing Attribute to Attr in
nsIContent method names.
Comment 9•24 years ago
|
||
r=jag
Comment 10•24 years ago
|
||
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));
Assignee | ||
Comment 11•24 years ago
|
||
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
Assignee | ||
Comment 12•24 years ago
|
||
Checked in.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Updated•24 years ago
|
assignee_accessible: 0 → 1
CC list accessible: true
qacontact_accessible: 0 → 1
Accessible to reporter
Comment 13•24 years ago
|
||
Fixing database corruption caused by bug 95743. Pay no attention to the man
behind the curtain.
Comment 14•24 years ago
|
||
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.
Description
•