Bug 1408701 - Ensure that we continue to show dark scrollbar thumbs on macOS 10.13 when scrollbars are always displayed. r=mstange, a=ritu
authorStephen A Pohl <spohl.mozilla.bugs@gmail.com>
Tue, 17 Oct 2017 14:35:31 -0400
changeset 432607 adc0384c565aae18fd8b2a669363ac27bd3a6676
parent 432606 5f8523ca22a5567570ca8d173579ab80212b6190
child 432608 1d56d3922195efcabe9807b8ec0ea216397f90b4
push id8003
push userryanvm@gmail.com
push dateWed, 18 Oct 2017 22:23:15 +0000
treeherdermozilla-beta@adc0384c565a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmstange, ritu
bugs1408701
milestone57.0
Bug 1408701 - Ensure that we continue to show dark scrollbar thumbs on macOS 10.13 when scrollbars are always displayed. r=mstange, a=ritu
widget/cocoa/nsNativeThemeCocoa.mm
--- a/widget/cocoa/nsNativeThemeCocoa.mm
+++ b/widget/cocoa/nsNativeThemeCocoa.mm
@@ -2773,17 +2773,18 @@ nsNativeThemeCocoa::DrawWidgetBackground
           macRect.size.width -= 4;
         }
       }
       const BOOL isOnTopOfDarkBackground = IsDarkBackground(aFrame);
       NSMutableDictionary* options = [NSMutableDictionary dictionaryWithObjectsAndKeys:
         (isOverlay ? @"kCUIWidgetOverlayScrollBar" : @"scrollbar"), @"widget",
         (isSmall ? @"small" : @"regular"), @"size",
         (isHorizontal ? @"kCUIOrientHorizontal" : @"kCUIOrientVertical"), @"kCUIOrientationKey",
-        (isOnTopOfDarkBackground ? @"kCUIVariantWhite" : @""), @"kCUIVariantKey",
+        (isOverlay && isOnTopOfDarkBackground ? @"kCUIVariantWhite" : @""),
+          @"kCUIVariantKey",
         [NSNumber numberWithBool:YES], @"indiconly",
         [NSNumber numberWithBool:YES], @"kCUIThumbProportionKey",
         [NSNumber numberWithBool:YES], @"is.flipped",
         nil];
       if (isRolledOver) {
         [options setObject:@"rollover" forKey:@"state"];
       }
       RenderWithCoreUI(macRect, cgContext, options, true);