Bug 1491580 - Use NSWorkspaceAccessibilityDisplayOptionsDidChangeNotification only for MacOSX 10.10 or later versions. r=mstange

Differential Revision: https://phabricator.services.mozilla.com/D5968

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Hiroyuki Ikezoe 2018-09-16 05:04:18 +00:00
Родитель 737bd284b4
Коммит 235406a619
1 изменённых файлов: 12 добавлений и 4 удалений

Просмотреть файл

@ -3119,6 +3119,10 @@ nsChildView::SetPrefersReducedMotionOverrideForTest(bool aValue)
// it's set in the parent process.
LookAndFeel::SetIntCache(lookAndFeelCache);
if (!nsCocoaFeatures::IsAtLeastVersion(10, 10)) {
return NS_ERROR_FAILURE;
}
[[NSNotificationCenter defaultCenter]
postNotificationName: NSWorkspaceAccessibilityDisplayOptionsDidChangeNotification
object:nil];
@ -3370,10 +3374,14 @@ NSEvent* gLastDragMouseDownEvent = nil;
selector:@selector(systemMetricsChanged)
name:NSSystemColorsDidChangeNotification
object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(systemMetricsChanged)
name:NSWorkspaceAccessibilityDisplayOptionsDidChangeNotification
object:nil];
if (nsCocoaFeatures::IsAtLeastVersion(10, 10)) {
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(systemMetricsChanged)
name:NSWorkspaceAccessibilityDisplayOptionsDidChangeNotification
object:nil];
}
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(scrollbarSystemMetricChanged)
name:NSPreferredScrollerStyleDidChangeNotification