зеркало из https://github.com/mozilla/pjs.git
Bug 678060: Fix build with clang and c++0x. Need explicit cast from enums to ThemeMenuState in init list, since ThemeMenuState is typedefed to an int type. r=josh
This commit is contained in:
Родитель
38b8e5cc37
Коммит
f1ac76891f
|
@ -1797,8 +1797,9 @@ nsNativeThemeCocoa::DrawWidgetBackground(nsRenderingContext* aContext,
|
|||
case NS_THEME_MENUPOPUP: {
|
||||
HIThemeMenuDrawInfo mdi = {
|
||||
version: 0,
|
||||
menuType: IsDisabled(aFrame, eventState) ? kThemeMenuTypeInactive
|
||||
: kThemeMenuTypePopUp
|
||||
menuType: IsDisabled(aFrame, eventState) ?
|
||||
static_cast<ThemeMenuType>(kThemeMenuTypeInactive) :
|
||||
static_cast<ThemeMenuType>(kThemeMenuTypePopUp)
|
||||
};
|
||||
|
||||
PRBool isLeftOfParent = PR_FALSE;
|
||||
|
@ -1821,9 +1822,10 @@ nsNativeThemeCocoa::DrawWidgetBackground(nsRenderingContext* aContext,
|
|||
HIThemeMenuItemDrawInfo drawInfo = {
|
||||
version: 0,
|
||||
itemType: kThemeMenuItemPlain,
|
||||
state: (IsDisabled(aFrame, eventState) ? kThemeMenuDisabled :
|
||||
CheckBooleanAttr(aFrame, nsWidgetAtoms::mozmenuactive) ? kThemeMenuSelected :
|
||||
kThemeMenuActive)
|
||||
state: (IsDisabled(aFrame, eventState) ? static_cast<ThemeMenuState>(kThemeMenuDisabled) :
|
||||
CheckBooleanAttr(aFrame, nsWidgetAtoms::mozmenuactive) ?
|
||||
static_cast<ThemeMenuState>(kThemeMenuSelected) :
|
||||
static_cast<ThemeMenuState>(kThemeMenuActive))
|
||||
};
|
||||
|
||||
// XXX pass in the menu rect instead of always using the item rect
|
||||
|
|
Загрузка…
Ссылка в новой задаче