зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
38ba2d2fad
Коммит
19678d492e
|
@ -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;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче