Backed out changeset f11c529b2407 (bug 1805414) for failures on test_submenuClose.xhtml and nsMenuPopupFrame.cpp. CLOSED TREE
This commit is contained in:
@@ -150,6 +150,7 @@
|
||||
// For style data reconstruction
|
||||
#include "nsStyleChangeList.h"
|
||||
#include "nsCSSFrameConstructor.h"
|
||||
#include "nsMenuFrame.h"
|
||||
#include "nsTreeBodyFrame.h"
|
||||
#include "XULTreeElement.h"
|
||||
#include "nsMenuPopupFrame.h"
|
||||
@@ -8850,11 +8851,12 @@ bool PresShell::EventHandler::AdjustContextMenuKeyEvent(
|
||||
WidgetMouseEvent* aMouseEvent) {
|
||||
// if a menu is open, open the context menu relative to the active item on the
|
||||
// menu.
|
||||
if (nsXULPopupManager* pm = nsXULPopupManager::GetInstance()) {
|
||||
nsXULPopupManager* pm = nsXULPopupManager::GetInstance();
|
||||
if (pm) {
|
||||
nsIFrame* popupFrame = pm->GetTopPopup(ePopupTypeMenu);
|
||||
if (popupFrame) {
|
||||
nsIFrame* itemFrame = (static_cast<nsMenuPopupFrame*>(popupFrame))
|
||||
->GetCurrentMenuItemFrame();
|
||||
nsIFrame* itemFrame =
|
||||
(static_cast<nsMenuPopupFrame*>(popupFrame))->GetCurrentMenuItem();
|
||||
if (!itemFrame) itemFrame = popupFrame;
|
||||
|
||||
nsCOMPtr<nsIWidget> widget = popupFrame->GetNearestWidget();
|
||||
|
||||
Reference in New Issue
Block a user