summaryrefslogtreecommitdiff
path: root/layout/xul/nsSliderFrame.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'layout/xul/nsSliderFrame.cpp')
-rw-r--r--layout/xul/nsSliderFrame.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/layout/xul/nsSliderFrame.cpp b/layout/xul/nsSliderFrame.cpp
index b98ac4a03f..812c233fc1 100644
--- a/layout/xul/nsSliderFrame.cpp
+++ b/layout/xul/nsSliderFrame.cpp
@@ -664,7 +664,11 @@ nsSliderFrame::GetScrollToClick()
return false;
}
+#ifdef XP_MACOSX
+ return true;
+#else
return false;
+#endif
}
nsIFrame*
@@ -1174,8 +1178,8 @@ nsSliderFrame::ShouldScrollToClickForEvent(WidgetGUIEvent* aEvent)
return false;
}
-#if defined(MOZ_WIDGET_GTK)
- // On Linux, clicking the scrollbar thumb should never scroll to click.
+#if defined(XP_MACOSX) || defined(MOZ_WIDGET_GTK)
+ // On Mac and Linux, clicking the scrollbar thumb should never scroll to click.
if (IsEventOverThumb(aEvent)) {
return false;
}
@@ -1183,7 +1187,11 @@ nsSliderFrame::ShouldScrollToClickForEvent(WidgetGUIEvent* aEvent)
WidgetMouseEvent* mouseEvent = aEvent->AsMouseEvent();
if (mouseEvent->button == WidgetMouseEvent::eLeftButton) {
+#ifdef XP_MACOSX
+ bool invertPref = mouseEvent->IsAlt();
+#else
bool invertPref = mouseEvent->IsShift();
+#endif
return GetScrollToClick() != invertPref;
}