Bug 1478385: Fix confusion in GetCachedWidgetBorder. r?karlt
aWidgetType is a NS_THEME_* constant. What this code is comparing is not.
Is this comparison needed at all?
This was exposed by a patch of mine converting -moz-appearance to be an enum
class.
MozReview-Commit-ID: 9BsbYk04vop
--- 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