Backed out changeset 349f51081127 (bug 1403690)
authorSebastian Hengst <archaeopteryx@coole-files.de>
Mon, 23 Oct 2017 18:21:09 +0200
changeset 387763 9c19645d8078c70eb7d054ecf30fdfa00adfd186
parent 387762 888af9141ff82c22805a59e1e85425528ab20565
child 387764 087a3875d2855c6f8d29a402f5f8a8aef431460f
push id96497
push userarchaeopteryx@coole-files.de
push dateTue, 24 Oct 2017 09:57:53 +0000
treeherdermozilla-inbound@7de3cc48b5b1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1403690
milestone58.0a1
backs out349f51081127674758ef0f272a2cc3b2de355c5c
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset 349f51081127 (bug 1403690)
widget/gtk/nsLookAndFeel.cpp
widget/gtk/nsLookAndFeel.h
--- a/widget/gtk/nsLookAndFeel.cpp
+++ b/widget/gtk/nsLookAndFeel.cpp
@@ -48,16 +48,22 @@ using mozilla::LookAndFeel;
 nsLookAndFeel::nsLookAndFeel()
     : nsXPLookAndFeel(),
       mDefaultFontCached(false), mButtonFontCached(false),
       mFieldFontCached(false), mMenuFontCached(false),
       mInitialized(false)
 {
 }
 
+void
+nsLookAndFeel::NativeInit()
+{
+    EnsureInit();
+}
+
 nsLookAndFeel::~nsLookAndFeel()
 {
 }
 
 // Modifies color |*aDest| as if a pattern of color |aSource| was painted with
 // CAIRO_OPERATOR_OVER to a surface with color |*aDest|.
 static void
 ApplyColorOver(const GdkRGBA& aSource, GdkRGBA* aDest) {
@@ -209,36 +215,16 @@ GetBorderColors(GtkStyleContext* aContex
 {
     GdkRGBA lightColor, darkColor;
     bool ret = GetBorderColors(aContext, &lightColor, &darkColor);
     *aLightColor = GDK_RGBA_TO_NS_RGBA(lightColor);
     *aDarkColor = GDK_RGBA_TO_NS_RGBA(darkColor);
     return ret;
 }
 
-void
-nsLookAndFeel::NativeInit()
-{
-    EnsureInit();
-}
-
-void
-nsLookAndFeel::RefreshImpl()
-{
-    nsXPLookAndFeel::RefreshImpl();
-    moz_gtk_refresh();
-
-    mDefaultFontCached = false;
-    mButtonFontCached = false;
-    mFieldFontCached = false;
-    mMenuFontCached = false;
-
-    mInitialized = false;
-}
-
 nsresult
 nsLookAndFeel::NativeGetColor(ColorID aID, nscolor& aColor)
 {
     EnsureInit();
 
     nsresult res = NS_OK;
 
     switch (aID) {
@@ -1108,12 +1094,26 @@ nsLookAndFeel::EnsureInit()
 // virtual
 char16_t
 nsLookAndFeel::GetPasswordCharacterImpl()
 {
     EnsureInit();
     return sInvisibleCharacter;
 }
 
+void
+nsLookAndFeel::RefreshImpl()
+{
+    nsXPLookAndFeel::RefreshImpl();
+    moz_gtk_refresh();
+
+    mDefaultFontCached = false;
+    mButtonFontCached = false;
+    mFieldFontCached = false;
+    mMenuFontCached = false;
+
+    mInitialized = false;
+}
+
 bool
 nsLookAndFeel::GetEchoPasswordImpl() {
     return false;
 }
--- a/widget/gtk/nsLookAndFeel.h
+++ b/widget/gtk/nsLookAndFeel.h
@@ -15,25 +15,25 @@
 struct _GtkStyle;
 
 class nsLookAndFeel final : public nsXPLookAndFeel
 {
 public:
     nsLookAndFeel();
     virtual ~nsLookAndFeel();
 
+    virtual nsresult NativeGetColor(ColorID aID, nscolor &aResult);
     virtual void NativeInit() final;
-    virtual void RefreshImpl();
-    virtual nsresult NativeGetColor(ColorID aID, nscolor &aResult);
     virtual nsresult GetIntImpl(IntID aID, int32_t &aResult);
     virtual nsresult GetFloatImpl(FloatID aID, float &aResult);
     virtual bool GetFontImpl(FontID aID, nsString& aFontName,
                              gfxFontStyle& aFontStyle,
                              float aDevPixPerCSSPixel);
 
+    virtual void RefreshImpl();
     virtual char16_t GetPasswordCharacterImpl();
     virtual bool GetEchoPasswordImpl();
 
     bool IsCSDAvailable() const { return sCSDAvailable; }
 
 protected:
 
     // Cached fonts