Bug 1478385: Fix confusion in GetCachedWidgetBorder. r=karlt
authorEmilio Cobos Álvarez <emilio@crisal.io>
Wed, 25 Jul 2018 16:55:38 +0200
changeset 428580 a7ad6a70635a09c4c12aef8219001f9c92949a63
parent 428579 2254ac69fc8075d034958376d8a7760f903866f4
child 428581 d937887ddcb1f7e2e7ae417b2cefde9878c6769b
push id34337
push userncsoregi@mozilla.com
push dateThu, 26 Jul 2018 21:58:45 +0000
treeherdermozilla-central@8f2f847b2f9d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskarlt
bugs1478385
milestone63.0a1
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
Bug 1478385: Fix confusion in GetCachedWidgetBorder. r=karlt aWidgetType is a NS_THEME_* constant. What this code is comparing is not. This was exposed by a patch of mine converting -moz-appearance to be an enum class. MozReview-Commit-ID: 9BsbYk04vop
widget/gtk/nsNativeThemeGTK.cpp
--- a/widget/gtk/nsNativeThemeGTK.cpp
+++ b/widget/gtk/nsNativeThemeGTK.cpp
@@ -1273,17 +1273,17 @@ nsNativeThemeGTK::GetCachedWidgetBorder(
     uint8_t cacheIndex = gtkWidgetType / 8;
     uint8_t cacheBit = 1u << (gtkWidgetType % 8);
 
     if (mBorderCacheValid[cacheIndex] & cacheBit) {
       *aResult = mBorderCache[gtkWidgetType];
     } else {
       moz_gtk_get_widget_border(gtkWidgetType, &aResult->left, &aResult->top,
                                 &aResult->right, &aResult->bottom, aDirection);
-      if (aWidgetType != MOZ_GTK_DROPDOWN) { // depends on aDirection
+      if (gtkWidgetType != MOZ_GTK_DROPDOWN) { // depends on aDirection
         mBorderCacheValid[cacheIndex] |= cacheBit;
         mBorderCache[gtkWidgetType] = *aResult;
       }
     }
   }
 }
 
 LayoutDeviceIntMargin