Fixing build bustage.

This commit is contained in:
jst%mozilla.jstenback.com 2003-09-27 05:49:52 +00:00
parent cea6451684
commit 43cce5a477
5 changed files with 29 additions and 45 deletions

View File

@ -799,11 +799,9 @@ nsEventStatus nsMenu::MenuConstruct(
return nsEventStatus_eIgnore;
// Iterate over the kids
PRInt32 count;
menuPopup->ChildCount(count);
for ( PRInt32 i = 0; i < count; ++i ) {
nsCOMPtr<nsIContent> child;
menuPopup->ChildAt(i, getter_AddRefs(child));
PRUint32 count = menuPopup->GetChildCount();
for ( PRUint32 i = 0; i < count; ++i ) {
nsIContent *child = menuPopup->GetChildAt(i);
if ( child ) {
// depending on the type, create a menu item, separator, or submenu
nsCOMPtr<nsIAtom> tag;
@ -848,12 +846,10 @@ nsMenu::HelpMenuConstruct( const nsMenuEvent & aMenuEvent, nsIWidget* aParentWin
return nsEventStatus_eIgnore;
// Iterate over the kids
PRInt32 count;
menuPopup->ChildCount(count);
for ( PRInt32 i = 0; i < count; ++i ) {
nsCOMPtr<nsIContent> child;
menuPopup->ChildAt(i, getter_AddRefs(child));
if ( child ) {
PRUint32 count = menuPopup->GetChildCount();
for ( PRUint32 i = 0; i < count; ++i ) {
nsIContent *child = menuPopup->GetChildAt(i);
if ( child ) {
// depending on the type, create a menu item, separator, or submenu
nsCOMPtr<nsIAtom> tag;
child->GetTag ( *getter_AddRefs(tag) );
@ -1209,14 +1205,12 @@ nsMenu::OnCreate()
if (popupContent) {
nsCOMPtr<nsIDOMDocument> domDoc(do_QueryInterface(popupContent->GetDocument()));
PRInt32 count;
popupContent->ChildCount(count);
for (PRInt32 i = 0; i < count; i++) {
nsCOMPtr<nsIContent> grandChild;
popupContent->ChildAt(i, getter_AddRefs(grandChild));
PRUint32 count = popupContent->GetChildCount();
for (PRUint32 i = 0; i < count; i++) {
nsIContent *grandChild = popupContent->GetChildAt(i);
nsCOMPtr<nsIAtom> tag;
grandChild->GetTag(getter_AddRefs(tag));
if (tag.get() == nsWidgetAtoms::menuitem) {
if (tag == nsWidgetAtoms::menuitem) {
// See if we have a command attribute.
nsAutoString command;
grandChild->GetAttr(kNameSpaceID_None, nsWidgetAtoms::command, command);
@ -1403,16 +1397,14 @@ nsMenu::GetMenuPopupContent(nsIContent** aResult)
if ( !xblService )
return;
PRInt32 count;
mMenuContent->ChildCount(count);
PRUint32 count = mMenuContent->GetChildCount();
for (PRInt32 i = 0; i < count; i++) {
for (PRUint32 i = 0; i < count; i++) {
PRInt32 dummy;
nsCOMPtr<nsIContent> child;
mMenuContent->ChildAt(i, getter_AddRefs(child));
nsIContent *child = mMenuContent->GetChildAt(i);
nsCOMPtr<nsIAtom> tag;
xblService->ResolveTag(child, &dummy, getter_AddRefs(tag));
if (tag && tag.get() == nsWidgetAtoms::menupopup) {
if (tag == nsWidgetAtoms::menupopup) {
*aResult = child.get();
NS_ADDREF(*aResult);
return;

View File

@ -370,11 +370,9 @@ nsMenuBar::MenuConstruct( const nsMenuEvent & aMenuEvent, nsIWidget* aParentWind
// set this as a nsMenuListener on aParentWindow
aParentWindow->AddMenuListener((nsIMenuListener *)this);
PRInt32 count;
mMenuBarContent->ChildCount(count);
for ( int i = 0; i < count; ++i ) {
nsCOMPtr<nsIContent> menu;
mMenuBarContent->ChildAt ( i, *getter_AddRefs(menu) );
PRUint32 count = mMenuBarContent->GetChildCount();
for ( PRUint32 i = 0; i < count; ++i ) {
nsIContent *menu = mMenuBarContent->GetChildAt(i);
if ( menu ) {
nsCOMPtr<nsIAtom> tag;
menu->GetTag ( *getter_AddRefs(tag) );

View File

@ -473,11 +473,9 @@ nsMenuBarX::MenuConstruct( const nsMenuEvent & aMenuEvent, nsIWidget* aParentWin
// set this as a nsMenuListener on aParentWindow
aParentWindow->AddMenuListener((nsIMenuListener *)this);
PRInt32 count;
mMenuBarContent->ChildCount(count);
for ( int i = 0; i < count; ++i ) {
nsCOMPtr<nsIContent> menu;
mMenuBarContent->ChildAt ( i, getter_AddRefs(menu) );
PRUint32 count = mMenuBarContent->GetChildCount();
for ( PRUint32 i = 0; i < count; ++i ) {
nsIContent *menu = mMenuBarContent->GetChildAt(i);
if ( menu ) {
nsCOMPtr<nsIAtom> tag;
menu->GetTag ( getter_AddRefs(tag) );

View File

@ -365,13 +365,11 @@ nsMenuItem :: UncheckRadioSiblings ( nsIContent* inCheckedContent )
return;
// loop over siblings
PRInt32 count;
parent->ChildCount(count);
for ( PRInt32 i = 0; i < count; ++i ) {
nsCOMPtr<nsIContent> sibling;
parent->ChildAt(i, getter_AddRefs(sibling));
PRUint32 count = parent->GetChildCount();
for ( PRUint32 i = 0; i < count; ++i ) {
nsIContent *sibling = parent->GetChildAt(i);
if ( sibling ) {
if ( sibling.get() != inCheckedContent ) { // skip this node
if ( sibling != inCheckedContent ) { // skip this node
// if the current sibling is in the same group, clear it
nsAutoString currGroupName;
sibling->GetAttr(kNameSpaceID_None, nsWidgetAtoms::name, currGroupName);

View File

@ -323,13 +323,11 @@ nsMenuItemX :: UncheckRadioSiblings(nsIContent* inCheckedContent)
return;
// loop over siblings
PRInt32 count;
parent->ChildCount(count);
for ( PRInt32 i = 0; i < count; ++i ) {
nsCOMPtr<nsIContent> sibling;
parent->ChildAt(i, getter_AddRefs(sibling));
PRUint32 count = parent->GetChildCount();
for ( PRUint32 i = 0; i < count; ++i ) {
nsIContent *sibling = parent->GetChildAt(i);
if ( sibling ) {
if ( sibling.get() != inCheckedContent ) { // skip this node
if ( sibling != inCheckedContent ) { // skip this node
// if the current sibling is in the same group, clear it
nsAutoString currGroupName;
sibling->GetAttr(kNameSpaceID_None, nsWidgetAtoms::name, currGroupName);