Bug 1442695 - Remove unused GetScrollbarPressStates method;r=spohl
authorBrian Grinstead <bgrinstead@mozilla.com>
Fri, 02 Mar 2018 09:42:55 -0800
changeset 406401 304c6387dab25b59139c20d08fe0f6843b1cbcde
parent 406400 2dfee3d72b6cec00f050e8883527d09d8e7ff637
child 406402 35a457fb6b60cff67b54e3334e97fcc9edeeb263
push id33555
push usercbrindusan@mozilla.com
push dateSat, 03 Mar 2018 09:36:56 +0000
treeherdermozilla-central@9f87ddff4b02 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersspohl
bugs1442695
milestone60.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 1442695 - Remove unused GetScrollbarPressStates method;r=spohl MozReview-Commit-ID: GA9kzatUKfp
widget/cocoa/nsNativeThemeCocoa.h
widget/cocoa/nsNativeThemeCocoa.mm
--- a/widget/cocoa/nsNativeThemeCocoa.h
+++ b/widget/cocoa/nsNativeThemeCocoa.h
@@ -158,18 +158,16 @@ protected:
                       nsIFrame* aFrame, uint8_t aWidgetType);
   void DrawUnifiedToolbar(CGContextRef cgContext, const HIRect& inBoxRect,
                           NSWindow* aWindow);
   void DrawStatusBar(CGContextRef cgContext, const HIRect& inBoxRect,
                      nsIFrame *aFrame);
   void DrawResizer(CGContextRef cgContext, const HIRect& aRect, nsIFrame *aFrame);
 
   // Scrollbars
-  void GetScrollbarPressStates(nsIFrame *aFrame,
-                               mozilla::EventStates aButtonStates[]);
   nsIFrame* GetParentScrollbarFrame(nsIFrame *aFrame);
   bool IsParentScrollbarRolledOver(nsIFrame* aFrame);
 
 private:
   NSButtonCell* mDisclosureButtonCell;
   NSButtonCell* mHelpButtonCell;
   NSButtonCell* mPushButtonCell;
   NSButtonCell* mRadioButtonCell;
--- a/widget/cocoa/nsNativeThemeCocoa.mm
+++ b/widget/cocoa/nsNativeThemeCocoa.mm
@@ -2052,41 +2052,16 @@ nsNativeThemeCocoa::DrawSegment(CGContex
             (isPressed ? @"pressed" : (isActive ? @"normal" : @"inactive")), @"state",
             [NSNumber numberWithBool:isFocused], @"focus",
             CUIControlSizeForCocoaSize(controlSize), @"size",
             [NSNumber numberWithBool:YES], @"is.flipped",
             @"up", @"direction",
             nil]);
 }
 
-void
-nsNativeThemeCocoa::GetScrollbarPressStates(nsIFrame* aFrame,
-                                            EventStates aButtonStates[])
-{
-  static Element::AttrValuesArray attributeValues[] = {
-    &nsGkAtoms::scrollbarUpTop,
-    &nsGkAtoms::scrollbarDownTop,
-    &nsGkAtoms::scrollbarUpBottom,
-    &nsGkAtoms::scrollbarDownBottom,
-    nullptr
-  };
-
-  // Get the state of any scrollbar buttons in our child frames
-  for (nsIFrame *childFrame : aFrame->PrincipalChildList()) {
-    nsIContent *childContent = childFrame->GetContent();
-    if (!childContent || !childContent->IsElement()) continue;
-    int32_t attrIndex =
-      childContent->AsElement()->FindAttrValueIn(kNameSpaceID_None, nsGkAtoms::sbattr,
-                                                 attributeValues, eCaseMatters);
-    if (attrIndex < 0) continue;
-
-    aButtonStates[attrIndex] = GetContentState(childFrame, NS_THEME_BUTTON);
-  }
-}
-
 nsIFrame*
 nsNativeThemeCocoa::GetParentScrollbarFrame(nsIFrame *aFrame)
 {
   // Walk our parents to find a scrollbar frame
   nsIFrame* scrollbarFrame = aFrame;
   do {
     if (scrollbarFrame->IsScrollbarFrame()) break;
   } while ((scrollbarFrame = scrollbarFrame->GetParent()));