Lines Matching refs:nsMenuX
42 mMenu = MakeRefPtr<nsMenuX>(nullptr, mMenuGroupOwner, aElement);
54 static void UpdateMenu(nsMenuX* aMenu) {
60 nsMenuX::MenuChild menuObject = *aMenu->GetItemAt(i);
61 if (menuObject.is<RefPtr<nsMenuX>>()) {
62 UpdateMenu(menuObject.as<RefPtr<nsMenuX>>());
109 RefPtr<nsMenuX> currentMenu = mMenu.get();
118 Maybe<nsMenuX::MenuChild> targetMenu = currentMenu->GetItemAt(j);
123 [](const RefPtr<nsMenuX>& aMenu) { return aMenu->Content(); },
127 if (targetMenu->is<RefPtr<nsMenuX>>() && visible == (targetIndex + 1)) {
128 currentMenu = targetMenu->as<RefPtr<nsMenuX>>();
279 RefPtr<nsMenuX> NativeMenuMac::GetOpenMenuContainingElement(dom::Element* aElement) {
293 // Traverse submenuChain from shallow to deep, to find the nsMenuX that contains aElement.
295 RefPtr<nsMenuX> menu = mMenu;
301 Maybe<nsMenuX::MenuChild> menuChild = menu->GetItemForElement(submenu);
302 if (!menuChild || !menuChild->is<RefPtr<nsMenuX>>()) {
306 menu = menuChild->as<RefPtr<nsMenuX>>();
335 RefPtr<nsMenuX> menu = GetOpenMenuContainingElement(aItemElement);
340 Maybe<nsMenuX::MenuChild> child = menu->GetItemForElement(aItemElement);
377 if (RefPtr<nsMenuX> menu = GetOpenMenuContainingElement(aMenuElement)) {
378 Maybe<nsMenuX::MenuChild> item = menu->GetItemForElement(aMenuElement);
379 if (item && item->is<RefPtr<nsMenuX>>()) {
380 item->as<RefPtr<nsMenuX>>()->MenuOpened();
386 if (RefPtr<nsMenuX> menu = GetOpenMenuContainingElement(aMenuElement)) {
387 Maybe<nsMenuX::MenuChild> item = menu->GetItemForElement(aMenuElement);
388 if (item && item->is<RefPtr<nsMenuX>>()) {
389 item->as<RefPtr<nsMenuX>>()->MenuClosed();