diff --git a/content/html/style/src/nsCSSKeywordList.h b/content/html/style/src/nsCSSKeywordList.h index d6d8e9c8759..20d337cf444 100644 --- a/content/html/style/src/nsCSSKeywordList.h +++ b/content/html/style/src/nsCSSKeywordList.h @@ -57,6 +57,13 @@ CSS_KEY(-moz-mac-focusring, _moz_mac_focusring) CSS_KEY(-moz-mac-menuselect, _moz_mac_menuselect) CSS_KEY(-moz-mac-menushadow, _moz_mac_menushadow) CSS_KEY(-moz-mac-menutextselect, _moz_mac_menutextselect) +CSS_KEY(-moz-mac-accentlightesthighlight, _moz_mac_accentlightesthighlight) +CSS_KEY(-moz-mac-accentregularhighlight, _moz_mac_accentregularhighlight) +CSS_KEY(-moz-mac-accentface, _moz_mac_accentface) +CSS_KEY(-moz-mac-accentlightshadow, _moz_mac_accentlightshadow) +CSS_KEY(-moz-mac-accentregularshadow, _moz_mac_accentregularshadow) +CSS_KEY(-moz-mac-accentdarkshadow, _moz_mac_accentdarkshadow) +CSS_KEY(-moz-mac-accentdarkestshadow, _moz_mac_accentdarkestshadow) CSS_KEY(-moz-right, _moz_right) CSS_KEY(-moz-pre-wrap, _moz_pre_wrap) CSS_KEY(-moz-scrollbars-none, _moz_scrollbars_none) diff --git a/content/shared/public/nsCSSKeywordList.h b/content/shared/public/nsCSSKeywordList.h index d6d8e9c8759..20d337cf444 100644 --- a/content/shared/public/nsCSSKeywordList.h +++ b/content/shared/public/nsCSSKeywordList.h @@ -57,6 +57,13 @@ CSS_KEY(-moz-mac-focusring, _moz_mac_focusring) CSS_KEY(-moz-mac-menuselect, _moz_mac_menuselect) CSS_KEY(-moz-mac-menushadow, _moz_mac_menushadow) CSS_KEY(-moz-mac-menutextselect, _moz_mac_menutextselect) +CSS_KEY(-moz-mac-accentlightesthighlight, _moz_mac_accentlightesthighlight) +CSS_KEY(-moz-mac-accentregularhighlight, _moz_mac_accentregularhighlight) +CSS_KEY(-moz-mac-accentface, _moz_mac_accentface) +CSS_KEY(-moz-mac-accentlightshadow, _moz_mac_accentlightshadow) +CSS_KEY(-moz-mac-accentregularshadow, _moz_mac_accentregularshadow) +CSS_KEY(-moz-mac-accentdarkshadow, _moz_mac_accentdarkshadow) +CSS_KEY(-moz-mac-accentdarkestshadow, _moz_mac_accentdarkestshadow) CSS_KEY(-moz-right, _moz_right) CSS_KEY(-moz-pre-wrap, _moz_pre_wrap) CSS_KEY(-moz-scrollbars-none, _moz_scrollbars_none) diff --git a/content/shared/src/nsCSSProps.cpp b/content/shared/src/nsCSSProps.cpp index fe798cdd587..18420e33cc0 100644 --- a/content/shared/src/nsCSSProps.cpp +++ b/content/shared/src/nsCSSProps.cpp @@ -232,6 +232,13 @@ const PRInt32 nsCSSProps::kColorKTable[] = { eCSSKeyword__moz_mac_menuselect, nsILookAndFeel::eColor__moz_mac_menuselect, eCSSKeyword__moz_mac_menushadow, nsILookAndFeel::eColor__moz_mac_menushadow, eCSSKeyword__moz_mac_menutextselect, nsILookAndFeel::eColor__moz_mac_menutextselect, + eCSSKeyword__moz_mac_accentlightesthighlight, nsILookAndFeel::eColor__moz_mac_accentlightesthighlight, + eCSSKeyword__moz_mac_accentregularhighlight, nsILookAndFeel::eColor__moz_mac_accentregularhighlight, + eCSSKeyword__moz_mac_accentface, nsILookAndFeel::eColor__moz_mac_accentface, + eCSSKeyword__moz_mac_accentlightshadow, nsILookAndFeel::eColor__moz_mac_accentlightshadow, + 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, -1,-1 }; diff --git a/layout/html/style/src/nsCSSKeywordList.h b/layout/html/style/src/nsCSSKeywordList.h index d6d8e9c8759..20d337cf444 100644 --- a/layout/html/style/src/nsCSSKeywordList.h +++ b/layout/html/style/src/nsCSSKeywordList.h @@ -57,6 +57,13 @@ CSS_KEY(-moz-mac-focusring, _moz_mac_focusring) CSS_KEY(-moz-mac-menuselect, _moz_mac_menuselect) CSS_KEY(-moz-mac-menushadow, _moz_mac_menushadow) CSS_KEY(-moz-mac-menutextselect, _moz_mac_menutextselect) +CSS_KEY(-moz-mac-accentlightesthighlight, _moz_mac_accentlightesthighlight) +CSS_KEY(-moz-mac-accentregularhighlight, _moz_mac_accentregularhighlight) +CSS_KEY(-moz-mac-accentface, _moz_mac_accentface) +CSS_KEY(-moz-mac-accentlightshadow, _moz_mac_accentlightshadow) +CSS_KEY(-moz-mac-accentregularshadow, _moz_mac_accentregularshadow) +CSS_KEY(-moz-mac-accentdarkshadow, _moz_mac_accentdarkshadow) +CSS_KEY(-moz-mac-accentdarkestshadow, _moz_mac_accentdarkestshadow) CSS_KEY(-moz-right, _moz_right) CSS_KEY(-moz-pre-wrap, _moz_pre_wrap) CSS_KEY(-moz-scrollbars-none, _moz_scrollbars_none) diff --git a/layout/html/style/src/nsCSSProps.cpp b/layout/html/style/src/nsCSSProps.cpp index fe798cdd587..18420e33cc0 100644 --- a/layout/html/style/src/nsCSSProps.cpp +++ b/layout/html/style/src/nsCSSProps.cpp @@ -232,6 +232,13 @@ const PRInt32 nsCSSProps::kColorKTable[] = { eCSSKeyword__moz_mac_menuselect, nsILookAndFeel::eColor__moz_mac_menuselect, eCSSKeyword__moz_mac_menushadow, nsILookAndFeel::eColor__moz_mac_menushadow, eCSSKeyword__moz_mac_menutextselect, nsILookAndFeel::eColor__moz_mac_menutextselect, + eCSSKeyword__moz_mac_accentlightesthighlight, nsILookAndFeel::eColor__moz_mac_accentlightesthighlight, + eCSSKeyword__moz_mac_accentregularhighlight, nsILookAndFeel::eColor__moz_mac_accentregularhighlight, + eCSSKeyword__moz_mac_accentface, nsILookAndFeel::eColor__moz_mac_accentface, + eCSSKeyword__moz_mac_accentlightshadow, nsILookAndFeel::eColor__moz_mac_accentlightshadow, + 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, -1,-1 }; diff --git a/layout/style/nsCSSKeywordList.h b/layout/style/nsCSSKeywordList.h index d6d8e9c8759..20d337cf444 100644 --- a/layout/style/nsCSSKeywordList.h +++ b/layout/style/nsCSSKeywordList.h @@ -57,6 +57,13 @@ CSS_KEY(-moz-mac-focusring, _moz_mac_focusring) CSS_KEY(-moz-mac-menuselect, _moz_mac_menuselect) CSS_KEY(-moz-mac-menushadow, _moz_mac_menushadow) CSS_KEY(-moz-mac-menutextselect, _moz_mac_menutextselect) +CSS_KEY(-moz-mac-accentlightesthighlight, _moz_mac_accentlightesthighlight) +CSS_KEY(-moz-mac-accentregularhighlight, _moz_mac_accentregularhighlight) +CSS_KEY(-moz-mac-accentface, _moz_mac_accentface) +CSS_KEY(-moz-mac-accentlightshadow, _moz_mac_accentlightshadow) +CSS_KEY(-moz-mac-accentregularshadow, _moz_mac_accentregularshadow) +CSS_KEY(-moz-mac-accentdarkshadow, _moz_mac_accentdarkshadow) +CSS_KEY(-moz-mac-accentdarkestshadow, _moz_mac_accentdarkestshadow) CSS_KEY(-moz-right, _moz_right) CSS_KEY(-moz-pre-wrap, _moz_pre_wrap) CSS_KEY(-moz-scrollbars-none, _moz_scrollbars_none) diff --git a/layout/style/nsCSSProps.cpp b/layout/style/nsCSSProps.cpp index fe798cdd587..18420e33cc0 100644 --- a/layout/style/nsCSSProps.cpp +++ b/layout/style/nsCSSProps.cpp @@ -232,6 +232,13 @@ const PRInt32 nsCSSProps::kColorKTable[] = { eCSSKeyword__moz_mac_menuselect, nsILookAndFeel::eColor__moz_mac_menuselect, eCSSKeyword__moz_mac_menushadow, nsILookAndFeel::eColor__moz_mac_menushadow, eCSSKeyword__moz_mac_menutextselect, nsILookAndFeel::eColor__moz_mac_menutextselect, + eCSSKeyword__moz_mac_accentlightesthighlight, nsILookAndFeel::eColor__moz_mac_accentlightesthighlight, + eCSSKeyword__moz_mac_accentregularhighlight, nsILookAndFeel::eColor__moz_mac_accentregularhighlight, + eCSSKeyword__moz_mac_accentface, nsILookAndFeel::eColor__moz_mac_accentface, + eCSSKeyword__moz_mac_accentlightshadow, nsILookAndFeel::eColor__moz_mac_accentlightshadow, + 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, -1,-1 }; diff --git a/themes/classic/global/mac/scrollbars.css b/themes/classic/global/mac/scrollbars.css index f06150d1d3d..df5f5726213 100644 --- a/themes/classic/global/mac/scrollbars.css +++ b/themes/classic/global/mac/scrollbars.css @@ -41,28 +41,28 @@ thumb { -moz-binding: url("chrome://global/skin/classicBindings.xml#thumb"); -moz-user-focus: ignore; -moz-user-select: none; - background-color: #9999FF; + background-color: -moz-mac-accentface; border-left: 1px solid #000000; border-right: 1px solid #000000; list-style-image: url("chrome://global/skin/scroll-thumb-horiz.gif"); } .thumb-border { - border-right: 1px solid rgb(40%,40%,80%); /* #6666CC */ - border-bottom: 1px solid rgb(40%,40%,80%); /* #6666CC */ - border-top: 1px solid rgb(80%,80%,100%); /* #CCCCFF */ - border-left: 1px solid rgb(80%,80%,100%); /* #CCCCFF */ + border-right: 1px solid -moz-mac-accentlightshadow; + border-bottom: 1px solid -moz-mac-accentlightshadow; + border-top: 1px solid -moz-mac-accentregularhighlight; + border-left: 1px solid -moz-mac-accentregularhighlight; } thumb:active > .thumb-border { - border-right: 1px solid #333399; - border-bottom: 1px solid #333399; - border-top: 1px solid #9999FF; - border-left: 1px solid #9999FF; + border-right: 1px solid -moz-mac-accentregularshadow; + border-bottom: 1px solid -moz-mac-accentregularshadow; + border-top: 1px solid -moz-mac-accentface; + border-left: 1px solid -moz-mac-accentface; } thumb:active { - background-color: #6666CC; + background-color: -moz-mac-accentlightshadow; list-style-image: url("chrome://global/skin/scroll-thumb-horiz-active.gif"); } @@ -81,7 +81,7 @@ thumb[align="vertical"] { } thumb[align="vertical"]:active { - background-color: #6666CC; + background-color: -moz-mac-accentlightshadow; list-style-image: url("chrome://global/skin/scroll-thumb-vert-active.gif"); } diff --git a/widget/public/nsILookAndFeel.h b/widget/public/nsILookAndFeel.h index 110dcbe3c79..4e2ef840ace 100644 --- a/widget/public/nsILookAndFeel.h +++ b/widget/public/nsILookAndFeel.h @@ -92,8 +92,18 @@ public: 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 + eColor__moz_mac_menutextselect, //colour used to display text while mouse is over a menu item + //all of the accert colours + eColor__moz_mac_accentlightesthighlight, + eColor__moz_mac_accentregularhighlight, + eColor__moz_mac_accentface, + eColor__moz_mac_accentlightshadow, + eColor__moz_mac_accentregularshadow, + eColor__moz_mac_accentdarkshadow, + eColor__moz_mac_accentdarkestshadow + + } nsColorID; typedef enum { diff --git a/widget/src/mac/nsLookAndFeel.cpp b/widget/src/mac/nsLookAndFeel.cpp index f47e568fe52..f167f965e7a 100644 --- a/widget/src/mac/nsLookAndFeel.cpp +++ b/widget/src/mac/nsLookAndFeel.cpp @@ -240,10 +240,6 @@ NS_IMETHODIMP nsLookAndFeel::GetColor(const nsColorID aID, nscolor &aColor) //default to lavender if not available res = GetMacBrushColor(kThemeBrushFocusHighlight, aColor, NS_RGB(0x63,0x63,0xCE)); break; - case eColor__moz_mac_menuselect: - //get this colour by querying variation table, ows. default to Platinum/Lavendar - res = GetMacAccentColor(eColorOffset_mac_accentregularshadow, aColor, NS_RGB(0x63,0x63,0xCE)); - break; case eColor__moz_mac_menushadow: res = GetMacBrushColor(kThemeBrushBevelActiveDark, aColor, NS_RGB(0x88,0x88,0x88)); break; @@ -251,6 +247,35 @@ NS_IMETHODIMP nsLookAndFeel::GetColor(const nsColorID aID, nscolor &aColor) //default to white, which is what Platinum uses, if not available res = GetMacTextColor(kThemeTextColorMenuItemSelected, aColor, NS_RGB(0xFF,0xFF,0xFF)); break; + case eColor__moz_mac_accentlightesthighlight: + //get this colour by querying variation table, ows. default to Platinum/Lavendar + res = GetMacAccentColor(eColorOffset_mac_accentlightesthighlight, aColor, NS_RGB(0xEE,0xEE,0xEE)); + break; + case eColor__moz_mac_accentregularhighlight: + //get this colour by querying variation table, ows. default to Platinum/Lavendar + res = GetMacAccentColor(eColorOffset_mac_accentregularhighlight, aColor, NS_RGB(0xCC,0xCC,0xFF)); + break; + case eColor__moz_mac_accentface: + //get this colour by querying variation table, ows. default to Platinum/Lavendar + res = GetMacAccentColor(eColorOffset_mac_accentface, aColor, NS_RGB(0x99,0x99,0xFF)); + break; + case eColor__moz_mac_accentlightshadow: + //get this colour by querying variation table, ows. default to Platinum/Lavendar + res = GetMacAccentColor(eColorOffset_mac_accentlightshadow, aColor, NS_RGB(0x66,0x66,0xCC)); + break; + case eColor__moz_mac_menuselect: + case eColor__moz_mac_accentregularshadow: + //get this colour by querying variation table, ows. default to Platinum/Lavendar + res = GetMacAccentColor(eColorOffset_mac_accentregularshadow, aColor, NS_RGB(0x63,0x63,0xCE)); + break; + case eColor__moz_mac_accentdarkshadow: + //get this colour by querying variation table, ows. default to Platinum/Lavendar + res = GetMacAccentColor(eColorOffset_mac_accentdarkshadow, aColor, NS_RGB(0x00,0x00,0x88)); + break; + case eColor__moz_mac_accentdarkestshadow: + //get this colour by querying variation table, ows. default to Platinum/Lavendar + res = GetMacAccentColor(eColorOffset_mac_accentdarkestshadow, aColor, NS_RGB(0x00,0x00,0x55)); + break; default: NS_WARNING("Someone asked nsILookAndFeel for a color I don't know about"); aColor = NS_RGB(0xff,0xff,0xff); diff --git a/widget/src/xpwidgets/nsXPLookAndFeel.cpp b/widget/src/xpwidgets/nsXPLookAndFeel.cpp index de76226d96b..3cac7995cda 100644 --- a/widget/src/xpwidgets/nsXPLookAndFeel.cpp +++ b/widget/src/xpwidgets/nsXPLookAndFeel.cpp @@ -175,11 +175,26 @@ nsLookAndFeelColorPref nsXPLookAndFeel::sColorPrefs[] = { "ui.-moz-mac-focusring", eColor__moz_mac_focusring, PR_FALSE, nsLookAndFeelTypeColor, (nscolor)0 }, { "ui.-moz-mac-menuselect", + eColor__moz_mac_menuselect, PR_FALSE, nsLookAndFeelTypeColor, (nscolor)0 }, + { "ui.-moz-mac-menushadow", eColor__moz_mac_menushadow, PR_FALSE, nsLookAndFeelTypeColor, (nscolor)0 }, - { "ui.-moz-mac-menutextshadow", - eColor__moz_mac_menutextselect, PR_FALSE, nsLookAndFeelTypeColor, (nscolor)0 }, { "ui.-moz-mac-menutextselect", - eColor__moz_mac_menutextselect, PR_FALSE, nsLookAndFeelTypeColor, (nscolor)0 }, + eColor__moz_mac_menutextselect, PR_FALSE, nsLookAndFeelTypeColor, (nscolor)0 }, + { "ui.-moz-mac-accentlightesthighlight", + eColor__moz_mac_accentlightesthighlight, PR_FALSE, nsLookAndFeelTypeColor, (nscolor)0 }, + { "ui.-moz-mac-accentregularhighlight", + eColor__moz_mac_accentregularhighlight, PR_FALSE, nsLookAndFeelTypeColor, (nscolor)0 }, + { "ui.-moz-mac-accentface", + eColor__moz_mac_accentface, PR_FALSE, nsLookAndFeelTypeColor, (nscolor)0 }, + { "ui.-moz-mac-accentlightshadow", + eColor__moz_mac_accentlightshadow, PR_FALSE, nsLookAndFeelTypeColor, (nscolor)0 }, + { "ui.-moz-mac-accentregularshadow", + eColor__moz_mac_accentregularshadow, PR_FALSE, nsLookAndFeelTypeColor, (nscolor)0 }, + { "ui.-moz-mac-accentdarkshadow", + eColor__moz_mac_accentdarkshadow, PR_FALSE, nsLookAndFeelTypeColor, (nscolor)0 }, + { "ui.-moz-mac-accentdarkestshadow", + eColor__moz_mac_accentdarkestshadow, PR_FALSE, nsLookAndFeelTypeColor, (nscolor)0 }, + }; PRBool nsXPLookAndFeel::sInitialized = PR_FALSE;