зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1504745, update the follow state before SetCaptureState as the nsMenuChainItem now stored in mPopups could be destroyed, r=tn
This commit is contained in:
Родитель
d34d2ca3a4
Коммит
6e655bec59
|
@ -923,6 +923,8 @@ nsXULPopupManager::ShowPopupCallback(nsIContent* aPopup,
|
||||||
aPopupFrame->ShowPopup(aIsContextMenu);
|
aPopupFrame->ShowPopup(aIsContextMenu);
|
||||||
NS_ENSURE_TRUE_VOID(weakFrame.IsAlive());
|
NS_ENSURE_TRUE_VOID(weakFrame.IsAlive());
|
||||||
|
|
||||||
|
item->UpdateFollowAnchor();
|
||||||
|
|
||||||
// popups normally hide when an outside click occurs. Panels may use
|
// popups normally hide when an outside click occurs. Panels may use
|
||||||
// the noautohide attribute to disable this behaviour. It is expected
|
// the noautohide attribute to disable this behaviour. It is expected
|
||||||
// that the application will hide these popups manually. The tooltip
|
// that the application will hide these popups manually. The tooltip
|
||||||
|
@ -936,8 +938,6 @@ nsXULPopupManager::ShowPopupCallback(nsIContent* aPopup,
|
||||||
SetCaptureState(oldmenu);
|
SetCaptureState(oldmenu);
|
||||||
NS_ENSURE_TRUE_VOID(weakFrame.IsAlive());
|
NS_ENSURE_TRUE_VOID(weakFrame.IsAlive());
|
||||||
|
|
||||||
item->UpdateFollowAnchor();
|
|
||||||
|
|
||||||
if (aSelectFirstItem) {
|
if (aSelectFirstItem) {
|
||||||
nsMenuFrame* next = GetNextMenuItem(aPopupFrame, nullptr, true, false);
|
nsMenuFrame* next = GetNextMenuItem(aPopupFrame, nullptr, true, false);
|
||||||
aPopupFrame->SetCurrentMenuItem(next);
|
aPopupFrame->SetCurrentMenuItem(next);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче