Bug 1274339 - Align resizerpanel and caret in -moz-appearance. r=bobbyholley
authorKeith Yeung <kungfukeith11@gmail.com>
Thu, 19 May 2016 10:58:00 +0200
changeset 298799 efbf5da2b01491fd0268794ba11534439d5b64fe
parent 298798 7340f8d06cf02e320ded13bfe526a634fc63c635
child 298800 7f6080fa6fc3aa5937f3c3afc03a4d387022a5b4
push id19379
push usercbook@mozilla.com
push dateWed, 25 May 2016 13:21:42 +0000
treeherderfx-team@ff6044ca8189 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbobbyholley
bugs1274339
milestone49.0a1
Bug 1274339 - Align resizerpanel and caret in -moz-appearance. r=bobbyholley
gfx/src/nsThemeConstants.h
layout/style/nsCSSProps.cpp
widget/cocoa/nsNativeThemeCocoa.mm
widget/gtk/nsNativeThemeGTK.cpp
widget/windows/nsNativeThemeWin.cpp
--- a/gfx/src/nsThemeConstants.h
+++ b/gfx/src/nsThemeConstants.h
@@ -54,17 +54,17 @@
 // A status bar in a main application window.
 #define NS_THEME_STATUSBAR                                 23
 
 // A single pane of a status bar.
 #define NS_THEME_STATUSBARPANEL                            24
 
 // The resizer background area in a status bar 
 // for the resizer widget in the corner of a window.
-#define NS_THEME_RESIZER_PANEL                             25
+#define NS_THEME_RESIZERPANEL                              25
 
 // The resizer itself.
 #define NS_THEME_RESIZER                                   26
 
 // List boxes
 #define NS_THEME_LISTBOX                                   31
 
 // A listbox item
@@ -169,17 +169,17 @@
 
 // A non-disappearing scrollbar.
 #define NS_THEME_SCROLLBAR_NON_DISAPPEARING                92
 
 // A textfield or text area
 #define NS_THEME_TEXTFIELD                                 95
 
 // The caret of a text area
-#define NS_THEME_TEXTFIELD_CARET                           96
+#define NS_THEME_CARET                                     96
 
 // A multiline text field
 #define NS_THEME_TEXTFIELD_MULTILINE                       97
 
 // A searchfield
 #define NS_THEME_SEARCHFIELD                               98
 
 // A dropdown list.
--- a/layout/style/nsCSSProps.cpp
+++ b/layout/style/nsCSSProps.cpp
@@ -764,17 +764,17 @@ const KTableEntry nsCSSProps::kAppearanc
   { eCSSKeyword_button_arrow_previous,  NS_THEME_BUTTON_ARROW_PREVIOUS },
   { eCSSKeyword_meterbar,               NS_THEME_METERBAR },
   { eCSSKeyword_meterchunk,             NS_THEME_METERCHUNK },
   { eCSSKeyword_number_input,           NS_THEME_NUMBER_INPUT },
   { eCSSKeyword_separator,              NS_THEME_SEPARATOR },
   { eCSSKeyword_splitter,               NS_THEME_SPLITTER },
   { eCSSKeyword_statusbar,              NS_THEME_STATUSBAR },
   { eCSSKeyword_statusbarpanel,         NS_THEME_STATUSBARPANEL },
-  { eCSSKeyword_resizerpanel,           NS_THEME_RESIZER_PANEL },
+  { eCSSKeyword_resizerpanel,           NS_THEME_RESIZERPANEL },
   { eCSSKeyword_resizer,                NS_THEME_RESIZER },
   { eCSSKeyword_listbox,                NS_THEME_LISTBOX },
   { eCSSKeyword_listitem,               NS_THEME_LISTITEM },
   { eCSSKeyword_treeview,               NS_THEME_TREEVIEW },
   { eCSSKeyword_treeitem,               NS_THEME_TREEITEM },
   { eCSSKeyword_treetwisty,             NS_THEME_TREETWISTY },
   { eCSSKeyword_treetwistyopen,         NS_THEME_TREETWISTYOPEN },
   { eCSSKeyword_treeline,               NS_THEME_TREELINE },
@@ -804,17 +804,17 @@ const KTableEntry nsCSSProps::kAppearanc
   { eCSSKeyword_scrollbarbutton_left,   NS_THEME_SCROLLBARBUTTON_LEFT },
   { eCSSKeyword_scrollbarbutton_right,  NS_THEME_SCROLLBARBUTTON_RIGHT },
   { eCSSKeyword_scrollbartrack_horizontal,    NS_THEME_SCROLLBARTRACK_HORIZONTAL },
   { eCSSKeyword_scrollbartrack_vertical,      NS_THEME_SCROLLBARTRACK_VERTICAL },
   { eCSSKeyword_scrollbarthumb_horizontal,    NS_THEME_SCROLLBARTHUMB_HORIZONTAL },
   { eCSSKeyword_scrollbarthumb_vertical,      NS_THEME_SCROLLBARTHUMB_VERTICAL },
   { eCSSKeyword_textfield,              NS_THEME_TEXTFIELD },
   { eCSSKeyword_textfield_multiline,    NS_THEME_TEXTFIELD_MULTILINE },
-  { eCSSKeyword_caret,                  NS_THEME_TEXTFIELD_CARET },
+  { eCSSKeyword_caret,                  NS_THEME_CARET },
   { eCSSKeyword_searchfield,            NS_THEME_SEARCHFIELD },
   { eCSSKeyword_menulist,               NS_THEME_MENULIST },
   { eCSSKeyword_menulist_button,        NS_THEME_MENULIST_BUTTON },
   { eCSSKeyword_menulist_text,          NS_THEME_MENULIST_TEXT },
   { eCSSKeyword_menulist_textfield,     NS_THEME_MENULIST_TEXTFIELD },
   { eCSSKeyword_range,                  NS_THEME_RANGE },
   { eCSSKeyword_range_thumb,            NS_THEME_RANGE_THUMB },
   { eCSSKeyword_scale_horizontal,       NS_THEME_SCALE_HORIZONTAL },
--- a/widget/cocoa/nsNativeThemeCocoa.mm
+++ b/widget/cocoa/nsNativeThemeCocoa.mm
@@ -3622,17 +3622,17 @@ nsNativeThemeCocoa::WidgetStateChanged(n
 {
   // Some widget types just never change state.
   switch (aWidgetType) {
     case NS_THEME_WINDOW_TITLEBAR:
     case NS_THEME_TOOLBOX:
     case NS_THEME_TOOLBAR:
     case NS_THEME_STATUSBAR:
     case NS_THEME_STATUSBARPANEL:
-    case NS_THEME_RESIZER_PANEL:
+    case NS_THEME_RESIZERPANEL:
     case NS_THEME_TOOLTIP:
     case NS_THEME_TABPANELS:
     case NS_THEME_TABPANEL:
     case NS_THEME_DIALOG:
     case NS_THEME_MENUPOPUP:
     case NS_THEME_GROUPBOX:
     case NS_THEME_PROGRESSCHUNK:
     case NS_THEME_PROGRESSCHUNK_VERTICAL:
--- a/widget/gtk/nsNativeThemeGTK.cpp
+++ b/widget/gtk/nsNativeThemeGTK.cpp
@@ -605,17 +605,17 @@ nsNativeThemeGTK::GetGtkWidgetAndState(u
     break;
   case NS_THEME_TOOLBAR:
     aGtkWidgetType = MOZ_GTK_TOOLBAR;
     break;
   case NS_THEME_TOOLTIP:
     aGtkWidgetType = MOZ_GTK_TOOLTIP;
     break;
   case NS_THEME_STATUSBARPANEL:
-  case NS_THEME_RESIZER_PANEL:
+  case NS_THEME_RESIZERPANEL:
     aGtkWidgetType = MOZ_GTK_FRAME;
     break;
   case NS_THEME_PROGRESSBAR:
   case NS_THEME_PROGRESSBAR_VERTICAL:
     aGtkWidgetType = MOZ_GTK_PROGRESSBAR;
     break;
   case NS_THEME_PROGRESSCHUNK:
   case NS_THEME_PROGRESSCHUNK_VERTICAL:
@@ -1672,17 +1672,17 @@ nsNativeThemeGTK::WidgetStateChanged(nsI
                                      nsIAtom* aAttribute, bool* aShouldRepaint,
                                      const nsAttrValue* aOldValue)
 {
   // Some widget types just never change state.
   if (aWidgetType == NS_THEME_TOOLBOX ||
       aWidgetType == NS_THEME_TOOLBAR ||
       aWidgetType == NS_THEME_STATUSBAR ||
       aWidgetType == NS_THEME_STATUSBARPANEL ||
-      aWidgetType == NS_THEME_RESIZER_PANEL ||
+      aWidgetType == NS_THEME_RESIZERPANEL ||
       aWidgetType == NS_THEME_PROGRESSCHUNK ||
       aWidgetType == NS_THEME_PROGRESSCHUNK_VERTICAL ||
       aWidgetType == NS_THEME_PROGRESSBAR ||
       aWidgetType == NS_THEME_PROGRESSBAR_VERTICAL ||
       aWidgetType == NS_THEME_MENUBAR ||
       aWidgetType == NS_THEME_MENUPOPUP ||
       aWidgetType == NS_THEME_TOOLTIP ||
       aWidgetType == NS_THEME_MENUSEPARATOR ||
@@ -1791,17 +1791,17 @@ nsNativeThemeGTK::ThemeSupportsWidget(ns
   case NS_THEME_BUTTON_ARROW_UP:
   case NS_THEME_BUTTON_ARROW_DOWN:
   case NS_THEME_BUTTON_ARROW_NEXT:
   case NS_THEME_BUTTON_ARROW_PREVIOUS:
   case NS_THEME_SEPARATOR:
   case NS_THEME_TOOLBARGRIPPER:
   case NS_THEME_STATUSBAR:
   case NS_THEME_STATUSBARPANEL:
-  case NS_THEME_RESIZER_PANEL:
+  case NS_THEME_RESIZERPANEL:
   case NS_THEME_RESIZER:
   case NS_THEME_LISTBOX:
     // case NS_THEME_LISTITEM:
   case NS_THEME_TREEVIEW:
     // case NS_THEME_TREEITEM:
   case NS_THEME_TREETWISTY:
     // case NS_THEME_TREELINE:
     // case NS_THEME_TREEHEADER:
--- a/widget/windows/nsNativeThemeWin.cpp
+++ b/widget/windows/nsNativeThemeWin.cpp
@@ -786,17 +786,17 @@ nsNativeThemeWin::GetTheme(uint8_t aWidg
     case NS_THEME_SCALETHUMB_HORIZONTAL:
     case NS_THEME_SCALETHUMB_VERTICAL:
       return nsUXThemeData::GetTheme(eUXTrackbar);
     case NS_THEME_SPINNER_UPBUTTON:
     case NS_THEME_SPINNER_DOWNBUTTON:
       return nsUXThemeData::GetTheme(eUXSpin);
     case NS_THEME_STATUSBAR:
     case NS_THEME_STATUSBARPANEL:
-    case NS_THEME_RESIZER_PANEL:
+    case NS_THEME_RESIZERPANEL:
     case NS_THEME_RESIZER:
       return nsUXThemeData::GetTheme(eUXStatus);
     case NS_THEME_MENULIST:
     case NS_THEME_MENULIST_BUTTON:
       return nsUXThemeData::GetTheme(eUXCombobox);
     case NS_THEME_TREEHEADERCELL:
     case NS_THEME_TREEHEADERSORTARROW:
       return nsUXThemeData::GetTheme(eUXHeader);
@@ -1225,17 +1225,17 @@ nsNativeThemeWin::GetThemePartAndState(n
         // XXXzeniko hiding the first toolbar will result in an unwanted margin
         if (parent && parent->GetFirstChild() == content) {
           aState = 1;
         }
       }
       return NS_OK;
     }
     case NS_THEME_STATUSBARPANEL:
-    case NS_THEME_RESIZER_PANEL:
+    case NS_THEME_RESIZERPANEL:
     case NS_THEME_RESIZER: {
       aPart = (aWidgetType - NS_THEME_STATUSBARPANEL) + 1;
       aState = TS_NORMAL;
       return NS_OK;
     }
     case NS_THEME_TREEVIEW:
     case NS_THEME_LISTBOX: {
       aPart = TREEVIEW_BODY;
@@ -2588,17 +2588,17 @@ nsNativeThemeWin::WidgetStateChanged(nsI
 {
   // Some widget types just never change state.
   if (aWidgetType == NS_THEME_TOOLBOX ||
       aWidgetType == NS_THEME_WIN_MEDIA_TOOLBOX ||
       aWidgetType == NS_THEME_WIN_COMMUNICATIONS_TOOLBOX ||
       aWidgetType == NS_THEME_WIN_BROWSERTABBAR_TOOLBOX ||
       aWidgetType == NS_THEME_TOOLBAR ||
       aWidgetType == NS_THEME_STATUSBAR || aWidgetType == NS_THEME_STATUSBARPANEL ||
-      aWidgetType == NS_THEME_RESIZER_PANEL ||
+      aWidgetType == NS_THEME_RESIZERPANEL ||
       aWidgetType == NS_THEME_PROGRESSCHUNK ||
       aWidgetType == NS_THEME_PROGRESSCHUNK_VERTICAL ||
       aWidgetType == NS_THEME_PROGRESSBAR ||
       aWidgetType == NS_THEME_PROGRESSBAR_VERTICAL ||
       aWidgetType == NS_THEME_TOOLTIP ||
       aWidgetType == NS_THEME_TABPANELS ||
       aWidgetType == NS_THEME_TABPANEL ||
       aWidgetType == NS_THEME_SEPARATOR ||
@@ -2862,17 +2862,17 @@ nsNativeThemeWin::ClassicThemeSupportsWi
     case NS_THEME_SPINNER_DOWNBUTTON:
     case NS_THEME_LISTBOX:
     case NS_THEME_TREEVIEW:
     case NS_THEME_MENULIST_TEXTFIELD:
     case NS_THEME_MENULIST:
     case NS_THEME_TOOLTIP:
     case NS_THEME_STATUSBAR:
     case NS_THEME_STATUSBARPANEL:
-    case NS_THEME_RESIZER_PANEL:
+    case NS_THEME_RESIZERPANEL:
     case NS_THEME_PROGRESSBAR:
     case NS_THEME_PROGRESSBAR_VERTICAL:
     case NS_THEME_PROGRESSCHUNK:
     case NS_THEME_PROGRESSCHUNK_VERTICAL:
     case NS_THEME_TAB:
     case NS_THEME_TABPANEL:
     case NS_THEME_TABPANELS:
     case NS_THEME_MENUITEM:
@@ -2921,17 +2921,17 @@ nsNativeThemeWin::ClassicGetWidgetBorder
     case NS_THEME_TAB:
     case NS_THEME_NUMBER_INPUT:
     case NS_THEME_TEXTFIELD:
     case NS_THEME_TEXTFIELD_MULTILINE:
     case NS_THEME_FOCUS_OUTLINE:
       (*aResult).top = (*aResult).left = (*aResult).bottom = (*aResult).right = 2;
       break;
     case NS_THEME_STATUSBARPANEL:
-    case NS_THEME_RESIZER_PANEL: {
+    case NS_THEME_RESIZERPANEL: {
       (*aResult).top = 1;      
       (*aResult).left = 1;
       (*aResult).bottom = 1;
       (*aResult).right = aFrame->GetNextSibling() ? 3 : 1;
       break;
     }    
     case NS_THEME_TOOLTIP:
       (*aResult).top = (*aResult).left = (*aResult).bottom = (*aResult).right = 1;
@@ -3074,17 +3074,17 @@ nsNativeThemeWin::ClassicGetMinimumWidge
     case NS_THEME_LISTBOX:
     case NS_THEME_TREEVIEW:
     case NS_THEME_NUMBER_INPUT:
     case NS_THEME_TEXTFIELD:
     case NS_THEME_TEXTFIELD_MULTILINE:
     case NS_THEME_MENULIST_TEXTFIELD:      
     case NS_THEME_STATUSBAR:
     case NS_THEME_STATUSBARPANEL:      
-    case NS_THEME_RESIZER_PANEL:
+    case NS_THEME_RESIZERPANEL:
     case NS_THEME_PROGRESSCHUNK:
     case NS_THEME_PROGRESSCHUNK_VERTICAL:
     case NS_THEME_TOOLTIP:
     case NS_THEME_PROGRESSBAR:
     case NS_THEME_PROGRESSBAR_VERTICAL:
     case NS_THEME_TAB:
     case NS_THEME_TABPANEL:
     case NS_THEME_TABPANELS:
@@ -3325,17 +3325,17 @@ nsresult nsNativeThemeWin::ClassicGetThe
     case NS_THEME_SCROLLBAR_VERTICAL:
     case NS_THEME_SCROLLBAR_HORIZONTAL:      
     case NS_THEME_SCALE_HORIZONTAL:
     case NS_THEME_SCALE_VERTICAL:
     case NS_THEME_SCALETHUMB_HORIZONTAL:
     case NS_THEME_SCALETHUMB_VERTICAL:
     case NS_THEME_STATUSBAR:
     case NS_THEME_STATUSBARPANEL:
-    case NS_THEME_RESIZER_PANEL:
+    case NS_THEME_RESIZERPANEL:
     case NS_THEME_PROGRESSCHUNK:
     case NS_THEME_PROGRESSCHUNK_VERTICAL:
     case NS_THEME_TOOLTIP:
     case NS_THEME_PROGRESSBAR:
     case NS_THEME_PROGRESSBAR_VERTICAL:
     case NS_THEME_TAB:
     case NS_THEME_TABPANEL:
     case NS_THEME_TABPANELS:
@@ -3793,17 +3793,17 @@ RENDER_AGAIN:
     case NS_THEME_PROGRESSBAR:
     case NS_THEME_PROGRESSBAR_VERTICAL:
       // Draw 3D border
       ::DrawEdge(hdc, &widgetRect, BDR_SUNKENOUTER, BF_RECT | BF_MIDDLE);
       InflateRect(&widgetRect, -1, -1);
       // fall through
     case NS_THEME_TABPANEL:
     case NS_THEME_STATUSBAR:
-    case NS_THEME_RESIZER_PANEL: {
+    case NS_THEME_RESIZERPANEL: {
       ::FillRect(hdc, &widgetRect, (HBRUSH) (COLOR_BTNFACE+1));
 
       break;
     }
     // Draw 3D inset statusbar panel
     case NS_THEME_STATUSBARPANEL: {
       if (aFrame->GetNextSibling())
         widgetRect.right -= 2; // space between sibling status panels
@@ -4143,17 +4143,17 @@ nsNativeThemeWin::GetWidgetNativeDrawing
     case NS_THEME_SCALETHUMB_VERTICAL:
     case NS_THEME_SPINNER_UPBUTTON:
     case NS_THEME_SPINNER_DOWNBUTTON:
     case NS_THEME_LISTBOX:
     case NS_THEME_TREEVIEW:
     case NS_THEME_TOOLTIP:
     case NS_THEME_STATUSBAR:
     case NS_THEME_STATUSBARPANEL:
-    case NS_THEME_RESIZER_PANEL:
+    case NS_THEME_RESIZERPANEL:
     case NS_THEME_RESIZER:
     case NS_THEME_PROGRESSBAR:
     case NS_THEME_PROGRESSBAR_VERTICAL:
     case NS_THEME_PROGRESSCHUNK:
     case NS_THEME_PROGRESSCHUNK_VERTICAL:
     case NS_THEME_TAB:
     case NS_THEME_TABPANEL:
     case NS_THEME_TABPANELS: