Bug 597723. Mouse scrolling shouldn't dismiss panel notifications. r=enndeakin a=blocking-final

This commit is contained in:
Felipe Gomes 2011-01-19 19:21:38 -08:00
Родитель 5236911265
Коммит fda83a7b52
1 изменённых файлов: 12 добавлений и 1 удалений

Просмотреть файл

@ -217,8 +217,19 @@ NS_IMETHODIMP nsXULPopupManager::ShouldRollupOnMouseWheelEvent(PRBool *aShouldRo
{
// should rollup only for autocomplete widgets
// XXXndeakin this should really be something the popup has more control over
*aShouldRollup = PR_FALSE;
nsMenuChainItem* item = GetTopVisibleMenu();
*aShouldRollup = (item && !item->Frame()->IsMenu());
if (!item)
return NS_OK;
nsIContent* content = item->Frame()->GetContent();
if (content) {
nsAutoString value;
content->GetAttr(kNameSpaceID_None, nsGkAtoms::type, value);
*aShouldRollup = StringBeginsWith(value, NS_LITERAL_STRING("autocomplete"));
}
return NS_OK;
}