mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-20 07:17:32 +09:00
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.
This commit is contained in:
parent
0fb2ab04a6
commit
de885df033
10 changed files with 286 additions and 609 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue