зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1701085 - Return the native menu's trigger node from nsXULPopupManager::GetLastTriggerNode while the native menu is open. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D110304
This commit is contained in:
Родитель
c4d150d967
Коммит
8880f6598d
|
@ -1678,6 +1678,12 @@ already_AddRefed<nsINode> nsXULPopupManager::GetLastTriggerNode(
|
|||
nsCOMPtr<nsIContent> openingPopup = mOpeningPopup;
|
||||
node = nsMenuPopupFrame::GetTriggerContent(
|
||||
GetPopupFrameForContent(openingPopup, false));
|
||||
} else if (mNativeMenu && !aIsTooltip) {
|
||||
RefPtr<dom::Element> popup = mNativeMenu->Element();
|
||||
if (popup->GetUncomposedDoc() == aDocument) {
|
||||
nsMenuPopupFrame* popupFrame = GetPopupFrameForContent(popup, false);
|
||||
node = nsMenuPopupFrame::GetTriggerContent(popupFrame);
|
||||
}
|
||||
} else {
|
||||
nsMenuChainItem* item = mPopups;
|
||||
while (item) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче