mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-13 05:15:45 +00:00
75bf1f6ae8
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 : 0434a17e2cddc94715db6a5fd17bc27e2cddd05c |
||
---|---|---|
.. | ||
crashtests | ||
cursors | ||
resources/MainMenu.nib | ||
ComplexTextInputPanel.h | ||
ComplexTextInputPanel.mm | ||
CustomCocoaEvents.h | ||
GfxInfo.h | ||
GfxInfo.mm | ||
moz.build | ||
mozView.h | ||
NativeKeyBindings.h | ||
NativeKeyBindings.mm | ||
nsAppShell.h | ||
nsAppShell.mm | ||
nsBidiKeyboard.h | ||
nsBidiKeyboard.mm | ||
nsChangeObserver.h | ||
nsChildView.h | ||
nsChildView.mm | ||
nsClipboard.h | ||
nsClipboard.mm | ||
nsCocoaDebugUtils.h | ||
nsCocoaDebugUtils.mm | ||
nsCocoaFeatures.h | ||
nsCocoaFeatures.mm | ||
nsCocoaUtils.h | ||
nsCocoaUtils.mm | ||
nsCocoaWindow.h | ||
nsCocoaWindow.mm | ||
nsColorPicker.h | ||
nsColorPicker.mm | ||
nsCursorManager.h | ||
nsCursorManager.mm | ||
nsDeviceContextSpecX.h | ||
nsDeviceContextSpecX.mm | ||
nsDragService.h | ||
nsDragService.mm | ||
nsFilePicker.h | ||
nsFilePicker.mm | ||
nsIdleServiceX.h | ||
nsIdleServiceX.mm | ||
nsLookAndFeel.h | ||
nsLookAndFeel.mm | ||
nsMacCursor.h | ||
nsMacCursor.mm | ||
nsMacDockSupport.h | ||
nsMacDockSupport.mm | ||
nsMacWebAppUtils.h | ||
nsMacWebAppUtils.mm | ||
nsMenuBarX.h | ||
nsMenuBarX.mm | ||
nsMenuBaseX.h | ||
nsMenuGroupOwnerX.h | ||
nsMenuGroupOwnerX.mm | ||
nsMenuItemIconX.h | ||
nsMenuItemIconX.mm | ||
nsMenuItemX.h | ||
nsMenuItemX.mm | ||
nsMenuUtilsX.h | ||
nsMenuUtilsX.mm | ||
nsMenuX.h | ||
nsMenuX.mm | ||
nsNativeThemeCocoa.h | ||
nsNativeThemeCocoa.mm | ||
nsNativeThemeColors.h | ||
nsPIWidgetCocoa.idl | ||
nsPrintDialogX.h | ||
nsPrintDialogX.mm | ||
nsPrintOptionsX.h | ||
nsPrintOptionsX.mm | ||
nsPrintSettingsX.h | ||
nsPrintSettingsX.mm | ||
nsSandboxViolationSink.h | ||
nsSandboxViolationSink.mm | ||
nsSound.h | ||
nsSound.mm | ||
nsStandaloneNativeMenu.h | ||
nsStandaloneNativeMenu.mm | ||
nsSystemStatusBarCocoa.h | ||
nsSystemStatusBarCocoa.mm | ||
nsToolkit.h | ||
nsToolkit.mm | ||
nsWidgetFactory.mm | ||
nsWindowMap.h | ||
nsWindowMap.mm | ||
OSXNotificationCenter.h | ||
OSXNotificationCenter.mm | ||
RectTextureImage.h | ||
RectTextureImage.mm | ||
ScreenHelperCocoa.h | ||
ScreenHelperCocoa.mm | ||
SwipeTracker.h | ||
SwipeTracker.mm | ||
TextInputHandler.h | ||
TextInputHandler.mm | ||
VibrancyManager.h | ||
VibrancyManager.mm | ||
ViewRegion.h | ||
ViewRegion.mm | ||
WidgetTraceEvent.mm |