Bug 645662 Should not consume mouse down event at the sub menu of splitmenu or toolbarbutton rolled up r=enndeakin

This commit is contained in:
Masayuki Nakano 2011-03-31 21:28:19 +09:00
parent 4062eb4acd
commit f137ac24c5
2 changed files with 9 additions and 3 deletions

View File

@ -560,6 +560,7 @@ GK_ATOM(member, "member")
GK_ATOM(menu, "menu")
GK_ATOM(menubar, "menubar")
GK_ATOM(menubutton, "menubutton")
GK_ATOM(menuButton, "menu-button")
GK_ATOM(menugenerated, "menugenerated")
GK_ATOM(menuitem, "menuitem")
GK_ATOM(menulist, "menulist")
@ -915,6 +916,7 @@ GK_ATOM(span, "span")
GK_ATOM(spellcheck, "spellcheck")
GK_ATOM(spinner, "spinner")
GK_ATOM(split, "split")
GK_ATOM(splitmenu, "splitmenu")
GK_ATOM(splitter, "splitter")
GK_ATOM(spring, "spring")
GK_ATOM(src, "src")

View File

@ -1413,10 +1413,14 @@ PRBool nsMenuPopupFrame::ConsumeOutsideClicks()
#if defined(XP_WIN) || defined(XP_OS2)
// Don't consume outside clicks for menus in Windows
if (ni->Equals(nsGkAtoms::menu, kNameSpaceID_XUL) ||
ni->Equals(nsGkAtoms::splitmenu, kNameSpaceID_XUL) ||
ni->Equals(nsGkAtoms::popupset, kNameSpaceID_XUL) ||
(ni->Equals(nsGkAtoms::button, kNameSpaceID_XUL) &&
parentContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::type,
nsGkAtoms::menu, eCaseMatters))) {
((ni->Equals(nsGkAtoms::button, kNameSpaceID_XUL) ||
ni->Equals(nsGkAtoms::toolbarbutton, kNameSpaceID_XUL)) &&
(parentContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::type,
nsGkAtoms::menu, eCaseMatters) ||
parentContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::type,
nsGkAtoms::menuButton, eCaseMatters)))) {
return PR_FALSE;
}
#endif