fix camino build bustage, r=pink, sr=jst (bug 220562)

This commit is contained in:
pinkerton%netscape.com 2003-09-30 21:04:27 +00:00
Родитель c29f4c0d61
Коммит dbd32f08ec
3 изменённых файлов: 23 добавлений и 36 удалений

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

@ -466,11 +466,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) );

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

@ -338,13 +338,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);

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

@ -341,7 +341,7 @@ NS_METHOD nsMenuX::AddMenu(nsIMenu * aMenu)
::DisableMenuItem(mMacMenuHandle, currItemIndex);
MenuHandle childMenu;
if (aMenu->GetNativeData(&(void*)childMenu) == NS_OK)
if (aMenu->GetNativeData((void**)&childMenu) == NS_OK)
::SetMenuItemHierarchicalMenu((MenuHandle) mMacMenuHandle, currItemIndex, childMenu);
return NS_OK;
@ -575,11 +575,9 @@ nsEventStatus nsMenuX::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;
@ -621,11 +619,9 @@ nsEventStatus nsMenuX::HelpMenuConstruct(
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;
@ -1019,14 +1015,12 @@ nsMenuX::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);
@ -1213,17 +1207,14 @@ nsMenuX::GetMenuPopupContent(nsIContent** aResult)
if ( !xblService )
return;
PRInt32 count;
mMenuContent->ChildCount(count);
for (PRInt32 i = 0; i < count; i++) {
PRUint32 count = mMenuContent->GetChildCount();
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) {
*aResult = child.get();
if (tag == nsWidgetAtoms::menupopup) {
*aResult = child;
NS_ADDREF(*aResult);
return;
}