diff options
author | Brian Smith <brian@dbsoft.org> | 2020-11-16 07:23:44 -0600 |
---|---|---|
committer | Brian Smith <brian@dbsoft.org> | 2020-11-16 07:23:44 -0600 |
commit | fa5aba4c0fd68c5b629cbf8f55dba36c626ee933 (patch) | |
tree | e9f1ac2c06949e0f242fab23d0d9f6ae816b9365 /widget/cocoa/VibrancyManager.h | |
parent | b6d909ad17c44157c9cbea90078727414f759253 (diff) | |
download | UXP-fa5aba4c0fd68c5b629cbf8f55dba36c626ee933.tar UXP-fa5aba4c0fd68c5b629cbf8f55dba36c626ee933.tar.gz UXP-fa5aba4c0fd68c5b629cbf8f55dba36c626ee933.tar.lz UXP-fa5aba4c0fd68c5b629cbf8f55dba36c626ee933.tar.xz UXP-fa5aba4c0fd68c5b629cbf8f55dba36c626ee933.zip |
Issue #1667 - Part 2: Add MacOS 11.0 Big Sur widget compatibility
This involves refactoring the vibrancy and OpenGL/Pixel rendering changes contained
in the following Mozilla meta bugs: 1496823 and 1491445
Also add Big Sur to the features tests and update popup menu look and feel based
on Mozilla bug 1656301.
Diffstat (limited to 'widget/cocoa/VibrancyManager.h')
-rw-r--r-- | widget/cocoa/VibrancyManager.h | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/widget/cocoa/VibrancyManager.h b/widget/cocoa/VibrancyManager.h index baaa20f68..04b1ad1cd 100644 --- a/widget/cocoa/VibrancyManager.h +++ b/widget/cocoa/VibrancyManager.h @@ -77,14 +77,6 @@ public: bool HasVibrantRegions() { return !mVibrantRegions.IsEmpty(); } /** - * Clear the vibrant areas that we know about. - * The clearing happens in the current NSGraphicsContext. If you call this - * from within an -[NSView drawRect:] implementation, the currrent - * NSGraphicsContext is already correctly set to the window drawing context. - */ - void ClearVibrantAreas() const; - - /** * Return the fill color that should be drawn on top of the cleared window * parts. Usually this would be drawn by -[NSVisualEffectView drawRect:]. * The returned color is opaque if the system-wide "Reduce transparency" @@ -105,10 +97,19 @@ public: */ static bool SystemSupportsVibrancy(); -protected: - void ClearVibrantRegion(const LayoutDeviceIntRegion& aVibrantRegion) const; - NSView* CreateEffectView(VibrancyType aType); + /** + * Create an NSVisualEffectView for the specified vibrancy type. The return + * value is not autoreleased. We return an object of type NSView* because we + * compile with an SDK that does not contain a definition for + * NSVisualEffectView. + * @param aIsContainer Whether this NSView will have child views. This value + * affects hit testing: Container views will pass through + * hit testing requests to their children, and leaf views + * will be transparent to hit testing. + */ + static NSView* CreateEffectView(VibrancyType aType, BOOL aIsContainer = NO); +protected: const nsChildView& mCoordinateConverter; NSView* mContainerView; nsClassHashtable<nsUint32HashKey, ViewRegion> mVibrantRegions; |