fixing my old enemy "the classic .get() with nsCOMPtr on solaris (and linux, if you have --enable-pedantic) turned on" bustage.

This commit is contained in:
sspitzer%netscape.com 2000-01-12 07:39:00 +00:00
Родитель 5e92d3ed61
Коммит f291328810
2 изменённых файлов: 22 добавлений и 22 удалений

Просмотреть файл

@ -1057,10 +1057,10 @@ nsEventStateManager::CheckDisabled(nsIContent* aContent)
nsCOMPtr<nsIAtom> tag; nsCOMPtr<nsIAtom> tag;
aContent->GetTag(*getter_AddRefs(tag)); aContent->GetTag(*getter_AddRefs(tag));
if (nsHTMLAtoms::input == tag || if (nsHTMLAtoms::input == tag.get() ||
nsHTMLAtoms::select == tag || nsHTMLAtoms::select == tag.get() ||
nsHTMLAtoms::textarea == tag || nsHTMLAtoms::textarea == tag.get() ||
nsHTMLAtoms::button == tag) { nsHTMLAtoms::button == tag.get()) {
nsAutoString empty; nsAutoString empty;
if (NS_CONTENT_ATTR_HAS_VALUE == aContent->GetAttribute(kNameSpaceID_HTML, if (NS_CONTENT_ATTR_HAS_VALUE == aContent->GetAttribute(kNameSpaceID_HTML,
nsHTMLAtoms::disabled, nsHTMLAtoms::disabled,
@ -1738,7 +1738,7 @@ nsEventStateManager::GetNextTabbableContent(nsIContent* aParent, nsIContent* aCh
PRBool hidden = PR_FALSE; PRBool hidden = PR_FALSE;
child->GetTag(*getter_AddRefs(tag)); child->GetTag(*getter_AddRefs(tag));
if (nsHTMLAtoms::input==tag) { if (nsHTMLAtoms::input==tag.get()) {
nsIDOMHTMLInputElement *nextInput; nsIDOMHTMLInputElement *nextInput;
if (NS_OK == child->QueryInterface(kIDOMHTMLInputElementIID,(void **)&nextInput)) { if (NS_OK == child->QueryInterface(kIDOMHTMLInputElementIID,(void **)&nextInput)) {
nextInput->GetDisabled(&disabled); nextInput->GetDisabled(&disabled);
@ -1752,7 +1752,7 @@ nsEventStateManager::GetNextTabbableContent(nsIContent* aParent, nsIContent* aCh
NS_RELEASE(nextInput); NS_RELEASE(nextInput);
} }
} }
else if (nsHTMLAtoms::select==tag) { else if (nsHTMLAtoms::select==tag.get()) {
nsIDOMHTMLSelectElement *nextSelect; nsIDOMHTMLSelectElement *nextSelect;
if (NS_OK == child->QueryInterface(kIDOMHTMLSelectElementIID,(void **)&nextSelect)) { if (NS_OK == child->QueryInterface(kIDOMHTMLSelectElementIID,(void **)&nextSelect)) {
nextSelect->GetDisabled(&disabled); nextSelect->GetDisabled(&disabled);
@ -1760,7 +1760,7 @@ nsEventStateManager::GetNextTabbableContent(nsIContent* aParent, nsIContent* aCh
NS_RELEASE(nextSelect); NS_RELEASE(nextSelect);
} }
} }
else if (nsHTMLAtoms::textarea==tag) { else if (nsHTMLAtoms::textarea==tag.get()) {
nsIDOMHTMLTextAreaElement *nextTextArea; nsIDOMHTMLTextAreaElement *nextTextArea;
if (NS_OK == child->QueryInterface(kIDOMHTMLTextAreaElementIID,(void **)&nextTextArea)) { if (NS_OK == child->QueryInterface(kIDOMHTMLTextAreaElementIID,(void **)&nextTextArea)) {
nextTextArea->GetDisabled(&disabled); nextTextArea->GetDisabled(&disabled);
@ -1769,7 +1769,7 @@ nsEventStateManager::GetNextTabbableContent(nsIContent* aParent, nsIContent* aCh
} }
} }
else if(nsHTMLAtoms::a==tag) { else if(nsHTMLAtoms::a==tag.get()) {
nsIDOMHTMLAnchorElement *nextAnchor; nsIDOMHTMLAnchorElement *nextAnchor;
if (NS_OK == child->QueryInterface(kIDOMHTMLAnchorElementIID,(void **)&nextAnchor)) { if (NS_OK == child->QueryInterface(kIDOMHTMLAnchorElementIID,(void **)&nextAnchor)) {
nextAnchor->GetTabIndex(&tabIndex); nextAnchor->GetTabIndex(&tabIndex);
@ -1777,7 +1777,7 @@ nsEventStateManager::GetNextTabbableContent(nsIContent* aParent, nsIContent* aCh
} }
disabled = PR_FALSE; disabled = PR_FALSE;
} }
else if(nsHTMLAtoms::button==tag) { else if(nsHTMLAtoms::button==tag.get()) {
nsIDOMHTMLButtonElement *nextButton; nsIDOMHTMLButtonElement *nextButton;
if (NS_OK == child->QueryInterface(kIDOMHTMLButtonElementIID,(void **)&nextButton)) { if (NS_OK == child->QueryInterface(kIDOMHTMLButtonElementIID,(void **)&nextButton)) {
nextButton->GetTabIndex(&tabIndex); nextButton->GetTabIndex(&tabIndex);
@ -1785,7 +1785,7 @@ nsEventStateManager::GetNextTabbableContent(nsIContent* aParent, nsIContent* aCh
NS_RELEASE(nextButton); NS_RELEASE(nextButton);
} }
} }
else if(nsHTMLAtoms::area==tag) { else if(nsHTMLAtoms::area==tag.get()) {
nsIDOMHTMLAreaElement *nextArea; nsIDOMHTMLAreaElement *nextArea;
if (NS_OK == child->QueryInterface(kIDOMHTMLAreaElementIID,(void **)&nextArea)) { if (NS_OK == child->QueryInterface(kIDOMHTMLAreaElementIID,(void **)&nextArea)) {
nextArea->GetTabIndex(&tabIndex); nextArea->GetTabIndex(&tabIndex);
@ -1793,7 +1793,7 @@ nsEventStateManager::GetNextTabbableContent(nsIContent* aParent, nsIContent* aCh
} }
disabled = PR_FALSE; disabled = PR_FALSE;
} }
else if(nsHTMLAtoms::object==tag) { else if(nsHTMLAtoms::object==tag.get()) {
nsIDOMHTMLObjectElement *nextObject; nsIDOMHTMLObjectElement *nextObject;
if (NS_OK == child->QueryInterface(kIDOMHTMLObjectElementIID,(void **)&nextObject)) { if (NS_OK == child->QueryInterface(kIDOMHTMLObjectElementIID,(void **)&nextObject)) {
nextObject->GetTabIndex(&tabIndex); nextObject->GetTabIndex(&tabIndex);

Просмотреть файл

@ -1057,10 +1057,10 @@ nsEventStateManager::CheckDisabled(nsIContent* aContent)
nsCOMPtr<nsIAtom> tag; nsCOMPtr<nsIAtom> tag;
aContent->GetTag(*getter_AddRefs(tag)); aContent->GetTag(*getter_AddRefs(tag));
if (nsHTMLAtoms::input == tag || if (nsHTMLAtoms::input == tag.get() ||
nsHTMLAtoms::select == tag || nsHTMLAtoms::select == tag.get() ||
nsHTMLAtoms::textarea == tag || nsHTMLAtoms::textarea == tag.get() ||
nsHTMLAtoms::button == tag) { nsHTMLAtoms::button == tag.get()) {
nsAutoString empty; nsAutoString empty;
if (NS_CONTENT_ATTR_HAS_VALUE == aContent->GetAttribute(kNameSpaceID_HTML, if (NS_CONTENT_ATTR_HAS_VALUE == aContent->GetAttribute(kNameSpaceID_HTML,
nsHTMLAtoms::disabled, nsHTMLAtoms::disabled,
@ -1738,7 +1738,7 @@ nsEventStateManager::GetNextTabbableContent(nsIContent* aParent, nsIContent* aCh
PRBool hidden = PR_FALSE; PRBool hidden = PR_FALSE;
child->GetTag(*getter_AddRefs(tag)); child->GetTag(*getter_AddRefs(tag));
if (nsHTMLAtoms::input==tag) { if (nsHTMLAtoms::input==tag.get()) {
nsIDOMHTMLInputElement *nextInput; nsIDOMHTMLInputElement *nextInput;
if (NS_OK == child->QueryInterface(kIDOMHTMLInputElementIID,(void **)&nextInput)) { if (NS_OK == child->QueryInterface(kIDOMHTMLInputElementIID,(void **)&nextInput)) {
nextInput->GetDisabled(&disabled); nextInput->GetDisabled(&disabled);
@ -1752,7 +1752,7 @@ nsEventStateManager::GetNextTabbableContent(nsIContent* aParent, nsIContent* aCh
NS_RELEASE(nextInput); NS_RELEASE(nextInput);
} }
} }
else if (nsHTMLAtoms::select==tag) { else if (nsHTMLAtoms::select==tag.get()) {
nsIDOMHTMLSelectElement *nextSelect; nsIDOMHTMLSelectElement *nextSelect;
if (NS_OK == child->QueryInterface(kIDOMHTMLSelectElementIID,(void **)&nextSelect)) { if (NS_OK == child->QueryInterface(kIDOMHTMLSelectElementIID,(void **)&nextSelect)) {
nextSelect->GetDisabled(&disabled); nextSelect->GetDisabled(&disabled);
@ -1760,7 +1760,7 @@ nsEventStateManager::GetNextTabbableContent(nsIContent* aParent, nsIContent* aCh
NS_RELEASE(nextSelect); NS_RELEASE(nextSelect);
} }
} }
else if (nsHTMLAtoms::textarea==tag) { else if (nsHTMLAtoms::textarea==tag.get()) {
nsIDOMHTMLTextAreaElement *nextTextArea; nsIDOMHTMLTextAreaElement *nextTextArea;
if (NS_OK == child->QueryInterface(kIDOMHTMLTextAreaElementIID,(void **)&nextTextArea)) { if (NS_OK == child->QueryInterface(kIDOMHTMLTextAreaElementIID,(void **)&nextTextArea)) {
nextTextArea->GetDisabled(&disabled); nextTextArea->GetDisabled(&disabled);
@ -1769,7 +1769,7 @@ nsEventStateManager::GetNextTabbableContent(nsIContent* aParent, nsIContent* aCh
} }
} }
else if(nsHTMLAtoms::a==tag) { else if(nsHTMLAtoms::a==tag.get()) {
nsIDOMHTMLAnchorElement *nextAnchor; nsIDOMHTMLAnchorElement *nextAnchor;
if (NS_OK == child->QueryInterface(kIDOMHTMLAnchorElementIID,(void **)&nextAnchor)) { if (NS_OK == child->QueryInterface(kIDOMHTMLAnchorElementIID,(void **)&nextAnchor)) {
nextAnchor->GetTabIndex(&tabIndex); nextAnchor->GetTabIndex(&tabIndex);
@ -1777,7 +1777,7 @@ nsEventStateManager::GetNextTabbableContent(nsIContent* aParent, nsIContent* aCh
} }
disabled = PR_FALSE; disabled = PR_FALSE;
} }
else if(nsHTMLAtoms::button==tag) { else if(nsHTMLAtoms::button==tag.get()) {
nsIDOMHTMLButtonElement *nextButton; nsIDOMHTMLButtonElement *nextButton;
if (NS_OK == child->QueryInterface(kIDOMHTMLButtonElementIID,(void **)&nextButton)) { if (NS_OK == child->QueryInterface(kIDOMHTMLButtonElementIID,(void **)&nextButton)) {
nextButton->GetTabIndex(&tabIndex); nextButton->GetTabIndex(&tabIndex);
@ -1785,7 +1785,7 @@ nsEventStateManager::GetNextTabbableContent(nsIContent* aParent, nsIContent* aCh
NS_RELEASE(nextButton); NS_RELEASE(nextButton);
} }
} }
else if(nsHTMLAtoms::area==tag) { else if(nsHTMLAtoms::area==tag.get()) {
nsIDOMHTMLAreaElement *nextArea; nsIDOMHTMLAreaElement *nextArea;
if (NS_OK == child->QueryInterface(kIDOMHTMLAreaElementIID,(void **)&nextArea)) { if (NS_OK == child->QueryInterface(kIDOMHTMLAreaElementIID,(void **)&nextArea)) {
nextArea->GetTabIndex(&tabIndex); nextArea->GetTabIndex(&tabIndex);
@ -1793,7 +1793,7 @@ nsEventStateManager::GetNextTabbableContent(nsIContent* aParent, nsIContent* aCh
} }
disabled = PR_FALSE; disabled = PR_FALSE;
} }
else if(nsHTMLAtoms::object==tag) { else if(nsHTMLAtoms::object==tag.get()) {
nsIDOMHTMLObjectElement *nextObject; nsIDOMHTMLObjectElement *nextObject;
if (NS_OK == child->QueryInterface(kIDOMHTMLObjectElementIID,(void **)&nextObject)) { if (NS_OK == child->QueryInterface(kIDOMHTMLObjectElementIID,(void **)&nextObject)) {
nextObject->GetTabIndex(&tabIndex); nextObject->GetTabIndex(&tabIndex);