Bug 1461635 - Enforce a minimum widget size of 1x1 for toolbar separators. r=spohl, a=RyanVM
authorMarkus Stange <mstange@themasta.com>
Wed, 23 May 2018 11:55:41 -0400
changeset 473457 37d3889a39a9672bf365b7ea04c34f6d2fd269ba
parent 473456 bb4d7af3e4ab0ff4e327bc9975d1671009e9d6c5
child 473458 df95dfb226bc11073ae15883729aeb39e7fffade
push id1728
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:12:27 +0000
treeherdermozilla-release@c296fde26f5f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersspohl, RyanVM
bugs1461635
milestone61.0
Bug 1461635 - Enforce a minimum widget size of 1x1 for toolbar separators. r=spohl, a=RyanVM MozReview-Commit-ID: Gc5TC5DGUI
widget/cocoa/nsNativeThemeCocoa.mm
--- a/widget/cocoa/nsNativeThemeCocoa.mm
+++ b/widget/cocoa/nsNativeThemeCocoa.mm
@@ -4094,16 +4094,22 @@ nsNativeThemeCocoa::GetMinimumWidgetSize
     case NS_THEME_PROGRESSBAR:
     {
       SInt32 barHeight = 0;
       ::GetThemeMetric(kThemeMetricNormalProgressBarThickness, &barHeight);
       aResult->SizeTo(0, barHeight);
       break;
     }
 
+    case NS_THEME_SEPARATOR:
+    {
+      aResult->SizeTo(1, 1);
+      break;
+    }
+
     case NS_THEME_TREETWISTY:
     case NS_THEME_TREETWISTYOPEN:
     {
       SInt32 twistyHeight = 0, twistyWidth = 0;
       ::GetThemeMetric(kThemeMetricDisclosureButtonWidth, &twistyWidth);
       ::GetThemeMetric(kThemeMetricDisclosureButtonHeight, &twistyHeight);
       aResult->SizeTo(twistyWidth, twistyHeight);
       *aIsOverridable = false;