Bug 431309 - "Vista toolbar styles should have a -moz-win- prefix" (using the -moz-win- prefix) [p=kliu@mozilla.kailiu.com (Kai Liu) r+sr=roc a1.9=beltzner]
authorreed@reedloden.com
Thu, 08 May 2008 02:29:38 -0700
changeset 15048 ef47bfc8f04414f00ca616dde4f080d4fd75ff55
parent 15047 034b42d40815b49ff393b516e6f7a574b506a9bb
child 15049 5588328e126f068eb78934e4b2229bf74b64061e
push idunknown
push userunknown
push dateunknown
bugs431309
milestone1.9pre
Bug 431309 - "Vista toolbar styles should have a -moz-win- prefix" (using the -moz-win- prefix) [p=kliu@mozilla.kailiu.com (Kai Liu) r+sr=roc a1.9=beltzner]
browser/themes/winstripe/browser/browser.css
gfx/public/nsThemeConstants.h
layout/style/nsCSSKeywordList.h
layout/style/nsCSSProps.cpp
widget/src/windows/nsNativeThemeWin.cpp
--- a/browser/themes/winstripe/browser/browser.css
+++ b/browser/themes/winstripe/browser/browser.css
@@ -1360,17 +1360,17 @@ toolbar[mode="text"] #navigator-throbber
 }
 toolbar[iconsize="small"] #navigator-throbber[busy="true"],
 toolbar[mode="text"] #navigator-throbber[busy="true"] {
   list-style-image: url("chrome://global/skin/icons/loading_16.png");
 }
 
 /* Tabstrip */
 .tabbrowser-tabs {
-  -moz-appearance: browsertabbar-toolbox;
+  -moz-appearance: -moz-win-browsertabbar-toolbox;
   background: -moz-dialog url("chrome://browser/skin/tabbrowser/tabbrowser-tabs-bkgnd.png") repeat-x;
 }
 
 .tabs-container:not([overflow="true"]) {
   -moz-padding-start: 3px;
 }
 
 /* Tabs */
--- a/gfx/public/nsThemeConstants.h
+++ b/gfx/public/nsThemeConstants.h
@@ -230,11 +230,11 @@
 #define NS_THEME_MENUSEPARATOR                             217
 #define NS_THEME_MENUARROW                                 218
 // An image in the menu gutter, like in bookmarks or history
 #define NS_THEME_MENUIMAGE                                 219
 // For text on non-iconic menuitems only
 #define NS_THEME_MENUITEMTEXT                              220
 
 // Vista Rebars
-#define NS_THEME_COMMUNICATIONS_TOOLBOX                    221
-#define NS_THEME_MEDIA_TOOLBOX                             222
-#define NS_THEME_BROWSER_TAB_BAR_TOOLBOX                   223
+#define NS_THEME_WIN_COMMUNICATIONS_TOOLBOX                221
+#define NS_THEME_WIN_MEDIA_TOOLBOX                         222
+#define NS_THEME_WIN_BROWSER_TAB_BAR_TOOLBOX               223
--- a/layout/style/nsCSSKeywordList.h
+++ b/layout/style/nsCSSKeywordList.h
@@ -553,19 +553,19 @@ CSS_KEY(scalethumbstart, scalethumbstart
 CSS_KEY(scalethumbend, scalethumbend)
 CSS_KEY(scalethumbtick, scalethumbtick)
 CSS_KEY(groupbox, groupbox)
 CSS_KEY(checkbox-container, checkboxcontainer)
 CSS_KEY(radio-container, radiocontainer)
 CSS_KEY(checkbox-label, checkboxlabel)
 CSS_KEY(radio-label, radiolabel)
 CSS_KEY(button-focus, buttonfocus)
-CSS_KEY(media-toolbox, media_toolbox)
-CSS_KEY(communications-toolbox, communications_toolbox)
-CSS_KEY(browsertabbar-toolbox, browsertabbar_toolbox)
+CSS_KEY(-moz-win-media-toolbox, _moz_win_media_toolbox)
+CSS_KEY(-moz-win-communications-toolbox, _moz_win_communications_toolbox)
+CSS_KEY(-moz-win-browsertabbar-toolbox, _moz_win_browsertabbar_toolbox)
 CSS_KEY(-moz-win-mediatext, _moz_win_mediatext)
 CSS_KEY(-moz-win-communicationstext, _moz_win_communicationstext)
 
 #ifdef MOZ_SVG
 //CSS_KEY(all, all)
 CSS_KEY(alphabetic, alphabetic)
 //CSS_KEY(auto, auto)
 CSS_KEY(bevel, bevel)
--- a/layout/style/nsCSSProps.cpp
+++ b/layout/style/nsCSSProps.cpp
@@ -261,19 +261,19 @@ const PRInt32 nsCSSProps::kAppearanceKTa
   eCSSKeyword_checkmenuitem,          NS_THEME_CHECKMENUITEM,
   eCSSKeyword_radiomenuitem,          NS_THEME_RADIOMENUITEM,
   eCSSKeyword_menucheckbox,           NS_THEME_MENUCHECKBOX,
   eCSSKeyword_menuradio,              NS_THEME_MENURADIO,
   eCSSKeyword_menuseparator,          NS_THEME_MENUSEPARATOR,
   eCSSKeyword_menuarrow,              NS_THEME_MENUARROW,
   eCSSKeyword_menuimage,              NS_THEME_MENUIMAGE,
   eCSSKeyword_menuitemtext,           NS_THEME_MENUITEMTEXT,
-  eCSSKeyword_media_toolbox,          NS_THEME_MEDIA_TOOLBOX,
-  eCSSKeyword_communications_toolbox, NS_THEME_COMMUNICATIONS_TOOLBOX,
-  eCSSKeyword_browsertabbar_toolbox,  NS_THEME_BROWSER_TAB_BAR_TOOLBOX,
+  eCSSKeyword__moz_win_media_toolbox, NS_THEME_WIN_MEDIA_TOOLBOX,
+  eCSSKeyword__moz_win_communications_toolbox, NS_THEME_WIN_COMMUNICATIONS_TOOLBOX,
+  eCSSKeyword__moz_win_browsertabbar_toolbox,  NS_THEME_WIN_BROWSER_TAB_BAR_TOOLBOX,
   eCSSKeyword_UNKNOWN,-1
 };
 
 // Keyword id tables for variant/enum parsing
 const PRInt32 nsCSSProps::kAzimuthKTable[] = {
   eCSSKeyword_left_side,    NS_STYLE_AZIMUTH_LEFT_SIDE,
   eCSSKeyword_far_left,     NS_STYLE_AZIMUTH_FAR_LEFT,
   eCSSKeyword_left,         NS_STYLE_AZIMUTH_LEFT,
--- a/widget/src/windows/nsNativeThemeWin.cpp
+++ b/widget/src/windows/nsNativeThemeWin.cpp
@@ -498,27 +498,27 @@ nsNativeThemeWin::GetTheme(PRUint8 aWidg
         mTooltipTheme = openTheme(NULL, L"Tooltip");
       return mTooltipTheme;
     }
     case NS_THEME_TOOLBOX: {
       if (!mRebarTheme)
         mRebarTheme = openTheme(NULL, L"Rebar");
       return mRebarTheme;
     }
-    case NS_THEME_MEDIA_TOOLBOX: {
+    case NS_THEME_WIN_MEDIA_TOOLBOX: {
       if (!mMediaRebarTheme)
         mMediaRebarTheme = openTheme(NULL, L"Media::Rebar");
       return mMediaRebarTheme;
     }
-    case NS_THEME_COMMUNICATIONS_TOOLBOX: {
+    case NS_THEME_WIN_COMMUNICATIONS_TOOLBOX: {
       if (!mCommunicationsRebarTheme)
         mCommunicationsRebarTheme = openTheme(NULL, L"Communications::Rebar");
       return mCommunicationsRebarTheme;
     }
-    case NS_THEME_BROWSER_TAB_BAR_TOOLBOX: {
+    case NS_THEME_WIN_BROWSER_TAB_BAR_TOOLBOX: {
       if (!mBrowserTabBarRebarTheme)
         mBrowserTabBarRebarTheme = openTheme(NULL, L"BrowserTabBar::Rebar");
       return mBrowserTabBarRebarTheme;
     }
     case NS_THEME_TOOLBAR:
     case NS_THEME_TOOLBAR_BUTTON:
     case NS_THEME_TOOLBAR_SEPARATOR: {
       if (!mToolbarTheme)
@@ -949,19 +949,19 @@ nsNativeThemeWin::GetThemePartAndState(n
         aState = TS_NORMAL;
       else if (IsDisabled(aFrame))
         aState = TS_DISABLED;
       else
         aState = StandardGetState(aFrame, aWidgetType, PR_FALSE);
       return NS_OK;    
     }
     case NS_THEME_TOOLBOX:
-    case NS_THEME_MEDIA_TOOLBOX:
-    case NS_THEME_COMMUNICATIONS_TOOLBOX:
-    case NS_THEME_BROWSER_TAB_BAR_TOOLBOX:
+    case NS_THEME_WIN_MEDIA_TOOLBOX:
+    case NS_THEME_WIN_COMMUNICATIONS_TOOLBOX:
+    case NS_THEME_WIN_BROWSER_TAB_BAR_TOOLBOX:
     case NS_THEME_STATUSBAR:
     case NS_THEME_SCROLLBAR:
     case NS_THEME_SCROLLBAR_SMALL: {
       aState = 0;
       if (mIsVistaOrLater) {
         // On vista, they have a part
         aPart = RP_BACKGROUND;
       } else {
@@ -1454,19 +1454,19 @@ nsNativeThemeWin::GetWidgetBorder(nsIDev
   HANDLE theme = GetTheme(aWidgetType);
   if (!theme)
     return ClassicGetWidgetBorder(aContext, aFrame, aWidgetType, aResult); 
 
   (*aResult).top = (*aResult).bottom = (*aResult).left = (*aResult).right = 0;
 
   if (!WidgetIsContainer(aWidgetType) ||
       aWidgetType == NS_THEME_TOOLBOX || 
-      aWidgetType == NS_THEME_MEDIA_TOOLBOX ||
-      aWidgetType == NS_THEME_COMMUNICATIONS_TOOLBOX ||
-      aWidgetType == NS_THEME_BROWSER_TAB_BAR_TOOLBOX ||
+      aWidgetType == NS_THEME_WIN_MEDIA_TOOLBOX ||
+      aWidgetType == NS_THEME_WIN_COMMUNICATIONS_TOOLBOX ||
+      aWidgetType == NS_THEME_WIN_BROWSER_TAB_BAR_TOOLBOX ||
       aWidgetType == NS_THEME_STATUSBAR || 
       aWidgetType == NS_THEME_RESIZER || aWidgetType == NS_THEME_TAB_PANEL ||
       aWidgetType == NS_THEME_SCROLLBAR_TRACK_HORIZONTAL ||
       aWidgetType == NS_THEME_SCROLLBAR_TRACK_VERTICAL ||
       aWidgetType == NS_THEME_MENUITEM || aWidgetType == NS_THEME_CHECKMENUITEM ||
       aWidgetType == NS_THEME_RADIOMENUITEM || aWidgetType == NS_THEME_MENUPOPUP ||
       aWidgetType == NS_THEME_MENUIMAGE || aWidgetType == NS_THEME_MENUITEMTEXT ||
       aWidgetType == NS_THEME_TOOLBAR_SEPARATOR)
@@ -1684,19 +1684,19 @@ nsNativeThemeWin::GetMinimumWidgetSize(n
   (*aResult).width = (*aResult).height = 0;
   *aIsOverridable = PR_TRUE;
 
   HANDLE theme = GetTheme(aWidgetType);
   if (!theme)
     return ClassicGetMinimumWidgetSize(aContext, aFrame, aWidgetType, aResult, aIsOverridable);
 
   if (aWidgetType == NS_THEME_TOOLBOX ||
-      aWidgetType == NS_THEME_MEDIA_TOOLBOX ||
-      aWidgetType == NS_THEME_COMMUNICATIONS_TOOLBOX ||
-      aWidgetType == NS_THEME_BROWSER_TAB_BAR_TOOLBOX ||
+      aWidgetType == NS_THEME_WIN_MEDIA_TOOLBOX ||
+      aWidgetType == NS_THEME_WIN_COMMUNICATIONS_TOOLBOX ||
+      aWidgetType == NS_THEME_WIN_BROWSER_TAB_BAR_TOOLBOX ||
       aWidgetType == NS_THEME_TOOLBAR || 
       aWidgetType == NS_THEME_STATUSBAR || aWidgetType == NS_THEME_PROGRESSBAR_CHUNK ||
       aWidgetType == NS_THEME_PROGRESSBAR_CHUNK_VERTICAL ||
       aWidgetType == NS_THEME_TAB_PANELS || aWidgetType == NS_THEME_TAB_PANEL ||
       aWidgetType == NS_THEME_LISTBOX || aWidgetType == NS_THEME_TREEVIEW || aWidgetType == NS_THEME_MENUITEMTEXT)
     return NS_OK; // Don't worry about it.
 
   if (aWidgetType == NS_THEME_MENUITEM && IsTopLevelMenu(aFrame))
@@ -1816,19 +1816,19 @@ nsNativeThemeWin::GetMinimumWidgetSize(n
 }
 
 NS_IMETHODIMP
 nsNativeThemeWin::WidgetStateChanged(nsIFrame* aFrame, PRUint8 aWidgetType, 
                                      nsIAtom* aAttribute, PRBool* aShouldRepaint)
 {
   // Some widget types just never change state.
   if (aWidgetType == NS_THEME_TOOLBOX ||
-      aWidgetType == NS_THEME_MEDIA_TOOLBOX ||
-      aWidgetType == NS_THEME_COMMUNICATIONS_TOOLBOX ||
-      aWidgetType == NS_THEME_BROWSER_TAB_BAR_TOOLBOX ||
+      aWidgetType == NS_THEME_WIN_MEDIA_TOOLBOX ||
+      aWidgetType == NS_THEME_WIN_COMMUNICATIONS_TOOLBOX ||
+      aWidgetType == NS_THEME_WIN_BROWSER_TAB_BAR_TOOLBOX ||
       aWidgetType == NS_THEME_TOOLBAR ||
       aWidgetType == NS_THEME_STATUSBAR || aWidgetType == NS_THEME_STATUSBAR_PANEL ||
       aWidgetType == NS_THEME_STATUSBAR_RESIZER_PANEL ||
       aWidgetType == NS_THEME_PROGRESSBAR_CHUNK ||
       aWidgetType == NS_THEME_PROGRESSBAR_CHUNK_VERTICAL ||
       aWidgetType == NS_THEME_PROGRESSBAR ||
       aWidgetType == NS_THEME_PROGRESSBAR_VERTICAL ||
       aWidgetType == NS_THEME_TOOLTIP ||