Wrong NSVisualEffectMaterial used for exit full screen overlay in dark mode.
authortimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 6 Jun 2018 16:42:05 +0000 (16:42 +0000)
committertimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 6 Jun 2018 16:42:05 +0000 (16:42 +0000)
https://bugs.webkit.org/show_bug.cgi?id=186350
rdar://problem/39135535

Reviewed by Anders Carlsson.

* platform/mac/WebCoreFullScreenPlaceholderView.mm:
(-[WebCoreFullScreenPlaceholderView initWithFrame:]):
Use the NSVisualEffectMaterialFullScreenUI on macOS 10.14 and don't
set an explicit NSAppearance.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@232546 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/mac/WebCoreFullScreenPlaceholderView.mm

index 58c67e4..e78e583 100644 (file)
@@ -1,3 +1,17 @@
+2018-06-06  Timothy Hatcher  <timothy@apple.com>
+
+        Wrong NSVisualEffectMaterial used for exit full screen overlay in dark mode.
+
+        https://bugs.webkit.org/show_bug.cgi?id=186350
+        rdar://problem/39135535
+
+        Reviewed by Anders Carlsson.
+
+        * platform/mac/WebCoreFullScreenPlaceholderView.mm:
+        (-[WebCoreFullScreenPlaceholderView initWithFrame:]):
+        Use the NSVisualEffectMaterialFullScreenUI on macOS 10.14 and don't
+        set an explicit NSAppearance.
+
 2018-06-06  Jer Noble  <jer.noble@apple.com>
 
         Regions outside of the fullscreen window are exposed during zoom operations
index b1faeb5..760f58e 100644 (file)
@@ -55,9 +55,15 @@ using WebCore::clickToExitFullScreenText;
     _effectView.get().autoresizingMask = NSViewWidthSizable | NSViewHeightSizable;
     _effectView.get().blendingMode = NSVisualEffectBlendingModeWithinWindow;
     _effectView.get().hidden = YES;
-    _effectView.get().material = NSVisualEffectMaterialLight;
     _effectView.get().state = NSVisualEffectStateActive;
+
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
+    _effectView.get().material = NSVisualEffectMaterialPopover;
+#else
+    _effectView.get().material = NSVisualEffectMaterialLight;
     _effectView.get().appearance = [NSAppearance appearanceNamed:NSAppearanceNameVibrantLight];
+#endif
+
     [self addSubview:_effectView.get()];
 
     _exitWarning = adoptNS([[NSTextField alloc] initWithFrame:NSZeroRect]);