summaryrefslogtreecommitdiffstats
path: root/widget/cocoa/nsChildView.h
diff options
context:
space:
mode:
authorBrian Smith <brian@dbsoft.org>2020-11-16 07:23:44 -0600
committerMoonchild <moonchild@palemoon.org>2020-11-19 22:44:22 +0000
commit4f0f4aa8794ef12260d9d973b40ad3b942b69b72 (patch)
treec17d559d242f6b7c4a045a5845b78e9d81d841f1 /widget/cocoa/nsChildView.h
parent53ca366d2b34f237e42f8108d7a71586b5285e44 (diff)
downloadUXP-4f0f4aa8794ef12260d9d973b40ad3b942b69b72.tar
UXP-4f0f4aa8794ef12260d9d973b40ad3b942b69b72.tar.gz
UXP-4f0f4aa8794ef12260d9d973b40ad3b942b69b72.tar.lz
UXP-4f0f4aa8794ef12260d9d973b40ad3b942b69b72.tar.xz
UXP-4f0f4aa8794ef12260d9d973b40ad3b942b69b72.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/nsChildView.h')
-rw-r--r--widget/cocoa/nsChildView.h30
1 files changed, 16 insertions, 14 deletions
diff --git a/widget/cocoa/nsChildView.h b/widget/cocoa/nsChildView.h
index f6fb44633..2817c8d41 100644
--- a/widget/cocoa/nsChildView.h
+++ b/widget/cocoa/nsChildView.h
@@ -56,6 +56,8 @@ class WidgetRenderingContext;
} // namespace widget
} // namespace mozilla
+@class PixelHostingView;
+
@interface NSEvent (Undocumented)
// Return Cocoa event's corresponding Carbon event. Not initialized (on
@@ -139,11 +141,6 @@ class WidgetRenderingContext;
// when acceptsFirstMouse: is called, we store the event here (strong)
NSEvent* mClickThroughMouseDownEvent;
- // rects that were invalidated during a draw, so have pending drawing
- NSMutableArray* mPendingDirtyRects;
- BOOL mPendingFullDisplay;
- BOOL mPendingDisplay;
-
// WheelStart/Stop events should always come in pairs. This BOOL records the
// last received event so that, when we receive one of the events, we make sure
// to send its pair event first, in case we didn't yet for any reason.
@@ -185,8 +182,6 @@ class WidgetRenderingContext;
float mCumulativeMagnification;
float mCumulativeRotation;
- BOOL mWaitingForPaint;
-
#ifdef __LP64__
// Support for fluid swipe tracking.
BOOL* mCancelSwipeAnimation;
@@ -198,6 +193,15 @@ class WidgetRenderingContext;
// The mask image that's used when painting into the titlebar using basic
// CGContext painting (i.e. non-accelerated).
CGImageRef mTopLeftCornerMask;
+
+ // Subviews of self, which act as container views for vibrancy views and
+ // non-draggable views.
+ NSView* mVibrancyViewsContainer; // [STRONG]
+ NSView* mNonDraggableViewsContainer; // [STRONG]
+
+ // The view that does our drawing. This is a subview of self so that it can
+ // be ordered on top of mVibrancyViewsContainer.
+ PixelHostingView* mPixelHostingView;
}
// class initialization
@@ -226,6 +230,10 @@ class WidgetRenderingContext;
- (bool)preRender:(NSOpenGLContext *)aGLContext;
- (void)postRender:(NSOpenGLContext *)aGLContext;
+- (NSView*)vibrancyViewsContainer;
+- (NSView*)nonDraggableViewsContainer;
+- (NSView*)pixelHostingView;
+
- (BOOL)isCoveringTitlebar;
- (void)viewWillStartLiveResize;
@@ -252,7 +260,6 @@ class WidgetRenderingContext;
- (void)endGestureWithEvent:(NSEvent *)anEvent;
- (void)scrollWheel:(NSEvent *)anEvent;
-- (void)handleAsyncScrollEvent:(CGEventRef)cgEvent ofType:(CGEventType)type;
- (void)setUsingOMTCompositor:(BOOL)aUseOMTC;
@@ -507,8 +514,6 @@ public:
void CleanupRemoteDrawing() override;
bool InitCompositor(mozilla::layers::Compositor* aCompositor) override;
- IAPZCTreeManager* APZCTM() { return mAPZC ; }
-
NS_IMETHOD StartPluginIME(const mozilla::WidgetKeyboardEvent& aKeyboardEvent,
int32_t aPanelX, int32_t aPanelY,
nsString& aCommitted) override;
@@ -529,9 +534,6 @@ protected:
void ReportMoveEvent();
void ReportSizeEvent();
- // override to create different kinds of child views. Autoreleases, so
- // caller must retain.
- virtual NSView* CreateCocoaView(NSRect inFrame);
void TearDownView();
virtual already_AddRefed<nsIWidget>
@@ -574,7 +576,7 @@ protected:
protected:
- NSView<mozView>* mView; // my parallel cocoa view (ChildView or NativeScrollbarView), [STRONG]
+ ChildView<mozView>* mView; // my parallel cocoa view, [STRONG]
RefPtr<mozilla::widget::TextInputHandler> mTextInputHandler;
InputContext mInputContext;