mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 406646. Make sure to only search *visible* popups for mouse event targets. r=enndeakin
--HG-- extra : rebase_source : bd0825d6a6469a10dcdd9e4ae9e9c91dcbafbe99
This commit is contained in:
parent
759614de52
commit
19082bf736
@ -1015,7 +1015,7 @@ PRBool nsCaret::IsMenuPopupHidingCaret()
|
||||
#ifdef MOZ_XUL
|
||||
// Check if there are open popups.
|
||||
nsXULPopupManager *popMgr = nsXULPopupManager::GetInstance();
|
||||
nsTArray<nsIFrame*> popups = popMgr->GetOpenPopups();
|
||||
nsTArray<nsIFrame*> popups = popMgr->GetVisiblePopups();
|
||||
|
||||
if (popups.Length() == 0)
|
||||
return PR_FALSE; // No popups, so caret can't be hidden by them.
|
||||
|
@ -5662,7 +5662,7 @@ PresShell::HandleEvent(nsIView *aView,
|
||||
#ifdef MOZ_XUL
|
||||
nsXULPopupManager* pm = nsXULPopupManager::GetInstance();
|
||||
if (pm) {
|
||||
nsTArray<nsIFrame*> popups = pm->GetOpenPopups();
|
||||
nsTArray<nsIFrame*> popups = pm->GetVisiblePopups();
|
||||
PRUint32 i;
|
||||
// Search from top to bottom
|
||||
for (i = 0; i < popups.Length(); i++) {
|
||||
|
@ -498,10 +498,10 @@ public:
|
||||
nsIFrame* GetTopPopup(nsPopupType aType);
|
||||
|
||||
/**
|
||||
* Return an array of all the open popup frames for menus, in order from
|
||||
* top to bottom.
|
||||
* Return an array of all the open and visible popup frames for
|
||||
* menus, in order from top to bottom.
|
||||
*/
|
||||
nsTArray<nsIFrame *> GetOpenPopups();
|
||||
nsTArray<nsIFrame *> GetVisiblePopups();
|
||||
|
||||
/**
|
||||
* Return false if a popup may not be opened. This will return false if the
|
||||
|
@ -1169,13 +1169,13 @@ nsXULPopupManager::GetTopPopup(nsPopupType aType)
|
||||
}
|
||||
|
||||
nsTArray<nsIFrame *>
|
||||
nsXULPopupManager::GetOpenPopups()
|
||||
nsXULPopupManager::GetVisiblePopups()
|
||||
{
|
||||
nsTArray<nsIFrame *> popups;
|
||||
|
||||
nsMenuChainItem* item = mPopups;
|
||||
while (item) {
|
||||
if (item->Frame()->PopupState() != ePopupInvisible)
|
||||
if (item->Frame()->PopupState() == ePopupOpenAndVisible)
|
||||
popups.AppendElement(static_cast<nsIFrame*>(item->Frame()));
|
||||
item = item->GetParent();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user