Beginning phase 2 of the XP menu landing. Menus will be horked intermittently

on all platforms until I complete this landing.  Do not pull if this will be
a problem for you.
This commit is contained in:
hyatt%netscape.com 1999-07-31 06:30:43 +00:00
Родитель 38ba2d2fad
Коммит 19678d492e
1 изменённых файлов: 19 добавлений и 2 удалений

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

@ -558,9 +558,26 @@ nsEventStatus nsMenu::MenuConstruct(
if (domElement)
domElement->SetAttribute("open", "true");
// Now get the kids
// Now get the kids. Retrieve our menupopup child.
nsCOMPtr<nsIDOMNode> menuPopupNode;
mDOMNode->GetFirstChild(getter_AddRefs(menuPopupNode));
while (menuPopupNode) {
nsCOMPtr<nsIDOMElement> menuPopupElement(do_QueryInterface(menuPopupNode));
if (menuPopupElement) {
nsString menuPopupNodeType;
menuPopupElement->GetNodeName(menuPopupNodeType);
if (menuPopupNodeType.Equals("menupopup"))
break;
}
nsCOMPtr<nsIDOMNode> oldMenuPopupNode(menuPopupNode);
oldMenuPopupNode->GetNextSibling(getter_AddRefs(menuPopupNode));
}
if (!menuPopupNode)
return nsEventStatus_eIgnore;
nsCOMPtr<nsIDOMNode> menuitemNode;
mDOMNode->GetFirstChild(getter_AddRefs(menuitemNode));
menuPopupNode->GetFirstChild(getter_AddRefs(menuitemNode));
unsigned short menuIndex = 0;