Loading widget/cocoa/nsLookAndFeel.mm +12 −0 Original line number Diff line number Diff line Loading @@ -624,6 +624,12 @@ bool nsLookAndFeel::NativeGetFont(FontID aID, nsString& aFontName, gfxFontStyle& name:@"AppleAquaScrollBarVariantChanged" object:nil suspensionBehavior:NSNotificationSuspensionBehaviorDeliverImmediately]; [NSDistributedNotificationCenter.defaultCenter addObserver:self selector:@selector(cachedValuesChanged) name:@"com.apple.KeyboardUIModeDidChange" object:nil suspensionBehavior:NSNotificationSuspensionBehaviorDeliverImmediately]; [MOZGlobalAppearance.sharedInstance addObserver:self forKeyPath:@"effectiveAppearance" Loading Loading @@ -661,4 +667,10 @@ bool nsLookAndFeel::NativeGetFont(FontID aID, nsString& aFontName, gfxFontStyle& LookAndFeel::NotifyChangedAllWindows(widget::ThemeChangeKind::Style); } - (void)cachedValuesChanged { // We only need to re-cache (and broadcast) updated LookAndFeel values, so that they're up-to-date // the next time they're queried. No further change handling is needed. // TODO: Add a change hint for this which avoids the unnecessary media query invalidation. LookAndFeel::NotifyChangedAllWindows(widget::ThemeChangeKind::MediaQueriesOnly); } @end Loading
widget/cocoa/nsLookAndFeel.mm +12 −0 Original line number Diff line number Diff line Loading @@ -624,6 +624,12 @@ bool nsLookAndFeel::NativeGetFont(FontID aID, nsString& aFontName, gfxFontStyle& name:@"AppleAquaScrollBarVariantChanged" object:nil suspensionBehavior:NSNotificationSuspensionBehaviorDeliverImmediately]; [NSDistributedNotificationCenter.defaultCenter addObserver:self selector:@selector(cachedValuesChanged) name:@"com.apple.KeyboardUIModeDidChange" object:nil suspensionBehavior:NSNotificationSuspensionBehaviorDeliverImmediately]; [MOZGlobalAppearance.sharedInstance addObserver:self forKeyPath:@"effectiveAppearance" Loading Loading @@ -661,4 +667,10 @@ bool nsLookAndFeel::NativeGetFont(FontID aID, nsString& aFontName, gfxFontStyle& LookAndFeel::NotifyChangedAllWindows(widget::ThemeChangeKind::Style); } - (void)cachedValuesChanged { // We only need to re-cache (and broadcast) updated LookAndFeel values, so that they're up-to-date // the next time they're queried. No further change handling is needed. // TODO: Add a change hint for this which avoids the unnecessary media query invalidation. LookAndFeel::NotifyChangedAllWindows(widget::ThemeChangeKind::MediaQueriesOnly); } @end