diff --git a/content/shared/public/nsCSSKeywordList.h b/content/shared/public/nsCSSKeywordList.h index dd2d6a03a320..25b6e0a9c843 100644 --- a/content/shared/public/nsCSSKeywordList.h +++ b/content/shared/public/nsCSSKeywordList.h @@ -78,7 +78,11 @@ CSS_KEY(-moz-box, _moz_box) CSS_KEY(-moz-bulletinboard, _moz_bulletinboard) CSS_KEY(-moz-button, _moz_button) CSS_KEY(-moz-buttondefault, _moz_buttondefault) +CSS_KEY(-moz-buttonhoverface, _moz_buttonhoverface) +CSS_KEY(-moz-buttonhovertext, _moz_buttonhovertext) CSS_KEY(-moz-cell, _moz_cell) +CSS_KEY(-moz-cellhighlight, _moz_cellhighlight) +CSS_KEY(-moz-cellhighlighttext, _moz_cellhighlighttext) CSS_KEY(-moz-center, _moz_center) CSS_KEY(-moz-cjk-earthly-branch, _moz_cjk_earthly_branch) CSS_KEY(-moz-cjk-heavenly-stem, _moz_cjk_heavenly_stem) @@ -105,7 +109,6 @@ CSS_KEY(-moz-grid-group, _moz_grid_group) CSS_KEY(-moz-grid-line, _moz_grid_line) CSS_KEY(-moz-grid, _moz_grid) CSS_KEY(-moz-groupbox, _moz_groupbox) -CSS_KEY(-moz-gtk2-hovertext, _moz_gtk2_hovertext) CSS_KEY(-moz-gujarati, _moz_gujarati) CSS_KEY(-moz-gurmukhi, _moz_gurmukhi) CSS_KEY(-moz-hangul-consonant, _moz_hangul_consonant) @@ -138,6 +141,8 @@ CSS_KEY(-moz-mac-menushadow, _moz_mac_menushadow) CSS_KEY(-moz-mac-menutextselect, _moz_mac_menutextselect) CSS_KEY(-moz-malayalam, _moz_malayalam) CSS_KEY(-moz-marker, _moz_marker) // Disabled because not supported correctly. +CSS_KEY(-moz-menuhover, _moz_menuhover) +CSS_KEY(-moz-menuhovertext, _moz_menuhovertext) CSS_KEY(-moz-myanmar, _moz_myanmar) CSS_KEY(-moz-oriya, _moz_oriya) CSS_KEY(-moz-page-break, _moz_page_break) diff --git a/content/shared/src/nsCSSProps.cpp b/content/shared/src/nsCSSProps.cpp index 8a3d93ab2b0a..f4dd82b16985 100644 --- a/content/shared/src/nsCSSProps.cpp +++ b/content/shared/src/nsCSSProps.cpp @@ -403,13 +403,16 @@ const PRInt32 nsCSSProps::kColorKTable[] = { eCSSKeyword_windowtext, nsILookAndFeel::eColor_windowtext, eCSSKeyword__moz_activehyperlinktext, NS_COLOR_MOZ_ACTIVEHYPERLINKTEXT, eCSSKeyword__moz_buttondefault, nsILookAndFeel::eColor__moz_buttondefault, + eCSSKeyword__moz_buttonhoverface, nsILookAndFeel::eColor__moz_buttonhoverface, + eCSSKeyword__moz_buttonhovertext, nsILookAndFeel::eColor__moz_buttonhovertext, + eCSSKeyword__moz_cellhighlight, nsILookAndFeel::eColor__moz_cellhighlight, + eCSSKeyword__moz_cellhighlighttext, nsILookAndFeel::eColor__moz_cellhighlighttext, eCSSKeyword__moz_field, nsILookAndFeel::eColor__moz_field, eCSSKeyword__moz_fieldtext, nsILookAndFeel::eColor__moz_fieldtext, eCSSKeyword__moz_dialog, nsILookAndFeel::eColor__moz_dialog, eCSSKeyword__moz_dialogtext, nsILookAndFeel::eColor__moz_dialogtext, eCSSKeyword__moz_dragtargetzone, nsILookAndFeel::eColor__moz_dragtargetzone, eCSSKeyword__moz_hyperlinktext, NS_COLOR_MOZ_HYPERLINKTEXT, - eCSSKeyword__moz_gtk2_hovertext, nsILookAndFeel::eColor__moz_gtk2_hovertext, eCSSKeyword__moz_mac_focusring, nsILookAndFeel::eColor__moz_mac_focusring, eCSSKeyword__moz_mac_menuselect, nsILookAndFeel::eColor__moz_mac_menuselect, eCSSKeyword__moz_mac_menushadow, nsILookAndFeel::eColor__moz_mac_menushadow, @@ -421,6 +424,8 @@ const PRInt32 nsCSSProps::kColorKTable[] = { eCSSKeyword__moz_mac_accentregularshadow, nsILookAndFeel::eColor__moz_mac_accentregularshadow, eCSSKeyword__moz_mac_accentdarkshadow, nsILookAndFeel::eColor__moz_mac_accentdarkshadow, eCSSKeyword__moz_mac_accentdarkestshadow, nsILookAndFeel::eColor__moz_mac_accentdarkestshadow, + eCSSKeyword__moz_menuhover, nsILookAndFeel::eColor__moz_menuhover, + eCSSKeyword__moz_menuhovertext, nsILookAndFeel::eColor__moz_menuhovertext, eCSSKeyword__moz_visitedhyperlinktext, NS_COLOR_MOZ_VISITEDHYPERLINKTEXT, eCSSKeyword_UNKNOWN,-1 }; diff --git a/layout/style/nsCSSKeywordList.h b/layout/style/nsCSSKeywordList.h index dd2d6a03a320..25b6e0a9c843 100644 --- a/layout/style/nsCSSKeywordList.h +++ b/layout/style/nsCSSKeywordList.h @@ -78,7 +78,11 @@ CSS_KEY(-moz-box, _moz_box) CSS_KEY(-moz-bulletinboard, _moz_bulletinboard) CSS_KEY(-moz-button, _moz_button) CSS_KEY(-moz-buttondefault, _moz_buttondefault) +CSS_KEY(-moz-buttonhoverface, _moz_buttonhoverface) +CSS_KEY(-moz-buttonhovertext, _moz_buttonhovertext) CSS_KEY(-moz-cell, _moz_cell) +CSS_KEY(-moz-cellhighlight, _moz_cellhighlight) +CSS_KEY(-moz-cellhighlighttext, _moz_cellhighlighttext) CSS_KEY(-moz-center, _moz_center) CSS_KEY(-moz-cjk-earthly-branch, _moz_cjk_earthly_branch) CSS_KEY(-moz-cjk-heavenly-stem, _moz_cjk_heavenly_stem) @@ -105,7 +109,6 @@ CSS_KEY(-moz-grid-group, _moz_grid_group) CSS_KEY(-moz-grid-line, _moz_grid_line) CSS_KEY(-moz-grid, _moz_grid) CSS_KEY(-moz-groupbox, _moz_groupbox) -CSS_KEY(-moz-gtk2-hovertext, _moz_gtk2_hovertext) CSS_KEY(-moz-gujarati, _moz_gujarati) CSS_KEY(-moz-gurmukhi, _moz_gurmukhi) CSS_KEY(-moz-hangul-consonant, _moz_hangul_consonant) @@ -138,6 +141,8 @@ CSS_KEY(-moz-mac-menushadow, _moz_mac_menushadow) CSS_KEY(-moz-mac-menutextselect, _moz_mac_menutextselect) CSS_KEY(-moz-malayalam, _moz_malayalam) CSS_KEY(-moz-marker, _moz_marker) // Disabled because not supported correctly. +CSS_KEY(-moz-menuhover, _moz_menuhover) +CSS_KEY(-moz-menuhovertext, _moz_menuhovertext) CSS_KEY(-moz-myanmar, _moz_myanmar) CSS_KEY(-moz-oriya, _moz_oriya) CSS_KEY(-moz-page-break, _moz_page_break) diff --git a/layout/style/nsCSSProps.cpp b/layout/style/nsCSSProps.cpp index 8a3d93ab2b0a..f4dd82b16985 100644 --- a/layout/style/nsCSSProps.cpp +++ b/layout/style/nsCSSProps.cpp @@ -403,13 +403,16 @@ const PRInt32 nsCSSProps::kColorKTable[] = { eCSSKeyword_windowtext, nsILookAndFeel::eColor_windowtext, eCSSKeyword__moz_activehyperlinktext, NS_COLOR_MOZ_ACTIVEHYPERLINKTEXT, eCSSKeyword__moz_buttondefault, nsILookAndFeel::eColor__moz_buttondefault, + eCSSKeyword__moz_buttonhoverface, nsILookAndFeel::eColor__moz_buttonhoverface, + eCSSKeyword__moz_buttonhovertext, nsILookAndFeel::eColor__moz_buttonhovertext, + eCSSKeyword__moz_cellhighlight, nsILookAndFeel::eColor__moz_cellhighlight, + eCSSKeyword__moz_cellhighlighttext, nsILookAndFeel::eColor__moz_cellhighlighttext, eCSSKeyword__moz_field, nsILookAndFeel::eColor__moz_field, eCSSKeyword__moz_fieldtext, nsILookAndFeel::eColor__moz_fieldtext, eCSSKeyword__moz_dialog, nsILookAndFeel::eColor__moz_dialog, eCSSKeyword__moz_dialogtext, nsILookAndFeel::eColor__moz_dialogtext, eCSSKeyword__moz_dragtargetzone, nsILookAndFeel::eColor__moz_dragtargetzone, eCSSKeyword__moz_hyperlinktext, NS_COLOR_MOZ_HYPERLINKTEXT, - eCSSKeyword__moz_gtk2_hovertext, nsILookAndFeel::eColor__moz_gtk2_hovertext, eCSSKeyword__moz_mac_focusring, nsILookAndFeel::eColor__moz_mac_focusring, eCSSKeyword__moz_mac_menuselect, nsILookAndFeel::eColor__moz_mac_menuselect, eCSSKeyword__moz_mac_menushadow, nsILookAndFeel::eColor__moz_mac_menushadow, @@ -421,6 +424,8 @@ const PRInt32 nsCSSProps::kColorKTable[] = { eCSSKeyword__moz_mac_accentregularshadow, nsILookAndFeel::eColor__moz_mac_accentregularshadow, eCSSKeyword__moz_mac_accentdarkshadow, nsILookAndFeel::eColor__moz_mac_accentdarkshadow, eCSSKeyword__moz_mac_accentdarkestshadow, nsILookAndFeel::eColor__moz_mac_accentdarkestshadow, + eCSSKeyword__moz_menuhover, nsILookAndFeel::eColor__moz_menuhover, + eCSSKeyword__moz_menuhovertext, nsILookAndFeel::eColor__moz_menuhovertext, eCSSKeyword__moz_visitedhyperlinktext, NS_COLOR_MOZ_VISITEDHYPERLINKTEXT, eCSSKeyword_UNKNOWN,-1 }; diff --git a/themes/classic/global/unix/button.css b/themes/classic/global/unix/button.css index 251c733e6cfd..bfc007a6dab7 100644 --- a/themes/classic/global/unix/button.css +++ b/themes/classic/global/unix/button.css @@ -85,13 +85,12 @@ button[default="true"] { -moz-border-left-colors: ThreeDDarkShadow ThreeDHighlight ThreeDLightShadow; } -#ifdef MOZ_WIDGET_GTK2 /* .......... hover state .......... */ button:hover { - color: -moz-gtk2-hovertext; + color: -moz-buttonhovertext; + background-color: -moz-buttonhoverface; } -#endif /* .......... active/open/checked state .......... */ @@ -102,9 +101,7 @@ button[checked="true"] { -moz-border-right-colors: ThreeDDarkShadow ThreeDShadow transparent; -moz-border-bottom-colors: ThreeDDarkShadow ThreeDShadow transparent; -moz-border-left-colors: ThreeDDarkShadow ThreeDShadow transparent; -#ifdef MOZ_WIDGET_GTK2 color: ButtonText; -#endif } button:hover:active > .button-box, diff --git a/themes/classic/global/unix/checkbox.css b/themes/classic/global/unix/checkbox.css index 15f1947d6f1f..67ad418500df 100644 --- a/themes/classic/global/unix/checkbox.css +++ b/themes/classic/global/unix/checkbox.css @@ -113,7 +113,7 @@ checkbox[disabled="true"] { #ifdef MOZ_WIDGET_GTK2 checkbox:hover { - color: -moz-gtk2-hovertext; + color: -moz-buttonhovertext; } #endif diff --git a/themes/classic/global/unix/radio.css b/themes/classic/global/unix/radio.css index 5fb082187c60..0be9c6aa8d78 100644 --- a/themes/classic/global/unix/radio.css +++ b/themes/classic/global/unix/radio.css @@ -127,7 +127,7 @@ radio[disabled="true"] { #ifdef MOZ_WIDGET_GTK2 radio:hover { - color: -moz-gtk2-hovertext; + color: -moz-buttonhovertext; } #endif diff --git a/themes/classic/global/unix/toolbarbutton.css b/themes/classic/global/unix/toolbarbutton.css index 7dd4280195e7..cf974f480f00 100644 --- a/themes/classic/global/unix/toolbarbutton.css +++ b/themes/classic/global/unix/toolbarbutton.css @@ -75,9 +75,8 @@ toolbarbutton[buttonover="true"] { -moz-border-right-colors: ThreeDDarkShadow ThreeDShadow; -moz-border-bottom-colors: ThreeDDarkShadow ThreeDShadow; -moz-border-left-colors: ThreeDDarkShadow ThreeDHighlight; -#ifdef MOZ_WIDGET_GTK2 - color: -moz-gtk2-hovertext; -#endif + color: -moz-buttonhovertext; + background-color: -moz-buttonhoverface; } toolbarbutton:hover:active, @@ -87,9 +86,7 @@ toolbarbutton[open="true"] { -moz-border-bottom-colors: ThreeDDarkShadow ThreeDHighlight; -moz-border-left-colors: ThreeDDarkShadow ThreeDShadow; padding: 3px 1px 1px 3px; -#ifdef MOZ_WIDGET_GTK2 color: ButtonText; -#endif } toolbarbutton[disabled="true"], diff --git a/themes/classic/global/win/listbox.css b/themes/classic/global/win/listbox.css index 420f18314d22..df54ad441c0c 100644 --- a/themes/classic/global/win/listbox.css +++ b/themes/classic/global/win/listbox.css @@ -72,8 +72,8 @@ listbox:focus > listitem[current="true"][selected="true"] { } listitem[selected="true"] { - background-color: -moz-Dialog; - color: -moz-DialogText; + background-color: -moz-cellhighlight; + color: -moz-cellhighlighttext; } listbox:focus > listitem[selected="true"] { @@ -169,4 +169,4 @@ listheader[sortable="true"]:hover:active { .listcell-check[disabled="true"][checked="true"] { background-image: url("chrome://global/skin/checkbox/cbox-check-dis.gif"); -} \ No newline at end of file +} diff --git a/themes/classic/global/win/menu.css b/themes/classic/global/win/menu.css index 678e5df8fcea..c77f7c75021d 100644 --- a/themes/classic/global/win/menu.css +++ b/themes/classic/global/win/menu.css @@ -63,7 +63,8 @@ menuitem[default="true"] { #ifdef MOZ_WIDGET_GTK2 menu[_moz-menuactive="true"], menuitem[_moz-menuactive="true"] { - color: -moz-gtk2-hovertext; + color: -moz-menuhovertext; + background-color: -moz-menuhover; } menubar > menu[_moz-menuactive="true"] { @@ -71,7 +72,8 @@ menubar > menu[_moz-menuactive="true"] { } menubar > menu[open] { - color: -moz-gtk2-hovertext; + color: -moz-menuhovertext; + background-color: -moz-menuhover; } #endif diff --git a/themes/classic/global/win/tree.css b/themes/classic/global/win/tree.css index 5f021ff7da1f..6bddf44ad5c9 100644 --- a/themes/classic/global/win/tree.css +++ b/themes/classic/global/win/tree.css @@ -77,7 +77,7 @@ treechildren::-moz-tree-row { } treechildren::-moz-tree-row(selected) { - background-color: -moz-Dialog; + background-color: -moz-cellhighlight; } treechildren::-moz-tree-row(selected, focus) { @@ -109,7 +109,7 @@ treechildren::-moz-tree-cell-text { } treechildren::-moz-tree-cell-text(selected) { - color: -moz-DialogText; + color: -moz-cellhighlighttext; } tree[selstyle="primary"] > treechildren::-moz-tree-cell-text(primary) { @@ -118,8 +118,8 @@ tree[selstyle="primary"] > treechildren::-moz-tree-cell-text(primary) { } tree[selstyle="primary"] > treechildren::-moz-tree-cell-text(primary, selected) { - background-color: -moz-Dialog; - color: -moz-DialogText; + background-color: -moz-cellhighlight; + color: -moz-cellhighlighttext; } treechildren::-moz-tree-cell-text(selected, focus) { @@ -335,11 +335,11 @@ treechildren[alternatingbackground="true"]::-moz-tree-row(odd) { } treechildren[alternatingbackground="true"]::-moz-tree-row(odd, selected) { - background-color: -moz-Dialog; + background-color: -moz-cellhighlight; } treechildren[alternatingbackground="true"]::-moz-tree-cell-text(odd, selected) { - color: -moz-DialogText; + color: -moz-cellhighlighttext; } treechildren[alternatingbackground="true"]::-moz-tree-row(odd, selected, focus) { diff --git a/themes/classic/jar.mn b/themes/classic/jar.mn index 8657f81ca551..117705c09faf 100644 --- a/themes/classic/jar.mn +++ b/themes/classic/jar.mn @@ -229,8 +229,8 @@ classic.jar: skin/classic/global/autocomplete.css (global/unix/autocomplete.css) * skin/classic/global/checkbox.css (global/unix/checkbox.css) * skin/classic/global/radio.css (global/unix/radio.css) -* skin/classic/global/button.css (global/unix/button.css) -* skin/classic/global/toolbarbutton.css (global/unix/toolbarbutton.css) + skin/classic/global/button.css (global/unix/button.css) + skin/classic/global/toolbarbutton.css (global/unix/toolbarbutton.css) skin/classic/global/global.css (global/unix/global.css) #else skin/classic/global/autocomplete.css (global/win/autocomplete.css) diff --git a/toolkit/themes/gnomestripe/global/button.css b/toolkit/themes/gnomestripe/global/button.css index ec0208de51c6..7935fabd64dd 100644 --- a/toolkit/themes/gnomestripe/global/button.css +++ b/toolkit/themes/gnomestripe/global/button.css @@ -78,7 +78,8 @@ button[default="true"] { /* .......... hover state .......... */ button:hover { - color: -moz-gtk2-hovertext; + color: -moz-buttonhovertext; + background-color: -moz-buttonhoverface; } /* .......... active/open/checked state .......... */ diff --git a/toolkit/themes/gnomestripe/global/checkbox.css b/toolkit/themes/gnomestripe/global/checkbox.css index 1694f9e39a8f..f5431ccc83a5 100644 --- a/toolkit/themes/gnomestripe/global/checkbox.css +++ b/toolkit/themes/gnomestripe/global/checkbox.css @@ -98,9 +98,8 @@ checkbox[disabled="true"] { } checkbox:hover { - color: -moz-gtk2-hovertext; + color: -moz-buttonhovertext; } - checkbox:hover:active > .checkbox-spacer-box > .checkbox-check { background-color: -moz-Dialog; } diff --git a/toolkit/themes/gnomestripe/global/menu.css b/toolkit/themes/gnomestripe/global/menu.css index 267efd00363c..d5b23c14061d 100644 --- a/toolkit/themes/gnomestripe/global/menu.css +++ b/toolkit/themes/gnomestripe/global/menu.css @@ -46,7 +46,8 @@ menuitem[default="true"] { menu[_moz-menuactive="true"], menuitem[_moz-menuactive="true"] { - color: HighlightText; + color: -moz-menuhovertext; + background-color: -moz-menuhover; } menu[disabled="true"], @@ -63,7 +64,8 @@ menubar > menu[_moz-menuactive="true"] { } menubar > menu[open] { - color: HighlightText; + color: -moz-menuhovertext; + background-color: -moz-menuhover; } /* ::::: menu/menuitems in menulist popups ::::: */ diff --git a/toolkit/themes/gnomestripe/global/radio.css b/toolkit/themes/gnomestripe/global/radio.css index c55bbea59f29..f17f870a2ea5 100644 --- a/toolkit/themes/gnomestripe/global/radio.css +++ b/toolkit/themes/gnomestripe/global/radio.css @@ -112,7 +112,7 @@ radio[disabled="true"] { } radio:hover { - color: -moz-gtk2-hovertext; + color: -moz-buttonhovertext; } radio:hover:active > .radio-spacer-box > .radio-check-box1 { diff --git a/toolkit/themes/gnomestripe/global/toolbarbutton.css b/toolkit/themes/gnomestripe/global/toolbarbutton.css index 5ce799fe9a00..58b347df5d30 100644 --- a/toolkit/themes/gnomestripe/global/toolbarbutton.css +++ b/toolkit/themes/gnomestripe/global/toolbarbutton.css @@ -52,7 +52,8 @@ toolbarbutton { toolbarbutton:hover, toolbarbutton[buttonover="true"] { border-color: ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight; - color: -moz-gtk2-hovertext; + color: -moz-buttonhovertext; + background-color: -moz-buttonhoverface; } toolbarbutton:hover:active, diff --git a/toolkit/themes/winstripe/global/listbox.css b/toolkit/themes/winstripe/global/listbox.css index ea2715a47413..330f3652727c 100644 --- a/toolkit/themes/winstripe/global/listbox.css +++ b/toolkit/themes/winstripe/global/listbox.css @@ -52,8 +52,8 @@ listbox:focus > listitem[selected="true"][current="true"] { } listitem[selected="true"] { - background-color: -moz-Dialog; - color: -moz-DialogText; + background-color: -moz-cellhighlight; + color: -moz-cellhighlighttext; } listbox:focus > listitem[selected="true"] { @@ -149,4 +149,4 @@ listheader[sortable="true"]:hover:active { .listcell-check[disabled="true"][checked="true"] { background-image: url("chrome://global/skin/checkbox/cbox-check-dis.gif"); -} \ No newline at end of file +} diff --git a/toolkit/themes/winstripe/global/tree.css b/toolkit/themes/winstripe/global/tree.css index 5574919a4838..13ea3e4e4d51 100644 --- a/toolkit/themes/winstripe/global/tree.css +++ b/toolkit/themes/winstripe/global/tree.css @@ -50,7 +50,7 @@ treechildren::-moz-tree-row { } treechildren::-moz-tree-row(selected) { - background-color: -moz-Dialog; + background-color: -moz-cellhighlight; } treechildren::-moz-tree-row(selected, focus) { @@ -72,7 +72,7 @@ treechildren::-moz-tree-cell-text { } treechildren::-moz-tree-cell-text(selected) { - color: -moz-DialogText; + color: -moz-cellhighlighttext; } treechildren::-moz-tree-cell-text(selected, focus) { diff --git a/widget/public/nsILookAndFeel.h b/widget/public/nsILookAndFeel.h index 0737febdd7b3..ca7eb13f4308 100644 --- a/widget/public/nsILookAndFeel.h +++ b/widget/public/nsILookAndFeel.h @@ -113,15 +113,19 @@ public: eColor__moz_dialogtext, eColor__moz_dragtargetzone, //used to highlight valid regions to drop something onto + eColor__moz_cellhighlight, //used to cell text background, selected but not focus + eColor__moz_cellhighlighttext, //used to cell text, selected but not focus + eColor__moz_buttonhoverface, //used to button text background, when mouse is over + eColor__moz_buttonhovertext, //used to button text, when mouse is over + eColor__moz_menuhover, //used to menu item background, when mouse is over + eColor__moz_menuhovertext, //used to menu item text, when mouse is over + //colours needed by Mac Classic skin eColor__moz_mac_focusring, //ring around text fields and lists eColor__moz_mac_menuselect, //colour used when mouse is over a menu item eColor__moz_mac_menushadow, //colour used to do shadows on menu items eColor__moz_mac_menutextselect, //colour used to display text while mouse is over a menu item - //colour needed by GTK2 Classic skin - eColor__moz_gtk2_hovertext, - //all of the accent colours eColor__moz_mac_accentlightesthighlight, eColor__moz_mac_accentregularhighlight, diff --git a/widget/src/beos/nsLookAndFeel.cpp b/widget/src/beos/nsLookAndFeel.cpp index daa8526848c2..4e2b45943133 100644 --- a/widget/src/beos/nsLookAndFeel.cpp +++ b/widget/src/beos/nsLookAndFeel.cpp @@ -138,6 +138,7 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor) } break; case eColor_buttonface: + case eColor__moz_buttonhoverface: aColor = NS_RGB(0xdd, 0xdd, 0xdd); break; //should be lighter of 2 possible highlight colours available @@ -149,6 +150,7 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor) aColor = NS_RGB(0x77, 0x77, 0x77); break; case eColor_buttontext: + case eColor__moz_buttonhovertext: aColor = NS_RGB(0x00, 0x00, 0x00); break; case eColor_captiontext: @@ -158,6 +160,7 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor) aColor = NS_RGB(0x77, 0x77, 0x77); break; case eColor_highlight: + case eColor__moz_menuhover: { // B_MENU_SELECTION_BACKGROUND_COLOR is used for text selection // this blue colors seems more suitable @@ -166,6 +169,7 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor) } break; case eColor_highlighttext: + case eColor__moz_menuhovertext: { color = ui_color(B_MENU_SELECTED_ITEM_TEXT_COLOR); aColor = NS_RGB(color.red, color.green, color.blue); @@ -235,10 +239,12 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor) aColor = NS_RGB(0x00, 0x00, 0x00); break; case eColor__moz_dialog: + case eColor__moz_cellhighlight: //all bars including MenuBar aColor = NS_RGB(0xdd, 0xdd, 0xdd); break; case eColor__moz_dialogtext: + case eColor__moz_cellhighlighttext: aColor = NS_RGB(0x00, 0x00, 0x00); break; case eColor__moz_dragtargetzone: diff --git a/widget/src/gtk/nsLookAndFeel.cpp b/widget/src/gtk/nsLookAndFeel.cpp index 780264a1dce3..c962eff96bdf 100644 --- a/widget/src/gtk/nsLookAndFeel.cpp +++ b/widget/src/gtk/nsLookAndFeel.cpp @@ -145,10 +145,12 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor& aColor) // or maybe mStyle->text? break; case eColor_highlight: + case eColor__moz_menuhover: // background of selected item aColor = GDK_COLOR_TO_NS_RGB(mStyle->bg[GTK_STATE_SELECTED]); break; case eColor_highlighttext: + case eColor__moz_menuhovertext: // text of selected item aColor = GDK_COLOR_TO_NS_RGB(mStyle->fg[GTK_STATE_SELECTED]); break; @@ -187,11 +189,13 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor& aColor) case eColor_threedface: case eColor_buttonface: + case eColor__moz_buttonhoverface: // 3-D face color aColor = sButtonBackground; break; case eColor_buttontext: + case eColor__moz_buttonhovertext: // text on push buttons aColor = sButtonText; break; @@ -239,9 +243,11 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor& aColor) aColor = GDK_COLOR_TO_NS_RGB(mStyle->fg[GTK_STATE_NORMAL]); break; case eColor__moz_dialog: + case eColor__moz_cellhighlight: aColor = GDK_COLOR_TO_NS_RGB(mStyle->bg[GTK_STATE_NORMAL]); break; case eColor__moz_dialogtext: + case eColor__moz_cellhighlighttext: aColor = GDK_COLOR_TO_NS_RGB(mStyle->fg[GTK_STATE_NORMAL]); break; case eColor__moz_dragtargetzone: diff --git a/widget/src/gtk2/nsLookAndFeel.cpp b/widget/src/gtk2/nsLookAndFeel.cpp index 3b4720cda314..51c631e9530a 100644 --- a/widget/src/gtk2/nsLookAndFeel.cpp +++ b/widget/src/gtk2/nsLookAndFeel.cpp @@ -47,6 +47,8 @@ nscolor nsLookAndFeel::sInfoText = 0; nscolor nsLookAndFeel::sInfoBackground = 0; nscolor nsLookAndFeel::sMenuText = 0; +nscolor nsLookAndFeel::sMenuHover = 0; +nscolor nsLookAndFeel::sMenuHoverText = 0; nscolor nsLookAndFeel::sMenuBackground = 0; nscolor nsLookAndFeel::sButtonBackground = 0; nscolor nsLookAndFeel::sButtonText = 0; @@ -150,11 +152,11 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor& aColor) break; case eColor_highlight: // background of selected item - aColor = GDK_COLOR_TO_NS_RGB(mStyle->bg[GTK_STATE_SELECTED]); + aColor = GDK_COLOR_TO_NS_RGB(mStyle->base[GTK_STATE_SELECTED]); break; case eColor_highlighttext: // text of selected item - aColor = GDK_COLOR_TO_NS_RGB(mStyle->fg[GTK_STATE_SELECTED]); + aColor = GDK_COLOR_TO_NS_RGB(mStyle->text[GTK_STATE_SELECTED]); break; case eColor_inactiveborder: // inactive window border @@ -255,9 +257,24 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor& aColor) // default button border color aColor = GDK_COLOR_TO_NS_RGB(mStyle->black); break; - case eColor__moz_gtk2_hovertext: + case eColor__moz_buttonhoverface: + aColor = GDK_COLOR_TO_NS_RGB(mStyle->bg[GTK_STATE_PRELIGHT]); + break; + case eColor__moz_buttonhovertext: aColor = GDK_COLOR_TO_NS_RGB(mStyle->fg[GTK_STATE_PRELIGHT]); break; + case eColor__moz_cellhighlight: + aColor = GDK_COLOR_TO_NS_RGB(mStyle->base[GTK_STATE_ACTIVE]); + break; + case eColor__moz_cellhighlighttext: + aColor = GDK_COLOR_TO_NS_RGB(mStyle->text[GTK_STATE_ACTIVE]); + break; + case eColor__moz_menuhover: + aColor = sMenuHover; + break; + case eColor__moz_menuhovertext: + aColor = sMenuHoverText; + break; default: /* default color is BLACK */ aColor = 0; @@ -485,6 +502,10 @@ nsLookAndFeel::InitColors() style = gtk_widget_get_style(menu); sMenuBackground = GDK_COLOR_TO_NS_RGB(style->bg[GTK_STATE_NORMAL]); + + style = gtk_widget_get_style(menuitem); + sMenuHover = GDK_COLOR_TO_NS_RGB(style->bg[GTK_STATE_PRELIGHT]); + sMenuHoverText = GDK_COLOR_TO_NS_RGB(style->fg[GTK_STATE_PRELIGHT]); gtk_widget_unref(menu); diff --git a/widget/src/gtk2/nsLookAndFeel.h b/widget/src/gtk2/nsLookAndFeel.h index 1d160c70f0e3..65344843a55e 100644 --- a/widget/src/gtk2/nsLookAndFeel.h +++ b/widget/src/gtk2/nsLookAndFeel.h @@ -64,6 +64,8 @@ protected: static nscolor sInfoText; static nscolor sMenuBackground; static nscolor sMenuText; + static nscolor sMenuHover; + static nscolor sMenuHoverText; static nscolor sButtonBackground; static nscolor sButtonText; static nscolor sButtonOuterLightBorder; diff --git a/widget/src/mac/nsLookAndFeel.cpp b/widget/src/mac/nsLookAndFeel.cpp index 6ccf373acbf0..5120fc980cf8 100644 --- a/widget/src/mac/nsLookAndFeel.cpp +++ b/widget/src/mac/nsLookAndFeel.cpp @@ -114,6 +114,7 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor) break; case eColor_highlight: // CSS2 color case eColor_TextSelectBackground: + case eColor__moz_menuhover: // XXX can probably just always use GetMacBrushColor here #ifdef MOZ_WIDGET_COCOA res = GetMacBrushColor(kThemeBrushPrimaryHighlightColor, aColor, NS_RGB(0x00,0x00,0x00)); @@ -132,6 +133,7 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor) break; case eColor_highlighttext: // CSS2 color case eColor_TextSelectForeground: + case eColor__moz_menuhovertext: GetColor(eColor_TextSelectBackground, aColor); if (aColor == 0x000000) aColor = NS_RGB(0xff,0xff,0xff); @@ -152,6 +154,7 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor) // case eColor_buttontext: + case eColor__moz_buttonhovertext: res = GetMacTextColor(kThemeTextColorPushButtonActive, aColor, NS_RGB(0x00,0x00,0x00)); break; case eColor_captiontext: @@ -194,6 +197,7 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor) res = NS_OK; break; case eColor_buttonface: + case eColor__moz_buttonhoverface: res = GetMacBrushColor(kThemeBrushButtonFaceActive, aColor, NS_RGB(0xDD,0xDD,0xDD)); break; case eColor_buttonhighlight: @@ -269,12 +273,14 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor) res = GetMacTextColor(kThemeTextColorDialogActive, aColor, NS_RGB(0x00,0x00,0x00)); break; case eColor__moz_dialog: + case eColor__moz_cellhighlight: // XXX There may be a better color for this, but I'm making it // the same as ThreeDFace since that's what's currently used where // I will use -moz-Dialog: res = GetMacBrushColor(kThemeBrushButtonFaceActive, aColor, NS_RGB(0xDD,0xDD,0xDD)); break; case eColor__moz_dialogtext: + case eColor__moz_cellhighlighttext: // XXX There may be a better color for this, but I'm making it // the same as WindowText since that's what's currently used where // I will use -moz-DialogText. diff --git a/widget/src/os2/nsLookAndFeel.cpp b/widget/src/os2/nsLookAndFeel.cpp index 78a1af1f6dab..e2e40ff3cb7f 100644 --- a/widget/src/os2/nsLookAndFeel.cpp +++ b/widget/src/os2/nsLookAndFeel.cpp @@ -109,6 +109,7 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor) idx = SYSCLR_BACKGROUND; break; case eColor_buttonface: + case eColor__moz_buttonhoverface: idx = SYSCLR_BUTTONMIDDLE; break; case eColor_buttonhighlight: @@ -118,6 +119,7 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor) idx = SYSCLR_BUTTONDARK; break; case eColor_buttontext: + case eColor__moz_buttonhovertext: idx = SYSCLR_MENUTEXT; break; case eColor_captiontext: @@ -127,9 +129,11 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor) idx = SYSCLR_MENUDISABLEDTEXT; break; case eColor_highlight: + case eColor__moz_menuhover: idx = SYSCLR_HILITEBACKGROUND; break; case eColor_highlighttext: + case eColor__moz_menuhovertext: idx = SYSCLR_HILITEFOREGROUND; break; case eColor_inactiveborder: @@ -187,9 +191,11 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor) idx = SYSCLR_WINDOWTEXT; break; case eColor__moz_dialog: + case eColor__moz_cellhighlight: idx = SYSCLR_DIALOGBACKGROUND; break; case eColor__moz_dialogtext: + case eColor__moz_cellhighlighttext: idx = SYSCLR_WINDOWTEXT; break; case eColor__moz_buttondefault: diff --git a/widget/src/photon/nsLookAndFeel.cpp b/widget/src/photon/nsLookAndFeel.cpp index 78739cff4e46..cf14d60cd164 100644 --- a/widget/src/photon/nsLookAndFeel.cpp +++ b/widget/src/photon/nsLookAndFeel.cpp @@ -120,9 +120,11 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor) aColor = PH_TO_NS_RGB(Pg_DGREY); break; case eColor_highlight: + case eColor__moz_menuhover: aColor = PH_TO_NS_RGB(0x9ba9c9); // bill blue break; case eColor_highlighttext: + case eColor__moz_menuhovertext: aColor = PH_TO_NS_RGB(Pg_BLACK); break; case eColor_inactiveborder: @@ -151,6 +153,7 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor) break; case eColor_threedface: case eColor_buttonface: + case eColor__moz_buttonhoverface: aColor = PH_TO_NS_RGB(Pg_LGREY); break; @@ -160,6 +163,7 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor) break; case eColor_buttontext: + case eColor__moz_buttonhovertext: aColor = PH_TO_NS_RGB(Pg_BLACK); break; @@ -200,10 +204,12 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor) break; case eColor__moz_dialog: + case eColor__moz_cellhighlight: aColor = PH_TO_NS_RGB(Pg_LGREY); break; case eColor__moz_dialogtext: + case eColor__moz_cellhighlighttext: aColor = PH_TO_NS_RGB(Pg_BLACK); break; diff --git a/widget/src/windows/nsLookAndFeel.cpp b/widget/src/windows/nsLookAndFeel.cpp index 9193ffd5d862..62c66d8d08bb 100644 --- a/widget/src/windows/nsLookAndFeel.cpp +++ b/widget/src/windows/nsLookAndFeel.cpp @@ -106,6 +106,7 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor) idx = COLOR_BACKGROUND; break; case eColor_buttonface: + case eColor__moz_buttonhoverface: idx = COLOR_BTNFACE; break; case eColor_buttonhighlight: @@ -115,6 +116,7 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor) idx = COLOR_BTNSHADOW; break; case eColor_buttontext: + case eColor__moz_buttonhovertext: idx = COLOR_BTNTEXT; break; case eColor_captiontext: @@ -124,9 +126,11 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor) idx = COLOR_GRAYTEXT; break; case eColor_highlight: + case eColor__moz_menuhover: idx = COLOR_HIGHLIGHT; break; case eColor_highlighttext: + case eColor__moz_menuhovertext: idx = COLOR_HIGHLIGHTTEXT; break; case eColor_inactiveborder: @@ -184,9 +188,11 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor) idx = COLOR_WINDOWTEXT; break; case eColor__moz_dialog: + case eColor__moz_cellhighlight: idx = COLOR_3DFACE; break; case eColor__moz_dialogtext: + case eColor__moz_cellhighlighttext: idx = COLOR_WINDOWTEXT; break; case eColor__moz_dragtargetzone: diff --git a/widget/src/xlib/nsLookAndFeel.cpp b/widget/src/xlib/nsLookAndFeel.cpp index a969f9aed324..72b61f73b226 100644 --- a/widget/src/xlib/nsLookAndFeel.cpp +++ b/widget/src/xlib/nsLookAndFeel.cpp @@ -113,9 +113,11 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor) aColor = NS_RGB(0x80, 0x80, 0x80); break; case eColor_highlight: + case eColor__moz_menuhover: aColor = NS_RGB(0x00, 0x00, 0x9c); break; case eColor_highlighttext: + case eColor__moz_menuhovertext: aColor = NS_RGB(0xff, 0xff, 0xff); break; case eColor_inactiveborder: @@ -146,6 +148,7 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor) case eColor_threedface: // 3-D face color case eColor_buttonface: + case eColor__moz_buttonhoverface: // 3-D face color case eColor_threedlightshadow: // 3-D inner highlight color @@ -160,6 +163,7 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor) break; case eColor_buttontext: + case eColor__moz_buttonhovertext: aColor = NS_RGB(0x00, 0x00, 0x00); break; @@ -191,9 +195,11 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor) aColor = NS_RGB(0x00, 0x00, 0x00); break; case eColor__moz_dialog: + case eColor__moz_cellhighlight: aColor = NS_RGB(0xcc, 0xcc, 0xcc); break; case eColor__moz_dialogtext: + case eColor__moz_cellhighlighttext: aColor = NS_RGB(0x00, 0x00, 0x00); break;