Bug 413272 - "HTML SELECT does not show selected item in windows "selected text" style - recent regression" (use new CSS system color for html select options) [p=twanno@lycos.nl (Teune van Steeg) r+sr=roc a=blocking1.9+]

This commit is contained in:
reed@reedloden.com 2008-01-24 01:31:44 -08:00
Родитель 116ab0d95a
Коммит 17ef08e932
11 изменённых файлов: 26 добавлений и 6 удалений

Просмотреть файл

@ -251,8 +251,8 @@ select > option {
}
option:checked {
background-color: -moz-cellhighlight !important;
color: -moz-cellhighlighttext !important;
background-color: -moz-html-cellhighlight !important;
color: -moz-html-cellhighlighttext !important;
}
select:focus > option:checked,

Просмотреть файл

@ -116,6 +116,8 @@ CSS_KEY(-moz-hangul-consonant, _moz_hangul_consonant)
CSS_KEY(-moz-hidden-unscrollable, _moz_hidden_unscrollable)
CSS_KEY(-moz-hangul, _moz_hangul)
CSS_KEY(-moz-hyperlinktext, _moz_hyperlinktext)
CSS_KEY(-moz-html-cellhighlight, _moz_html_cellhighlight)
CSS_KEY(-moz-html-cellhighlighttext, _moz_html_cellhighlighttext)
CSS_KEY(-moz-info, _moz_info)
CSS_KEY(-moz-initial, _moz_initial)
CSS_KEY(-moz-inline-box, _moz_inline_box)

Просмотреть файл

@ -435,6 +435,8 @@ const PRInt32 nsCSSProps::kColorKTable[] = {
eCSSKeyword__moz_dialogtext, nsILookAndFeel::eColor__moz_dialogtext,
eCSSKeyword__moz_dragtargetzone, nsILookAndFeel::eColor__moz_dragtargetzone,
eCSSKeyword__moz_hyperlinktext, NS_COLOR_MOZ_HYPERLINKTEXT,
eCSSKeyword__moz_html_cellhighlight, nsILookAndFeel::eColor__moz_html_cellhighlight,
eCSSKeyword__moz_html_cellhighlighttext, nsILookAndFeel::eColor__moz_html_cellhighlighttext,
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,

Просмотреть файл

@ -44,10 +44,10 @@
struct nsSize;
// {BEC234D0-AAA5-430D-8435-B10100F78003}
// {6672E0EA-C936-11DC-9BB7-0014850B592F}
#define NS_ILOOKANDFEEL_IID \
{ 0xbec234d0, 0xaaa5, 0x430d, \
{ 0x84, 0x35, 0xb1, 0x01, 0x00, 0xf7, 0x80, 0x03} }
{ 0x6672e0ea, 0xc936, 0x11dc, \
{ 0x9b, 0xb7, 0x00, 0x14, 0x85, 0x0b, 0x59, 0x2f} }
class nsILookAndFeel: public nsISupports {
@ -129,6 +129,8 @@ public:
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_html_cellhighlight, //used to html select cell text background, selected but not focus
eColor__moz_html_cellhighlighttext, //used to html select 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

Просмотреть файл

@ -180,6 +180,7 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor)
aColor = NS_RGB(0x77, 0x77, 0x77);
break;
case eColor_highlight:
case eColor__moz_html_cellhighlight:
case eColor__moz_menuhover:
{
// B_MENU_SELECTION_BACKGROUND_COLOR is used for text selection
@ -189,6 +190,7 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor)
}
break;
case eColor_highlighttext:
case eColor__moz_html_cellhighlighttext:
case eColor__moz_menuhovertext:
{
color = ui_color(B_MENU_SELECTED_ITEM_TEXT_COLOR);

Просмотреть файл

@ -274,6 +274,7 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor)
break;
case eColor__moz_dialogtext:
case eColor__moz_cellhighlighttext:
case eColor__moz_html_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.
@ -335,6 +336,7 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor)
res = GetMacBrushColor(kThemeBrushAlternatePrimaryHighlightColor, aColor, fallbackColor);
break;
case eColor__moz_cellhighlight:
case eColor__moz_html_cellhighlighttext:
case eColor__moz_mac_secondaryhighlight:
// For inactive list selection
res = GetMacBrushColor(kThemeBrushSecondaryHighlightColor, aColor, NS_RGB(0x00,0x00,0x00));

Просмотреть файл

@ -289,9 +289,11 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor& aColor)
aColor = GDK_COLOR_TO_NS_RGB(mStyle->fg[GTK_STATE_PRELIGHT]);
break;
case eColor__moz_cellhighlight:
case eColor__moz_html_cellhighlight:
aColor = GDK_COLOR_TO_NS_RGB(mStyle->base[GTK_STATE_ACTIVE]);
break;
case eColor__moz_cellhighlighttext:
case eColor__moz_html_cellhighlighttext:
aColor = GDK_COLOR_TO_NS_RGB(mStyle->text[GTK_STATE_ACTIVE]);
break;
case eColor__moz_menuhover:

Просмотреть файл

@ -149,9 +149,11 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor)
idx = SYSCLR_MENUDISABLEDTEXT;
break;
case eColor_highlight:
case eColor__moz_html_cellhighlight:
idx = SYSCLR_HILITEBACKGROUND;
break;
case eColor_highlighttext:
case eColor__moz_html_cellhighlighttext:
idx = SYSCLR_HILITEFOREGROUND;
break;
case eColor_inactiveborder:

Просмотреть файл

@ -140,10 +140,12 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor)
aColor = PH_TO_NS_RGB(Pg_DGREY);
break;
case eColor_highlight:
case eColor__moz_html_cellhighlight:
case eColor__moz_menuhover:
aColor = PH_TO_NS_RGB(0x9ba9c9); // bill blue
break;
case eColor_highlighttext:
case eColor__moz_html_cellhighlighttext:
case eColor__moz_menuhovertext:
aColor = PH_TO_NS_RGB(Pg_BLACK);
break;

Просмотреть файл

@ -232,6 +232,7 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor)
idx = COLOR_GRAYTEXT;
break;
case eColor_highlight:
case eColor__moz_html_cellhighlight:
case eColor__moz_menuhover:
idx = COLOR_HIGHLIGHT;
break;
@ -275,6 +276,7 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor)
}
#endif
case eColor_highlighttext:
case eColor__moz_html_cellhighlighttext:
idx = COLOR_HIGHLIGHTTEXT;
break;
case eColor_inactiveborder:

Просмотреть файл

@ -148,7 +148,7 @@ nsLookAndFeelFloatPref nsXPLookAndFeel::sFloatPrefs[] =
// This array MUST be kept in the same order as the color list in nsILookAndFeel.h.
/* XXX If you add any strings longer than
* "ui.-moz-mac-accentlightesthighlight"
* "ui.IMESelectedConvertedTextBackground"
* to the following array then you MUST update the
* sizes of the sColorPrefs array in nsXPLookAndFeel.h
*/
@ -214,6 +214,8 @@ const char nsXPLookAndFeel::sColorPrefs[][38] =
"ui.-moz-dialog",
"ui.-moz-dialogtext",
"ui.-moz-dragtargetzone",
"ui.-moz-html-cellhighlight",
"ui.-moz-html-cellhighlighttext",
"ui.-moz-mac-focusring",
"ui.-moz-mac-menuselect",
"ui.-moz-mac-menushadow",