зеркало из 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: {
|
case NS_THEME_MENUPOPUP: {
|
||||||
HIThemeMenuDrawInfo mdi = {
|
HIThemeMenuDrawInfo mdi = {
|
||||||
version: 0,
|
version: 0,
|
||||||
menuType: IsDisabled(aFrame, eventState) ? kThemeMenuTypeInactive
|
menuType: IsDisabled(aFrame, eventState) ?
|
||||||
: kThemeMenuTypePopUp
|
static_cast<ThemeMenuType>(kThemeMenuTypeInactive) :
|
||||||
|
static_cast<ThemeMenuType>(kThemeMenuTypePopUp)
|
||||||
};
|
};
|
||||||
|
|
||||||
PRBool isLeftOfParent = PR_FALSE;
|
PRBool isLeftOfParent = PR_FALSE;
|
||||||
|
@ -1821,9 +1822,10 @@ nsNativeThemeCocoa::DrawWidgetBackground(nsRenderingContext* aContext,
|
||||||
HIThemeMenuItemDrawInfo drawInfo = {
|
HIThemeMenuItemDrawInfo drawInfo = {
|
||||||
version: 0,
|
version: 0,
|
||||||
itemType: kThemeMenuItemPlain,
|
itemType: kThemeMenuItemPlain,
|
||||||
state: (IsDisabled(aFrame, eventState) ? kThemeMenuDisabled :
|
state: (IsDisabled(aFrame, eventState) ? static_cast<ThemeMenuState>(kThemeMenuDisabled) :
|
||||||
CheckBooleanAttr(aFrame, nsWidgetAtoms::mozmenuactive) ? kThemeMenuSelected :
|
CheckBooleanAttr(aFrame, nsWidgetAtoms::mozmenuactive) ?
|
||||||
kThemeMenuActive)
|
static_cast<ThemeMenuState>(kThemeMenuSelected) :
|
||||||
|
static_cast<ThemeMenuState>(kThemeMenuActive))
|
||||||
};
|
};
|
||||||
|
|
||||||
// XXX pass in the menu rect instead of always using the item rect
|
// XXX pass in the menu rect instead of always using the item rect
|
||||||
|
|
Загрузка…
Ссылка в новой задаче