diff --git a/layout/style/nsCSSKeywordList.h b/layout/style/nsCSSKeywordList.h index 2e542f2d24e..558645af747 100644 --- a/layout/style/nsCSSKeywordList.h +++ b/layout/style/nsCSSKeywordList.h @@ -117,6 +117,7 @@ CSS_KEY(-moz-malayalam, _moz_malayalam) CSS_KEY(-moz-max-content, _moz_max_content) CSS_KEY(-moz-menuhover, _moz_menuhover) CSS_KEY(-moz-menuhovertext, _moz_menuhovertext) +CSS_KEY(-moz-menubar, _moz_menubar) CSS_KEY(-moz-menubartext, _moz_menubartext) CSS_KEY(-moz-menubarhovertext, _moz_menubarhovertext) CSS_KEY(-moz-middle-with-baseline, _moz_middle_with_baseline) diff --git a/layout/style/nsCSSProps.cpp b/layout/style/nsCSSProps.cpp index f2377ce3eec..8e6199fdcf8 100644 --- a/layout/style/nsCSSProps.cpp +++ b/layout/style/nsCSSProps.cpp @@ -854,6 +854,7 @@ const int32_t nsCSSProps::kColorKTable[] = { eCSSKeyword__moz_mac_secondaryhighlight, LookAndFeel::eColorID__moz_mac_secondaryhighlight, eCSSKeyword__moz_menuhover, LookAndFeel::eColorID__moz_menuhover, eCSSKeyword__moz_menuhovertext, LookAndFeel::eColorID__moz_menuhovertext, + eCSSKeyword__moz_menubar, LookAndFeel::eColorID__moz_menubar, eCSSKeyword__moz_menubartext, LookAndFeel::eColorID__moz_menubartext, eCSSKeyword__moz_menubarhovertext, LookAndFeel::eColorID__moz_menubarhovertext, eCSSKeyword__moz_oddtreerow, LookAndFeel::eColorID__moz_oddtreerow, diff --git a/widget/LookAndFeel.h b/widget/LookAndFeel.h index 1cb79fb3cff..34d5436a632 100644 --- a/widget/LookAndFeel.h +++ b/widget/LookAndFeel.h @@ -114,6 +114,8 @@ public: eColorID__moz_menuhover, // used to menu item text, when mouse is over eColorID__moz_menuhovertext, + // used to menu bar background + eColorID__moz_menubar, // used to menu bar item text eColorID__moz_menubartext, // used to menu bar item text, when mouse is over diff --git a/widget/android/nsLookAndFeel.cpp b/widget/android/nsLookAndFeel.cpp index edef1e0334d..3dae0991f03 100644 --- a/widget/android/nsLookAndFeel.cpp +++ b/widget/android/nsLookAndFeel.cpp @@ -217,6 +217,7 @@ nsLookAndFeel::NativeGetColor(ColorID aID, nscolor &aColor) aColor = mSystemColors.colorForeground; break; case eColorID_menu: + case eColorID__moz_menubar: // menu background aColor = mSystemColors.colorBackground; break; diff --git a/widget/cocoa/nsLookAndFeel.mm b/widget/cocoa/nsLookAndFeel.mm index 5ffcf7e6c0e..8e044903bee 100644 --- a/widget/cocoa/nsLookAndFeel.mm +++ b/widget/cocoa/nsLookAndFeel.mm @@ -189,6 +189,7 @@ nsLookAndFeel::NativeGetColor(ColorID aID, nscolor &aColor) aColor = NS_RGB(0xDA,0xDA,0xDA); break; case eColorID_menu: + case eColorID__moz_menubar: aColor = GetColorFromNSColor([NSColor alternateSelectedControlTextColor]); break; case eColorID_infobackground: diff --git a/widget/gonk/nsLookAndFeel.cpp b/widget/gonk/nsLookAndFeel.cpp index ff24a15dfef..9a5c47f2b57 100644 --- a/widget/gonk/nsLookAndFeel.cpp +++ b/widget/gonk/nsLookAndFeel.cpp @@ -174,6 +174,7 @@ nsLookAndFeel::NativeGetColor(ColorID aID, nscolor &aColor) aColor = TEXT_NORMAL_COLOR; break; case eColorID_menu: + case eColorID__moz_menubar: // menu background aColor = BG_NORMAL_COLOR; break; diff --git a/widget/gtk2/nsLookAndFeel.cpp b/widget/gtk2/nsLookAndFeel.cpp index 18b9b2caf99..3307698f331 100644 --- a/widget/gtk2/nsLookAndFeel.cpp +++ b/widget/gtk2/nsLookAndFeel.cpp @@ -37,6 +37,7 @@ using mozilla::LookAndFeel; nscolor nsLookAndFeel::sInfoText = 0; nscolor nsLookAndFeel::sInfoBackground = 0; +nscolor nsLookAndFeel::sMenuBar = 0; nscolor nsLookAndFeel::sMenuBarText = 0; nscolor nsLookAndFeel::sMenuBarHoverText = 0; nscolor nsLookAndFeel::sMenuText = 0; @@ -311,6 +312,9 @@ nsLookAndFeel::NativeGetColor(ColorID aID, nscolor& aColor) case eColorID__moz_combobox: aColor = sComboBoxBackground; break; + case eColorID__moz_menubar: + aColor = sMenuBar; + break; case eColorID__moz_menubartext: aColor = sMenuBarText; break; @@ -885,6 +889,7 @@ nsLookAndFeel::InitLookAndFeel() style = gtk_widget_get_style(menuBar); if (style) { + sMenuBar = GDK_COLOR_TO_NS_RGB(style->bg[GTK_STATE_NORMAL]); sMenuBarText = GDK_COLOR_TO_NS_RGB(style->fg[GTK_STATE_NORMAL]); sMenuBarHoverText = GDK_COLOR_TO_NS_RGB(style->fg[GTK_STATE_SELECTED]); } diff --git a/widget/gtk2/nsLookAndFeel.h b/widget/gtk2/nsLookAndFeel.h index f6d158abd07..769d8880df5 100644 --- a/widget/gtk2/nsLookAndFeel.h +++ b/widget/gtk2/nsLookAndFeel.h @@ -53,6 +53,7 @@ protected: static nscolor sInfoBackground; static nscolor sInfoText; static nscolor sMenuBackground; + static nscolor sMenuBar; static nscolor sMenuBarText; static nscolor sMenuBarHoverText; static nscolor sMenuText; diff --git a/widget/os2/nsLookAndFeel.cpp b/widget/os2/nsLookAndFeel.cpp index 384993dfa5a..542927a23ef 100644 --- a/widget/os2/nsLookAndFeel.cpp +++ b/widget/os2/nsLookAndFeel.cpp @@ -151,6 +151,7 @@ nsLookAndFeel::NativeGetColor(ColorID aID, nscolor &aColor) idx = SYSCLR_WINDOWTEXT; break; case eColorID_menu: + case eColorID__moz_menubar: idx = SYSCLR_MENU; break; case eColorID_menutext: diff --git a/widget/qt/nsLookAndFeel.cpp b/widget/qt/nsLookAndFeel.cpp index cbc8e435980..184a040247a 100644 --- a/widget/qt/nsLookAndFeel.cpp +++ b/widget/qt/nsLookAndFeel.cpp @@ -182,6 +182,7 @@ nsLookAndFeel::NativeGetColor(ColorID aID, nscolor &aColor) break; case eColorID_menu: + case eColorID__moz_menubar: aColor = QCOLOR_TO_NS_RGB(palette.color(QPalette::Normal, QPalette::Window)); break; diff --git a/widget/windows/nsLookAndFeel.cpp b/widget/windows/nsLookAndFeel.cpp index c1110f62405..879a827baf8 100644 --- a/widget/windows/nsLookAndFeel.cpp +++ b/widget/windows/nsLookAndFeel.cpp @@ -205,6 +205,7 @@ nsLookAndFeel::NativeGetColor(ColorID aID, nscolor &aColor) idx = COLOR_INFOTEXT; break; case eColorID_menu: + case eColorID__moz_menubar: idx = COLOR_MENU; break; case eColorID_menutext: diff --git a/widget/xpwidgets/nsXPLookAndFeel.cpp b/widget/xpwidgets/nsXPLookAndFeel.cpp index ffc7bda01be..100b168d2bd 100644 --- a/widget/xpwidgets/nsXPLookAndFeel.cpp +++ b/widget/xpwidgets/nsXPLookAndFeel.cpp @@ -194,6 +194,7 @@ const char nsXPLookAndFeel::sColorPrefs[][38] = "ui.-moz_buttonhovertext", "ui.-moz_menuhover", "ui.-moz_menuhovertext", + "ui.-moz_menubar", "ui.-moz_menubartext", "ui.-moz_menubarhovertext", "ui.-moz_eventreerow",