зеркало из https://github.com/mozilla/gecko-dev.git
Bug 531075 followup: Shift new early-return down a bit, to let simpler early-returns catch open-and-visible popups. r=bz
This commit is contained in:
Родитель
35a1d741cd
Коммит
529276334d
|
@ -1218,12 +1218,6 @@ nsXULPopupManager::GetVisiblePopups()
|
|||
PRBool
|
||||
nsXULPopupManager::MayShowPopup(nsMenuPopupFrame* aPopup)
|
||||
{
|
||||
// Don't show popups that we already have in our popup chain
|
||||
if (IsPopupOpen(aPopup->GetContent())) {
|
||||
NS_WARNING("Refusing to show duplicate popup");
|
||||
return PR_FALSE;
|
||||
}
|
||||
|
||||
// if a popup's IsOpen method returns true, then the popup must always be in
|
||||
// the popup chain scanned in IsPopupOpen.
|
||||
NS_ASSERTION(!aPopup->IsOpen() || IsPopupOpen(aPopup->GetContent()),
|
||||
|
@ -1241,6 +1235,12 @@ nsXULPopupManager::MayShowPopup(nsMenuPopupFrame* aPopup)
|
|||
if (state != ePopupClosed && state != ePopupInvisible)
|
||||
return PR_FALSE;
|
||||
|
||||
// Don't show popups that we already have in our popup chain
|
||||
if (IsPopupOpen(aPopup->GetContent())) {
|
||||
NS_WARNING("Refusing to show duplicate popup");
|
||||
return PR_FALSE;
|
||||
}
|
||||
|
||||
// if the popup was just rolled up, don't reopen it
|
||||
nsCOMPtr<nsIWidget> widget;
|
||||
aPopup->GetWidget(getter_AddRefs(widget));
|
||||
|
|
Загрузка…
Ссылка в новой задаче