Bug 1415080 - Rename all 's' prefixed members of nsLookAndFeel as they're not static ones, r?jhorak draft
authorMartin Stransky <stransky@redhat.com>
Tue, 07 Nov 2017 10:14:52 +0100
changeset 694016 feff782472693356eb8a5265487eaab96a304184
parent 693830 c2fe4b3b1b930b3e7fdb84eae44cec165394f322
child 739235 d85e95d1aa4bc594ccb93d4ca4708598864288f1
push id88022
push userstransky@redhat.com
push dateTue, 07 Nov 2017 09:21:23 +0000
reviewersjhorak
bugs1415080
milestone58.0a1
Bug 1415080 - Rename all 's' prefixed members of nsLookAndFeel as they're not static ones, r?jhorak MozReview-Commit-ID: 9LHIewRnbAY
widget/gtk/nsLookAndFeel.cpp
widget/gtk/nsLookAndFeel.h
--- a/widget/gtk/nsLookAndFeel.cpp
+++ b/widget/gtk/nsLookAndFeel.cpp
@@ -250,44 +250,44 @@ nsLookAndFeel::NativeGetColor(ColorID aI
     case eColorID_TextBackground:
     case eColorID_activecaption: // active window caption background
     case eColorID_appworkspace: // MDI background color
     case eColorID_background: // desktop background
     case eColorID_window:
     case eColorID_windowframe:
     case eColorID__moz_dialog:
     case eColorID__moz_combobox:
-        aColor = sMozWindowBackground;
+        aColor = mMozWindowBackground;
         break;
     case eColorID_WindowForeground:
     case eColorID_WidgetForeground:
     case eColorID_TextForeground: 
     case eColorID_captiontext: // text in active window caption, size box, and scrollbar arrow box (!)
     case eColorID_windowtext:
     case eColorID__moz_dialogtext:
-        aColor = sMozWindowText;
+        aColor = mMozWindowText;
         break;
     case eColorID_WidgetSelectBackground:
     case eColorID_TextSelectBackground:
     case eColorID_IMESelectedRawTextBackground:
     case eColorID_IMESelectedConvertedTextBackground:
     case eColorID__moz_dragtargetzone:
     case eColorID__moz_cellhighlight:
     case eColorID__moz_html_cellhighlight:
     case eColorID_highlight: // preference selected item,
-        aColor = sTextSelectedBackground;
+        aColor = mTextSelectedBackground;
         break;
     case eColorID_WidgetSelectForeground:
     case eColorID_TextSelectForeground:
     case eColorID_IMESelectedRawTextForeground:
     case eColorID_IMESelectedConvertedTextForeground:
     case eColorID_highlighttext:
     case eColorID__moz_cellhighlighttext:
     case eColorID__moz_html_cellhighlighttext:
-        aColor = sTextSelectedText;
+        aColor = mTextSelectedText;
         break;
     case eColorID_Widget3DHighlight:
         aColor = NS_RGB(0xa0,0xa0,0xa0);
         break;
     case eColorID_Widget3DShadow:
         aColor = NS_RGB(0x40,0x40,0x40);
         break;
     case eColorID_IMERawInputBackground:
@@ -308,124 +308,124 @@ nsLookAndFeel::NativeGetColor(ColorID aI
         break;
     case eColorID_SpellCheckerUnderline:
         aColor = NS_RGB(0xff, 0, 0);
         break;
 
         // css2  http://www.w3.org/TR/REC-CSS2/ui.html#system-colors
     case eColorID_activeborder:
         // active window border
-        aColor = sMozWindowActiveBorder;
+        aColor = mMozWindowActiveBorder;
         break;
     case eColorID_inactiveborder:
         // inactive window border
-        aColor = sMozWindowInactiveBorder;
+        aColor = mMozWindowInactiveBorder;
         break;
     case eColorID_graytext: // disabled text in windows, menus, etc.
     case eColorID_inactivecaptiontext: // text in inactive window caption
-        aColor = sMenuTextInactive;
+        aColor = mMenuTextInactive;
         break;
     case eColorID_inactivecaption:
         // inactive window caption
-        aColor = sMozWindowInactiveCaption;
+        aColor = mMozWindowInactiveCaption;
         break;
     case eColorID_infobackground:
         // tooltip background color
-        aColor = sInfoBackground;
+        aColor = mInfoBackground;
         break;
     case eColorID_infotext:
         // tooltip text color
-        aColor = sInfoText;
+        aColor = mInfoText;
         break;
     case eColorID_menu:
         // menu background
-        aColor = sMenuBackground;
+        aColor = mMenuBackground;
         break;
     case eColorID_menutext:
         // menu text
-        aColor = sMenuText;
+        aColor = mMenuText;
         break;
     case eColorID_scrollbar:
         // scrollbar gray area
-        aColor = sMozScrollbar;
+        aColor = mMozScrollbar;
         break;
 
     case eColorID_threedlightshadow:
         // 3-D highlighted inner edge color
         // always same as background in GTK code
     case eColorID_threedface:
     case eColorID_buttonface:
         // 3-D face color
-        aColor = sMozWindowBackground;
+        aColor = mMozWindowBackground;
         break;
 
     case eColorID_buttontext:
         // text on push buttons
-        aColor = sButtonText;
+        aColor = mButtonText;
         break;
 
     case eColorID_buttonhighlight:
         // 3-D highlighted edge color
     case eColorID_threedhighlight:
         // 3-D highlighted outer edge color
-        aColor = sFrameOuterLightBorder;
+        aColor = mFrameOuterLightBorder;
         break;
 
     case eColorID_buttonshadow:
         // 3-D shadow edge color
     case eColorID_threedshadow:
         // 3-D shadow inner edge color
-        aColor = sFrameInnerDarkBorder;
+        aColor = mFrameInnerDarkBorder;
         break;
 
     case eColorID_threeddarkshadow:
         // Hardcode to black
         aColor = NS_RGB(0x00,0x00,0x00);
         break;
 
     case eColorID__moz_eventreerow:
     case eColorID__moz_field:
-        aColor = sMozFieldBackground;
+        aColor = mMozFieldBackground;
         break;
     case eColorID__moz_fieldtext:
-        aColor = sMozFieldText;
+        aColor = mMozFieldText;
         break;
     case eColorID__moz_buttondefault:
         // default button border color
-        aColor = sButtonDefault;
+        aColor = mButtonDefault;
         break;
     case eColorID__moz_buttonhoverface:
-        aColor = sButtonHoverFace;
+        aColor = mButtonHoverFace;
         break;
     case eColorID__moz_buttonhovertext:
-        aColor = sButtonHoverText;
+        aColor = mButtonHoverText;
         break;
     case eColorID__moz_menuhover:
-        aColor = sMenuHover;
+        aColor = mMenuHover;
         break;
     case eColorID__moz_menuhovertext:
-        aColor = sMenuHoverText;
+        aColor = mMenuHoverText;
         break;
     case eColorID__moz_oddtreerow:
-        aColor = sOddCellBackground;
+        aColor = mOddCellBackground;
         break;
     case eColorID__moz_nativehyperlinktext:
-        aColor = sNativeHyperLinkText;
+        aColor = mNativeHyperLinkText;
         break;
     case eColorID__moz_comboboxtext:
-        aColor = sComboBoxText;
+        aColor = mComboBoxText;
         break;
     case eColorID__moz_menubartext:
-        aColor = sMenuBarText;
+        aColor = mMenuBarText;
         break;
     case eColorID__moz_menubarhovertext:
-        aColor = sMenuBarHoverText;
+        aColor = mMenuBarHoverText;
         break;
     case eColorID__moz_gtk_info_bar_text:
-        aColor = sInfoBarText;
+        aColor = mInfoBarText;
         break;
     default:
         /* default color is BLACK */
         aColor = 0;
         res    = NS_ERROR_FAILURE;
         break;
     }
 
@@ -636,43 +636,43 @@ nsLookAndFeel::GetIntImpl(IntID aID, int
     case eIntID_IMESelectedConvertedTextUnderline:
         aResult = NS_STYLE_TEXT_DECORATION_STYLE_NONE;
         break;
     case eIntID_SpellCheckerUnderlineStyle:
         aResult = NS_STYLE_TEXT_DECORATION_STYLE_WAVY;
         break;
     case eIntID_MenuBarDrag:
         EnsureInit();
-        aResult = sMenuSupportsDrag;
+        aResult = mMenuSupportsDrag;
         break;
     case eIntID_ScrollbarButtonAutoRepeatBehavior:
         aResult = 1;
         break;
     case eIntID_SwipeAnimationEnabled:
         aResult = 0;
         break;
     case eIntID_ContextMenuOffsetVertical:
     case eIntID_ContextMenuOffsetHorizontal:
         aResult = 2;
         break;
     case eIntID_GTKCSDAvailable:
         EnsureInit();
-        aResult = sCSDAvailable;
+        aResult = mCSDAvailable;
         break;
     case eIntID_GTKCSDMaximizeButton:
         EnsureInit();
-        aResult = sCSDMaximizeButton;
+        aResult = mCSDMaximizeButton;
         break;
     case eIntID_GTKCSDMinimizeButton:
         EnsureInit();
-        aResult = sCSDMinimizeButton;
+        aResult = mCSDMinimizeButton;
         break;
     case eIntID_GTKCSDCloseButton:
         EnsureInit();
-        aResult = sCSDCloseButton;
+        aResult = mCSDCloseButton;
         break;
     default:
         aResult = 0;
         res     = NS_ERROR_FAILURE;
     }
 
     return res;
 }
@@ -690,17 +690,17 @@ nsLookAndFeel::GetFloatImpl(FloatID aID,
     case eFloatID_IMEUnderlineRelativeSize:
         aResult = 1.0f;
         break;
     case eFloatID_SpellCheckerUnderlineRelativeSize:
         aResult = 1.0f;
         break;
     case eFloatID_CaretAspectRatio:
         EnsureInit();
-        aResult = sCaretRatio;
+        aResult = mCaretRatio;
         break;
     default:
         aResult = -1.0;
         res = NS_ERROR_FAILURE;
     }
     return res;
 }
 
@@ -853,72 +853,72 @@ nsLookAndFeel::EnsureInit()
     // different style contexts.  The node hierarchy is constructed only on
     // the label style context.
     GtkWidget *labelWidget = gtk_label_new("M");
     g_object_ref_sink(labelWidget);
 
     // Scrollbar colors
     style = GetStyleContext(MOZ_GTK_SCROLLBAR_TROUGH_VERTICAL);
     gtk_style_context_get_background_color(style, GTK_STATE_FLAG_NORMAL, &color);
-    sMozScrollbar = GDK_RGBA_TO_NS_RGBA(color);
+    mMozScrollbar = GDK_RGBA_TO_NS_RGBA(color);
 
     // Window colors
     style = GetStyleContext(MOZ_GTK_WINDOW);
     gtk_style_context_get_background_color(style, GTK_STATE_FLAG_NORMAL, &color);
-    sMozWindowBackground = GDK_RGBA_TO_NS_RGBA(color);
+    mMozWindowBackground = GDK_RGBA_TO_NS_RGBA(color);
     gtk_style_context_get_color(style, GTK_STATE_FLAG_NORMAL, &color);
-    sMozWindowText = GDK_RGBA_TO_NS_RGBA(color);
+    mMozWindowText = GDK_RGBA_TO_NS_RGBA(color);
     gtk_style_context_get_border_color(style, GTK_STATE_FLAG_NORMAL, &color);
-    sMozWindowActiveBorder = GDK_RGBA_TO_NS_RGBA(color);
+    mMozWindowActiveBorder = GDK_RGBA_TO_NS_RGBA(color);
     gtk_style_context_get_border_color(style, GTK_STATE_FLAG_INSENSITIVE,
                                        &color);
-    sMozWindowInactiveBorder = GDK_RGBA_TO_NS_RGBA(color);
+    mMozWindowInactiveBorder = GDK_RGBA_TO_NS_RGBA(color);
     gtk_style_context_get_background_color(style, GTK_STATE_FLAG_INSENSITIVE,
                                            &color);
-    sMozWindowInactiveCaption = GDK_RGBA_TO_NS_RGBA(color);
+    mMozWindowInactiveCaption = GDK_RGBA_TO_NS_RGBA(color);
 
     style = GetStyleContext(MOZ_GTK_WINDOW_CONTAINER);
     {
         GtkStyleContext* labelStyle = CreateStyleForWidget(labelWidget, style);
         GetSystemFontInfo(labelStyle, &mDefaultFontName, &mDefaultFontStyle);
         g_object_unref(labelStyle);
     }
 
     // tooltip foreground and background
     style = GetStyleContext(MOZ_GTK_TOOLTIP);
     gtk_style_context_get_background_color(style, GTK_STATE_FLAG_NORMAL, &color);
-    sInfoBackground = GDK_RGBA_TO_NS_RGBA(color);
+    mInfoBackground = GDK_RGBA_TO_NS_RGBA(color);
 
     style = GetStyleContext(MOZ_GTK_TOOLTIP_BOX_LABEL);
     gtk_style_context_get_color(style, GTK_STATE_FLAG_NORMAL, &color);
-    sInfoText = GDK_RGBA_TO_NS_RGBA(color);
+    mInfoText = GDK_RGBA_TO_NS_RGBA(color);
 
     style = GetStyleContext(MOZ_GTK_MENUITEM);
     {
         GtkStyleContext* accelStyle =
             CreateStyleForWidget(gtk_accel_label_new("M"), style);
 
         GetSystemFontInfo(accelStyle, &mMenuFontName, &mMenuFontStyle);
 
         gtk_style_context_get_color(accelStyle, GTK_STATE_FLAG_NORMAL, &color);
-        sMenuText = GDK_RGBA_TO_NS_RGBA(color);
+        mMenuText = GDK_RGBA_TO_NS_RGBA(color);
         gtk_style_context_get_color(accelStyle, GTK_STATE_FLAG_INSENSITIVE, &color);
-        sMenuTextInactive = GDK_RGBA_TO_NS_RGBA(color);
+        mMenuTextInactive = GDK_RGBA_TO_NS_RGBA(color);
         g_object_unref(accelStyle);
     }
 
     style = GetStyleContext(MOZ_GTK_MENUPOPUP);
     gtk_style_context_get_background_color(style, GTK_STATE_FLAG_NORMAL, &color);
-    sMenuBackground = GDK_RGBA_TO_NS_RGBA(color);
+    mMenuBackground = GDK_RGBA_TO_NS_RGBA(color);
 
     style = GetStyleContext(MOZ_GTK_MENUITEM);
     gtk_style_context_get_background_color(style, GTK_STATE_FLAG_PRELIGHT, &color);
-    sMenuHover = GDK_RGBA_TO_NS_RGBA(color);
+    mMenuHover = GDK_RGBA_TO_NS_RGBA(color);
     gtk_style_context_get_color(style, GTK_STATE_FLAG_PRELIGHT, &color);
-    sMenuHoverText = GDK_RGBA_TO_NS_RGBA(color);
+    mMenuHoverText = GDK_RGBA_TO_NS_RGBA(color);
 
     GtkWidget *parent = gtk_fixed_new();
     GtkWidget *window = gtk_window_new(GTK_WINDOW_POPUP);
     GtkWidget *treeView = gtk_tree_view_new();
     GtkWidget *linkButton = gtk_link_button_new("http://example.com/");
     GtkWidget *menuBar = gtk_menu_bar_new();
     GtkWidget *menuBarItem = gtk_menu_item_new();
     GtkWidget *entry = gtk_entry_new();
@@ -939,187 +939,187 @@ nsLookAndFeel::EnsureInit()
     style = GetStyleContext(MOZ_GTK_TEXT_VIEW);
     gtk_style_context_get_background_color(style, GTK_STATE_FLAG_NORMAL,
                                            &bgColor);
 
     style = GetStyleContext(MOZ_GTK_TEXT_VIEW_TEXT);
     gtk_style_context_get_background_color(style, GTK_STATE_FLAG_NORMAL,
                                            &color);
     ApplyColorOver(color, &bgColor);
-    sMozFieldBackground = GDK_RGBA_TO_NS_RGBA(bgColor);
+    mMozFieldBackground = GDK_RGBA_TO_NS_RGBA(bgColor);
     gtk_style_context_get_color(style, GTK_STATE_FLAG_NORMAL, &color);
-    sMozFieldText = GDK_RGBA_TO_NS_RGBA(color);
+    mMozFieldText = GDK_RGBA_TO_NS_RGBA(color);
 
     // Selected text and background
     gtk_style_context_get_background_color(style,
         static_cast<GtkStateFlags>(GTK_STATE_FLAG_FOCUSED|GTK_STATE_FLAG_SELECTED),
         &color);
-    sTextSelectedBackground = GDK_RGBA_TO_NS_RGBA(color);
+    mTextSelectedBackground = GDK_RGBA_TO_NS_RGBA(color);
     gtk_style_context_get_color(style,
         static_cast<GtkStateFlags>(GTK_STATE_FLAG_FOCUSED|GTK_STATE_FLAG_SELECTED),
         &color);
-    sTextSelectedText = GDK_RGBA_TO_NS_RGBA(color);
+    mTextSelectedText = GDK_RGBA_TO_NS_RGBA(color);
 
     // Button text color
     style = GetStyleContext(MOZ_GTK_BUTTON);
     {
         GtkStyleContext* labelStyle = CreateStyleForWidget(labelWidget, style);
 
         GetSystemFontInfo(labelStyle, &mButtonFontName, &mButtonFontStyle);
 
         gtk_style_context_get_border_color(style, GTK_STATE_FLAG_NORMAL, &color);
-        sButtonDefault = GDK_RGBA_TO_NS_RGBA(color);
+        mButtonDefault = GDK_RGBA_TO_NS_RGBA(color);
         gtk_style_context_get_color(labelStyle, GTK_STATE_FLAG_NORMAL, &color);
-        sButtonText = GDK_RGBA_TO_NS_RGBA(color);
+        mButtonText = GDK_RGBA_TO_NS_RGBA(color);
         gtk_style_context_get_color(labelStyle, GTK_STATE_FLAG_PRELIGHT, &color);
-        sButtonHoverText = GDK_RGBA_TO_NS_RGBA(color);
+        mButtonHoverText = GDK_RGBA_TO_NS_RGBA(color);
         gtk_style_context_get_background_color(style, GTK_STATE_FLAG_PRELIGHT,
                                                &color);
-        sButtonHoverFace = GDK_RGBA_TO_NS_RGBA(color);
+        mButtonHoverFace = GDK_RGBA_TO_NS_RGBA(color);
         g_object_unref(labelStyle);
     }
 
     // Combobox text color
     style = GetStyleContext(MOZ_GTK_COMBOBOX_ENTRY_TEXTAREA);
     gtk_style_context_get_color(style, GTK_STATE_FLAG_NORMAL, &color);
-    sComboBoxText = GDK_RGBA_TO_NS_RGBA(color);
+    mComboBoxText = GDK_RGBA_TO_NS_RGBA(color);
 
     // Menubar text and hover text colors    
     style = GetStyleContext(MOZ_GTK_MENUBARITEM);
     gtk_style_context_get_color(style, GTK_STATE_FLAG_NORMAL, &color);
-    sMenuBarText = GDK_RGBA_TO_NS_RGBA(color);
+    mMenuBarText = GDK_RGBA_TO_NS_RGBA(color);
     gtk_style_context_get_color(style, GTK_STATE_FLAG_PRELIGHT, &color);
-    sMenuBarHoverText = GDK_RGBA_TO_NS_RGBA(color);
+    mMenuBarHoverText = GDK_RGBA_TO_NS_RGBA(color);
 
     // GTK's guide to fancy odd row background colors:
     // 1) Check if a theme explicitly defines an odd row color
     // 2) If not, check if it defines an even row color, and darken it
     //    slightly by a hardcoded value (gtkstyle.c)
     // 3) If neither are defined, take the base background color and
     //    darken that by a hardcoded value
     style = GetStyleContext(MOZ_GTK_TREEVIEW);
 
     // Get odd row background color
     gtk_style_context_save(style);
     gtk_style_context_add_region(style, GTK_STYLE_REGION_ROW, GTK_REGION_ODD);
     gtk_style_context_get_background_color(style, GTK_STATE_FLAG_NORMAL, &color);
-    sOddCellBackground = GDK_RGBA_TO_NS_RGBA(color);
+    mOddCellBackground = GDK_RGBA_TO_NS_RGBA(color);
     gtk_style_context_restore(style);
 
     // GtkFrame has a "border" subnode on which Adwaita draws the border.
     // Some themes do not draw on this node but draw a border on the widget
     // root node, so check the root node if no border is found on the border
     // node.
     style = GetStyleContext(MOZ_GTK_FRAME_BORDER);
     bool themeUsesColors =
-        GetBorderColors(style, &sFrameOuterLightBorder, &sFrameInnerDarkBorder);
+        GetBorderColors(style, &mFrameOuterLightBorder, &mFrameInnerDarkBorder);
     if (!themeUsesColors) {
         style = GetStyleContext(MOZ_GTK_FRAME);
-        GetBorderColors(style, &sFrameOuterLightBorder, &sFrameInnerDarkBorder);
+        GetBorderColors(style, &mFrameOuterLightBorder, &mFrameInnerDarkBorder);
     }
 
     // GtkInfoBar
     // TODO - Use WidgetCache for it?
     GtkWidget* infoBar = gtk_info_bar_new();
     GtkWidget* infoBarContent = gtk_info_bar_get_content_area(GTK_INFO_BAR(infoBar));
     GtkWidget* infoBarLabel = gtk_label_new(nullptr);
     gtk_container_add(GTK_CONTAINER(parent), infoBar);
     gtk_container_add(GTK_CONTAINER(infoBarContent), infoBarLabel);
     style = gtk_widget_get_style_context(infoBarLabel);
     gtk_style_context_add_class(style, GTK_STYLE_CLASS_INFO);
     gtk_style_context_get_color(style, GTK_STATE_FLAG_NORMAL, &color);
-    sInfoBarText = GDK_RGBA_TO_NS_RGBA(color);
+    mInfoBarText = GDK_RGBA_TO_NS_RGBA(color);
     // Some themes have a unified menu bar, and support window dragging on it
     gboolean supports_menubar_drag = FALSE;
     GParamSpec *param_spec =
         gtk_widget_class_find_style_property(GTK_WIDGET_GET_CLASS(menuBar),
                                              "window-dragging");
     if (param_spec) {
         if (g_type_is_a(G_PARAM_SPEC_VALUE_TYPE(param_spec), G_TYPE_BOOLEAN)) {
             gtk_widget_style_get(menuBar,
                                  "window-dragging", &supports_menubar_drag,
                                  nullptr);
         }
     }
-    sMenuSupportsDrag = supports_menubar_drag;
+    mMenuSupportsDrag = supports_menubar_drag;
 
     if (gtk_check_version(3, 12, 0) == nullptr) {
         // TODO: It returns wrong color for themes which
         // sets link color for GtkLabel only as we query
         // GtkLinkButton style here.
         style = gtk_widget_get_style_context(linkButton);
         gtk_style_context_get_color(style, GTK_STATE_FLAG_LINK, &color);
-        sNativeHyperLinkText = GDK_RGBA_TO_NS_RGBA(color);
+        mNativeHyperLinkText = GDK_RGBA_TO_NS_RGBA(color);
     } else {
         colorValuePtr = nullptr;
         gtk_widget_style_get(linkButton, "link-color", &colorValuePtr, nullptr);
         if (colorValuePtr) {
             colorValue = *colorValuePtr; // we can't pass deref pointers to GDK_COLOR_TO_NS_RGB
-            sNativeHyperLinkText = GDK_COLOR_TO_NS_RGB(colorValue);
+            mNativeHyperLinkText = GDK_COLOR_TO_NS_RGB(colorValue);
             gdk_color_free(colorValuePtr);
         } else {
-            sNativeHyperLinkText = NS_RGB(0x00,0x00,0xEE);
+            mNativeHyperLinkText = NS_RGB(0x00,0x00,0xEE);
         }
     }
 
     // invisible character styles
     guint value;
     g_object_get (entry, "invisible-char", &value, nullptr);
-    sInvisibleCharacter = char16_t(value);
+    mInvisibleCharacter = char16_t(value);
 
     // caret styles
     gtk_widget_style_get(entry,
-                         "cursor-aspect-ratio", &sCaretRatio,
+                         "cursor-aspect-ratio", &mCaretRatio,
                          nullptr);
 
     GetSystemFontInfo(gtk_widget_get_style_context(entry),
                       &mFieldFontName, &mFieldFontStyle);
 
     gtk_widget_destroy(window);
     g_object_unref(labelWidget);
 
     // Require GTK 3.20 for client-side decoration support.
-    sCSDAvailable = gtk_check_version(3, 20, 0) == nullptr;
-    if (sCSDAvailable) {
-        sCSDAvailable =
+    mCSDAvailable = gtk_check_version(3, 20, 0) == nullptr;
+    if (mCSDAvailable) {
+        mCSDAvailable =
             mozilla::Preferences::GetBool("widget.allow-client-side-decoration",
                                           false);
     }
 
     // We need to initialize whole CSD config explicitly because it's queried
     // as -moz-gtk* media features.
-    sCSDCloseButton = false;
-    sCSDMaximizeButton = false;
-    sCSDMinimizeButton = false;
+    mCSDCloseButton = false;
+    mCSDMaximizeButton = false;
+    mCSDMinimizeButton = false;
 
-    if (sCSDAvailable) {
+    if (mCSDAvailable) {
         static auto sGtkHeaderBarGetDecorationLayoutPtr =
           (const gchar* (*)(GtkWidget*))
           dlsym(RTLD_DEFAULT, "gtk_header_bar_get_decoration_layout");
 
         GtkWidget* headerBar = GetWidget(MOZ_GTK_HEADER_BAR);
         const gchar* decorationLayout =
             sGtkHeaderBarGetDecorationLayoutPtr(headerBar);
         if (!decorationLayout) {
             g_object_get(settings, "gtk-decoration-layout", &decorationLayout,
                          nullptr);
         }
 
         if (decorationLayout) {
-            sCSDCloseButton = (strstr(decorationLayout, "close") != nullptr);
-            sCSDMaximizeButton = (strstr(decorationLayout, "maximize") != nullptr);
-            sCSDMinimizeButton = (strstr(decorationLayout, "minimize") != nullptr);
+            mCSDCloseButton = (strstr(decorationLayout, "close") != nullptr);
+            mCSDMaximizeButton = (strstr(decorationLayout, "maximize") != nullptr);
+            mCSDMinimizeButton = (strstr(decorationLayout, "minimize") != nullptr);
         }
     }
 }
 
 // virtual
 char16_t
 nsLookAndFeel::GetPasswordCharacterImpl()
 {
     EnsureInit();
-    return sInvisibleCharacter;
+    return mInvisibleCharacter;
 }
 
 bool
 nsLookAndFeel::GetEchoPasswordImpl() {
     return false;
 }
--- a/widget/gtk/nsLookAndFeel.h
+++ b/widget/gtk/nsLookAndFeel.h
@@ -27,17 +27,17 @@ public:
     virtual nsresult GetFloatImpl(FloatID aID, float &aResult);
     virtual bool GetFontImpl(FontID aID, nsString& aFontName,
                              gfxFontStyle& aFontStyle,
                              float aDevPixPerCSSPixel);
 
     virtual char16_t GetPasswordCharacterImpl();
     virtual bool GetEchoPasswordImpl();
 
-    bool IsCSDAvailable() const { return sCSDAvailable; }
+    bool IsCSDAvailable() const { return mCSDAvailable; }
 
 protected:
 
     // Cached fonts
     bool mDefaultFontCached;
     bool mButtonFontCached;
     bool mFieldFontCached;
     bool mMenuFontCached;
@@ -46,51 +46,51 @@ protected:
     nsString mFieldFontName;
     nsString mMenuFontName;
     gfxFontStyle mDefaultFontStyle;
     gfxFontStyle mButtonFontStyle;
     gfxFontStyle mFieldFontStyle;
     gfxFontStyle mMenuFontStyle;
 
     // Cached colors
-    nscolor sInfoBackground;
-    nscolor sInfoText;
-    nscolor sMenuBackground;
-    nscolor sMenuBarText;
-    nscolor sMenuBarHoverText;
-    nscolor sMenuText;
-    nscolor sMenuTextInactive;
-    nscolor sMenuHover;
-    nscolor sMenuHoverText;
-    nscolor sButtonDefault;
-    nscolor sButtonText;
-    nscolor sButtonHoverText;
-    nscolor sButtonHoverFace;
-    nscolor sFrameOuterLightBorder;
-    nscolor sFrameInnerDarkBorder;
-    nscolor sOddCellBackground;
-    nscolor sNativeHyperLinkText;
-    nscolor sComboBoxText;
-    nscolor sComboBoxBackground;
-    nscolor sMozFieldText;
-    nscolor sMozFieldBackground;
-    nscolor sMozWindowText;
-    nscolor sMozWindowBackground;
-    nscolor sMozWindowActiveBorder;
-    nscolor sMozWindowInactiveBorder;
-    nscolor sMozWindowInactiveCaption;
-    nscolor sTextSelectedText;
-    nscolor sTextSelectedBackground;
-    nscolor sMozScrollbar;
-    nscolor sInfoBarText;
-    char16_t sInvisibleCharacter;
-    float   sCaretRatio;
-    bool    sMenuSupportsDrag;
-    bool    sCSDAvailable;
-    bool    sCSDMaximizeButton;
-    bool    sCSDMinimizeButton;
-    bool    sCSDCloseButton;
+    nscolor mInfoBackground;
+    nscolor mInfoText;
+    nscolor mMenuBackground;
+    nscolor mMenuBarText;
+    nscolor mMenuBarHoverText;
+    nscolor mMenuText;
+    nscolor mMenuTextInactive;
+    nscolor mMenuHover;
+    nscolor mMenuHoverText;
+    nscolor mButtonDefault;
+    nscolor mButtonText;
+    nscolor mButtonHoverText;
+    nscolor mButtonHoverFace;
+    nscolor mFrameOuterLightBorder;
+    nscolor mFrameInnerDarkBorder;
+    nscolor mOddCellBackground;
+    nscolor mNativeHyperLinkText;
+    nscolor mComboBoxText;
+    nscolor mComboBoxBackground;
+    nscolor mMozFieldText;
+    nscolor mMozFieldBackground;
+    nscolor mMozWindowText;
+    nscolor mMozWindowBackground;
+    nscolor mMozWindowActiveBorder;
+    nscolor mMozWindowInactiveBorder;
+    nscolor mMozWindowInactiveCaption;
+    nscolor mTextSelectedText;
+    nscolor mTextSelectedBackground;
+    nscolor mMozScrollbar;
+    nscolor mInfoBarText;
+    char16_t mInvisibleCharacter;
+    float   mCaretRatio;
+    bool    mMenuSupportsDrag;
+    bool    mCSDAvailable;
+    bool    mCSDMaximizeButton;
+    bool    mCSDMinimizeButton;
+    bool    mCSDCloseButton;
     bool    mInitialized;
 
     void EnsureInit();
 };
 
 #endif