gecko-dev/widget/cocoa
Markus Stange a0e9560488 Bug 1370040 - Use the public API -[NSVisualEffectView setMaskImage:] instead of the private API -[NSWindow _cornerMask]. r=spohl
The idea is the following:
Behind-window vibrancy is mostly rendered by the window server. For a given
vibrant region of a window, the window server renders a vibrancy "backdrop",
which is a blurred version of everything that's behind that region, modified
with a color tint and blended in some way. Then it puts our actual window
contents on top of that background.
The backdrop's shape is usually a rectangle. If we don't want it to be a
rectangle, we need to tell the window server about the shape that we want it to
be. We can't just "draw" a different shape in our own rendering, because our
own rendering is merely placed on top of the backdrop - but here we want to
modify the shape of the backdrop itself.

NSVisualEffectView lets us set a mask image on the view. If this view is the
content view of a window, then the view will automatically communicate the mask
image to the window server.

Traditionally, our popup windows have had a ChildView as their content view. If
we now want an NSVisualEffectView to be the content view of the window, then we
need to nest the ChildView inside that NSVisualEffectView.
But this NSVisualEffectView is only needed when the window is vibrant and the
vibrancy backdrop needs to have a certain shape. This is the case for our menus
which need to have rounded corners. If the window transitions to being
non-vibrant, or not needing a special shape, then we can go back to the way our
window's NSView hierarchy has worked traditionally. So we need to reparent
NSViews during those transitions.

MozReview-Commit-ID: Bo2VzjhhR0A

--HG--
extra : rebase_source : 9eb463cc68c16c3b9281b57455330969c5e2642c
2017-11-19 18:38:35 -05:00
..
crashtests
cursors
resources/MainMenu.nib
ComplexTextInputPanel.h
ComplexTextInputPanel.mm
CustomCocoaEvents.h
GfxInfo.h
GfxInfo.mm Bug 1412645 - Initialize some uninitialized fields in widget/cocoa/. r=mstange 2017-10-31 11:25:04 +01:00
moz.build Bug 1355147 - Add basic support for headless mode on macOS. r=jrmuizel 2017-07-28 11:00:27 -07:00
mozView.h
NativeKeyBindings.h
NativeKeyBindings.mm Bug 1384233 - Remove SizePrintfMacros.h. r=froydnj 2017-07-26 16:03:57 -04:00
nsAppShell.h
nsAppShell.mm Bug 1373888 - part8 : add log. r=cpearce 2017-08-29 15:28:28 +08:00
nsBidiKeyboard.h
nsBidiKeyboard.mm
nsChangeObserver.h Bug 651120 - Remove index argument from content removed/appended/inserted notifications. r=peterv 2017-10-03 11:09:08 +01:00
nsChildView.h Bug 1410777 - Remove unnecessary code. r=nical 2017-10-26 14:17:19 -04:00
nsChildView.mm Bug 1401980 - shutdown accessibility service on accessibliity.force_disable pref change. r=surkov 2017-11-11 22:21:45 -05:00
nsClipboard.h Bug 1390428 (part 9) - Remove nsXPIDLCString. r=erahm. 2017-08-17 15:29:03 +10:00
nsClipboard.mm Bug 1390428 (part 9) - Remove nsXPIDLCString. r=erahm. 2017-08-17 15:29:03 +10:00
nsCocoaDebugUtils.h
nsCocoaDebugUtils.mm
nsCocoaFeatures.h Bug 1403945: Add utility functions to recognize OS X 10.13. r=mstange 2017-09-28 10:21:10 -04:00
nsCocoaFeatures.mm Bug 1403945: Add utility functions to recognize OS X 10.13. r=mstange 2017-09-28 10:21:10 -04:00
nsCocoaUtils.h Bug 1409580 - Support edit command mapping in headless MacOS. r=masayuki 2017-10-13 17:40:27 -07:00
nsCocoaUtils.mm Bug 1409580 - Support edit command mapping in headless MacOS. r=masayuki 2017-10-13 17:40:27 -07:00
nsCocoaWindow.h Bug 1373581: Make transition into and out of native fullscreen smoother on macOS. r=mstange 2017-10-18 21:50:47 -04:00
nsCocoaWindow.mm Bug 1370040 - Use the public API -[NSVisualEffectView setMaskImage:] instead of the private API -[NSWindow _cornerMask]. r=spohl 2017-11-19 18:38:35 -05:00
nsColorPicker.h
nsColorPicker.mm Bug 1389908 - Make sure the NSColorPanel never has a dangling target, and make sure to set the new target before calling setColor. r=spohl 2017-08-21 19:16:22 -04:00
nsCursorManager.h
nsCursorManager.mm
nsDeviceContextSpecX.h
nsDeviceContextSpecX.mm Bug 1185236 - Shorten print job name on Cocoa. r=mstange 2017-10-13 15:48:40 +09:00
nsDragService.h
nsDragService.mm Bug 1390428 (part 2, attempt 2) - Remove more nsXPIDLCString local variables. r=erahm. 2017-08-21 20:01:27 +10:00
nsFilePicker.h Bug 1387800 - Remove [deprecated] nsIFilePicker.show(). r=qdot 2017-08-06 13:15:31 +09:00
nsFilePicker.mm Bug 1387800 - Remove [deprecated] nsIFilePicker.show(). r=qdot 2017-08-06 13:15:31 +09:00
nsIdleServiceX.h
nsIdleServiceX.mm
nsLookAndFeel.h Bug 1403690 Part 3: macOS change nsLookAndFeel::NativeGetColor to use cached colors. r=mstange 2017-10-02 17:13:48 -07:00
nsLookAndFeel.mm Bug 1403690 Part 3: macOS change nsLookAndFeel::NativeGetColor to use cached colors. r=mstange 2017-10-02 17:13:48 -07:00
nsMacCursor.h
nsMacCursor.mm
nsMacDockSupport.h
nsMacDockSupport.mm Bug 1404198: Part 2d - Switch to NS_NewTimer* in widget. r=njn 2017-10-15 23:12:54 -07:00
nsMacWebAppUtils.h
nsMacWebAppUtils.mm
nsMenuBarX.h
nsMenuBarX.mm Bug 651120 - Remove index argument from content removed/appended/inserted notifications. r=peterv 2017-10-03 11:09:08 +01:00
nsMenuBaseX.h
nsMenuGroupOwnerX.h
nsMenuGroupOwnerX.mm Bug 651120 - Remove index argument from content removed/appended/inserted notifications. r=peterv 2017-10-03 11:09:08 +01:00
nsMenuItemIconX.h Bug 1407498 - Don't query loadingprincipal in common case. r=baku 2017-10-24 10:13:31 +08:00
nsMenuItemIconX.mm Bug 1407498 - Don't query loadingprincipal in common case. r=baku 2017-10-24 10:13:31 +08:00
nsMenuItemX.h Bug 1391803 - Use nsStringFwd.h for forward declaring string classes. r=froydnj 2017-08-16 16:48:52 -07:00
nsMenuItemX.mm Bug 651120 - Remove index argument from content removed/appended/inserted notifications. r=peterv 2017-10-03 11:09:08 +01:00
nsMenuUtilsX.h Bug 1391803 - Use nsStringFwd.h for forward declaring string classes. r=froydnj 2017-08-16 16:48:52 -07:00
nsMenuUtilsX.mm Bug 1371219 - Add an inputSource attribute to XULCommandEvent. r=smaug 2017-07-20 17:45:56 +02:00
nsMenuX.h
nsMenuX.mm Bug 651120 - Remove index argument from content removed/appended/inserted notifications. r=peterv 2017-10-03 11:09:08 +01:00
nsNativeThemeCocoa.h Bug 1417197 - Create nsITheme::CreateWebRenderCommands in order to optimize simple theme fills, and add a Mac implementation. r=jrmuizel 2017-11-14 15:34:56 -05:00
nsNativeThemeCocoa.mm Bug 1370040 - Use the public API -[NSVisualEffectView setMaskImage:] instead of the private API -[NSWindow _cornerMask]. r=spohl 2017-11-19 18:38:35 -05:00
nsNativeThemeColors.h
nsPIWidgetCocoa.idl
nsPrintDialogX.h
nsPrintDialogX.mm Bug 1185236 - Shorten print job name on Cocoa. r=mstange 2017-10-13 15:48:40 +09:00
nsPrintOptionsX.h Bug 1403260 - [Mac] Remove access to print server from content process sandbox. r=mconley 2017-10-30 11:14:08 -07:00
nsPrintOptionsX.mm Bug 1403260 - [Mac] Remove access to print server from content process sandbox. r=mconley 2017-10-30 11:14:08 -07:00
nsPrintSettingsX.h Bug 1407103 - Convert wstring attributes to AString in widget/nsIPrint*.idl. r=bobowen. 2017-10-09 10:08:09 +11:00
nsPrintSettingsX.mm Bug 1412645 - Initialize some uninitialized fields in widget/cocoa/. r=mstange 2017-10-31 11:25:04 +01:00
nsSandboxViolationSink.h
nsSandboxViolationSink.mm
nsSound.h
nsSound.mm
nsStandaloneNativeMenu.h
nsStandaloneNativeMenu.mm
nsSystemStatusBarCocoa.h
nsSystemStatusBarCocoa.mm
nsToolkit.h
nsToolkit.mm Bug 1415741. Switch to a different env var, not MOZ_DEBUG, for disabling mouse event taps on Mac. r=mstange 2017-11-15 12:23:58 -05:00
nsWidgetFactory.mm Bug 1355147 - Use headless clipboard on macOS. r=jrmuizel 2017-07-28 11:00:29 -07:00
nsWindowMap.h
nsWindowMap.mm
OSXNotificationCenter.h
OSXNotificationCenter.mm Bug 1386600 - Change nsIStringBundle methods to return |AString| instead of |wstring|. r=emk,sr=dbaron. 2017-08-04 14:40:52 +10:00
RectTextureImage.h
RectTextureImage.mm
ScreenHelperCocoa.h
ScreenHelperCocoa.mm
SwipeTracker.h
SwipeTracker.mm
TextInputHandler.h Bug 1412645 - Initialize some uninitialized fields in widget/cocoa/. r=mstange 2017-10-31 11:25:04 +01:00
TextInputHandler.mm Bug 1409580 - Support edit command mapping in headless MacOS. r=masayuki 2017-10-13 17:40:27 -07:00
VibrancyManager.h Bug 1370040 - Use the public API -[NSVisualEffectView setMaskImage:] instead of the private API -[NSWindow _cornerMask]. r=spohl 2017-11-19 18:38:35 -05:00
VibrancyManager.mm Bug 1370040 - Use the public API -[NSVisualEffectView setMaskImage:] instead of the private API -[NSWindow _cornerMask]. r=spohl 2017-11-19 18:38:35 -05:00
ViewRegion.h
ViewRegion.mm
WidgetTraceEvent.mm