Bug 1442695 - Remove unused GetScrollbarPressStates method;r=spohl
MozReview-Commit-ID: GA9kzatUKfp
--- 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()));