Bug 1673055 - Remove now-unused Tooltip widget drawing. r=haik
authorMarkus Stange <mstange.moz@gmail.com>
Mon, 26 Oct 2020 23:17:32 +0000
changeset 554700 673508a5981eb2f6b5f80f7acacef8d295cb6917
parent 554699 fc9d24f6ffbdfdeb213e97e9fa3d276b21dbf687
child 554701 53a3638bf4ef14d017e8c8877135f11af794fbc4
push id37898
push userabutkovits@mozilla.com
push dateWed, 28 Oct 2020 09:24:21 +0000
treeherdermozilla-central@83bf4fd3b1fb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershaik
bugs1673055
milestone84.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 1673055 - Remove now-unused Tooltip widget drawing. r=haik Differential Revision: https://phabricator.services.mozilla.com/D94634
widget/cocoa/nsNativeThemeCocoa.h
widget/cocoa/nsNativeThemeCocoa.mm
--- a/widget/cocoa/nsNativeThemeCocoa.h
+++ b/widget/cocoa/nsNativeThemeCocoa.h
@@ -200,21 +200,20 @@ class nsNativeThemeCocoa : private nsNat
 
   using ScrollbarParams = mozilla::widget::ScrollbarParams;
 
   enum Widget : uint8_t {
     eColorFill,      // mozilla::gfx::sRGBColor
     eMenuIcon,       // MenuIconParams
     eMenuItem,       // MenuItemParams
     eMenuSeparator,  // MenuItemParams
-    eTooltip,
-    eCheckbox,  // CheckboxOrRadioParams
-    eRadio,     // CheckboxOrRadioParams
-    eButton,    // ButtonParams
-    eDropdown,  // DropdownParams
+    eCheckbox,       // CheckboxOrRadioParams
+    eRadio,          // CheckboxOrRadioParams
+    eButton,         // ButtonParams
+    eDropdown,       // DropdownParams
     eFocusOutline,
     eSpinButtons,     // SpinButtonParams
     eSpinButtonUp,    // SpinButtonParams
     eSpinButtonDown,  // SpinButtonParams
     eSegment,         // SegmentParams
     eSeparator,
     eUnifiedToolbar,  // UnifiedToolbarParams
     eToolbar,         // bool
@@ -247,17 +246,16 @@ class nsNativeThemeCocoa : private nsNat
       return WidgetInfo(Widget::eMenuIcon, aParams);
     }
     static WidgetInfo MenuItem(const MenuItemParams& aParams) {
       return WidgetInfo(Widget::eMenuItem, aParams);
     }
     static WidgetInfo MenuSeparator(const MenuItemParams& aParams) {
       return WidgetInfo(Widget::eMenuSeparator, aParams);
     }
-    static WidgetInfo Tooltip() { return WidgetInfo(Widget::eTooltip, false); }
     static WidgetInfo Checkbox(const CheckboxOrRadioParams& aParams) {
       return WidgetInfo(Widget::eCheckbox, aParams);
     }
     static WidgetInfo Radio(const CheckboxOrRadioParams& aParams) {
       return WidgetInfo(Widget::eRadio, aParams);
     }
     static WidgetInfo Button(const ButtonParams& aParams) {
       return WidgetInfo(Widget::eButton, aParams);
--- a/widget/cocoa/nsNativeThemeCocoa.mm
+++ b/widget/cocoa/nsNativeThemeCocoa.mm
@@ -2363,17 +2363,16 @@ void nsNativeThemeCocoa::DrawResizer(CGC
   drawInfo.direction = kThemeGrowRight | kThemeGrowDown;
   drawInfo.size = kHIThemeGrowBoxSizeNormal;
 
   RenderTransformedHIThemeControl(cgContext, aRect, RenderResizer, &drawInfo, aIsRTL);
 
   NS_OBJC_END_TRY_ABORT_BLOCK;
 }
 
-static const sRGBColor kTooltipBackgroundColor(0.996, 1.000, 0.792, 0.950);
 static const sRGBColor kMultilineTextFieldTopBorderColor(0.4510, 0.4510, 0.4510, 1.0);
 static const sRGBColor kMultilineTextFieldSidesAndBottomBorderColor(0.6, 0.6, 0.6, 1.0);
 static const sRGBColor kListboxTopBorderColor(0.557, 0.557, 0.557, 1.0);
 static const sRGBColor kListBoxSidesAndBottomBorderColor(0.745, 0.745, 0.745, 1.0);
 
 void nsNativeThemeCocoa::DrawMultilineTextField(CGContextRef cgContext, const CGRect& inBoxRect,
                                                 bool aIsFocused) {
   SetCGContextFillColor(cgContext, sRGBColor(1.0, 1.0, 1.0, 1.0));
@@ -2914,21 +2913,16 @@ void nsNativeThemeCocoa::RenderWidget(co
           DrawMenuItem(cgContext, macRect, params);
           break;
         }
         case Widget::eMenuSeparator: {
           MenuItemParams params = aWidgetInfo.Params<MenuItemParams>();
           DrawMenuSeparator(cgContext, macRect, params);
           break;
         }
-        case Widget::eTooltip: {
-          SetCGContextFillColor(cgContext, kTooltipBackgroundColor);
-          CGContextFillRect(cgContext, macRect);
-          break;
-        }
         case Widget::eCheckbox: {
           CheckboxOrRadioParams params = aWidgetInfo.Params<CheckboxOrRadioParams>();
           DrawCheckboxOrRadio(cgContext, true, macRect, params);
           break;
         }
         case Widget::eRadio: {
           CheckboxOrRadioParams params = aWidgetInfo.Params<CheckboxOrRadioParams>();
           DrawCheckboxOrRadio(cgContext, false, macRect, params);