Bug 1854550 - pt 12. Allow inlining between mozjemalloc and PHC r=glandium
[gecko.git] / widget / cocoa / nsChildView.h
blobed4362dc2fd3651e994407a1cfe84d05eae264ed
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef nsChildView_h_
7 #define nsChildView_h_
9 // formal protocols
10 #include "mozView.h"
11 #ifdef ACCESSIBILITY
12 # include "mozilla/a11y/LocalAccessible.h"
13 # include "mozAccessibleProtocol.h"
14 #endif
16 #include "nsISupports.h"
17 #include "nsBaseWidget.h"
18 #include "nsIWeakReferenceUtils.h"
19 #include "TextInputHandler.h"
20 #include "nsCocoaUtils.h"
21 #include "gfxQuartzSurface.h"
22 #include "GLContextTypes.h"
23 #include "mozilla/DataMutex.h"
24 #include "mozilla/Mutex.h"
25 #include "nsRegion.h"
26 #include "mozilla/MouseEvents.h"
27 #include "mozilla/UniquePtr.h"
28 #include "mozilla/webrender/WebRenderTypes.h"
30 #include "nsString.h"
31 #include "nsIDragService.h"
32 #include "ViewRegion.h"
33 #include "CFTypeRefPtr.h"
35 #import <Carbon/Carbon.h>
36 #import <Cocoa/Cocoa.h>
37 #import <AppKit/NSOpenGL.h>
39 class nsChildView;
40 class nsCocoaWindow;
42 namespace {
43 class GLPresenter;
44 } // namespace
46 namespace mozilla {
47 enum class NativeKeyBindingsType : uint8_t;
49 class InputData;
50 class PanGestureInput;
51 class VibrancyManager;
52 namespace layers {
53 class GLManager;
54 class IAPZCTreeManager;
55 class NativeLayerRootCA;
56 class NativeLayerCA;
57 } // namespace layers
58 namespace widget {
59 class WidgetRenderingContext;
60 } // namespace widget
61 } // namespace mozilla
63 @class PixelHostingView;
65 @interface NSEvent (Undocumented)
67 // Return Cocoa event's corresponding Carbon event. Not initialized (on
68 // synthetic events) until the OS actually "sends" the event. This method
69 // has been present in the same form since at least OS X 10.2.8.
70 - (EventRef)_eventRef;
72 // stage From 10.10.3 for force touch event
73 @property(readonly) NSInteger stage;
75 @end
77 @interface NSView (Undocumented)
79 // Undocumented method of one or more of NSFrameView's subclasses. Called
80 // when one or more of the titlebar buttons needs to be repositioned, to
81 // disappear, or to reappear (say if the window's style changes). If
82 // 'redisplay' is true, the entire titlebar (the window's top 22 pixels) is
83 // marked as needing redisplay. This method has been present in the same
84 // format since at least OS X 10.5.
85 - (void)_tileTitlebarAndRedisplay:(BOOL)redisplay;
87 // The following undocumented methods are used to work around bug 1069658,
88 // which is an Apple bug or design flaw that effects Yosemite. None of them
89 // were present prior to Yosemite (OS X 10.10).
90 - (NSView*)titlebarView; // Method of NSThemeFrame
91 - (NSView*)titlebarContainerView; // Method of NSThemeFrame
92 - (BOOL)transparent; // Method of NSTitlebarView and NSTitlebarContainerView
93 - (void)setTransparent:(BOOL)transparent; // Method of NSTitlebarView and
94 // NSTitlebarContainerView
96 // Available since 10.7.4:
97 - (void)viewDidChangeBackingProperties;
98 @end
100 @interface ChildView : NSView <
101 #ifdef ACCESSIBILITY
102 mozAccessible,
103 #endif
104 mozView,
105 NSTextInputClient,
106 NSDraggingSource,
107 NSDraggingDestination,
108 NSPasteboardItemDataProvider> {
109 @private
110 // the nsChildView that created the view. It retains this NSView, so
111 // the link back to it must be weak.
112 nsChildView* mGeckoChild;
114 // Text input handler for mGeckoChild and us. Note that this is a weak
115 // reference. Ideally, this should be a strong reference but a ChildView
116 // object can live longer than the mGeckoChild that owns it. And if
117 // mTextInputHandler were a strong reference, this would make it difficult
118 // for Gecko's leak detector to detect leaked TextInputHandler objects.
119 // This is initialized by [mozView installTextInputHandler:aHandler] and
120 // cleared by [mozView uninstallTextInputHandler].
121 mozilla::widget::TextInputHandler* mTextInputHandler; // [WEAK]
123 // when mouseDown: is called, we store its event here (strong)
124 NSEvent* mLastMouseDownEvent;
126 // Needed for IME support in e10s mode. Strong.
127 NSEvent* mLastKeyDownEvent;
129 // Whether the last mouse down event was blocked from Gecko.
130 BOOL mBlockedLastMouseDown;
132 // when acceptsFirstMouse: is called, we store the event here (strong)
133 NSEvent* mClickThroughMouseDownEvent;
135 // WheelStart/Stop events should always come in pairs. This BOOL records the
136 // last received event so that, when we receive one of the events, we make sure
137 // to send its pair event first, in case we didn't yet for any reason.
138 BOOL mExpectingWheelStop;
140 // Whether we're inside updateRootCALayer at the moment.
141 BOOL mIsUpdatingLayer;
143 // Whether the drag and drop was performed.
144 BOOL mPerformedDrag;
146 // Holds our drag service across multiple drag calls. The reference to the
147 // service is obtained when the mouse enters the view and is released when
148 // the mouse exits or there is a drop. This prevents us from having to
149 // re-establish the connection to the service manager many times per second
150 // when handling |draggingUpdated:| messages.
151 nsIDragService* mDragService;
153 // Gestures support
155 // mGestureState is used to detect when Cocoa has called both
156 // magnifyWithEvent and rotateWithEvent within the same
157 // beginGestureWithEvent and endGestureWithEvent sequence. We
158 // discard the spurious gesture event so as not to confuse Gecko.
160 // mCumulativeRotation keeps track of the total amount of rotation
161 // performed during a rotate gesture so we can send that value with
162 // the final MozRotateGesture event.
163 enum {
164 eGestureState_None,
165 eGestureState_StartGesture,
166 eGestureState_MagnifyGesture,
167 eGestureState_RotateGesture
168 } mGestureState;
169 float mCumulativeRotation;
171 #ifdef __LP64__
172 // Support for fluid swipe tracking.
173 BOOL* mCancelSwipeAnimation;
174 #endif
176 // Whether this uses off-main-thread compositing.
177 BOOL mUsingOMTCompositor;
179 // Subviews of self, which act as container views for vibrancy views and
180 // non-draggable views.
181 NSView* mVibrancyViewsContainer; // [STRONG]
182 NSView* mNonDraggableViewsContainer; // [STRONG]
184 // The layer-backed view that hosts our drawing. Always non-null.
185 // This is a subview of self so that it can be ordered on top of mVibrancyViewsContainer.
186 PixelHostingView* mPixelHostingView;
188 // The CALayer that wraps Gecko's rendered contents. It's a sublayer of
189 // mPixelHostingView's backing layer. Always non-null.
190 CALayer* mRootCALayer; // [STRONG]
192 // Last pressure stage by trackpad's force click
193 NSInteger mLastPressureStage;
196 // class initialization
197 + (void)initialize;
199 + (void)registerViewForDraggedTypes:(NSView*)aView;
201 // these are sent to the first responder when the window key status changes
202 - (void)viewsWindowDidBecomeKey;
203 - (void)viewsWindowDidResignKey;
205 // Stop NSView hierarchy being changed during [ChildView drawRect:]
206 - (void)delayedTearDown;
208 - (void)handleMouseMoved:(NSEvent*)aEvent;
210 - (void)sendMouseEnterOrExitEvent:(NSEvent*)aEvent
211 enter:(BOOL)aEnter
212 exitFrom:(mozilla::WidgetMouseEvent::ExitFrom)aExitFrom;
214 // Call this during operations that will likely trigger a main thread
215 // CoreAnimation paint of the window, during which Gecko should do its own
216 // painting and present the results atomically with that main thread transaction.
217 // This method will suspend off-thread window updates so that the upcoming paint
218 // can be atomic, and mark the layer as needing display so that
219 // HandleMainThreadCATransaction gets called and Gecko gets a chance to paint.
220 - (void)ensureNextCompositeIsAtomicWithMainThreadPaint;
222 - (NSView*)vibrancyViewsContainer;
223 - (NSView*)nonDraggableViewsContainer;
224 - (NSView*)pixelHostingView;
226 - (BOOL)isCoveringTitlebar;
228 - (void)viewWillStartLiveResize;
229 - (void)viewDidEndLiveResize;
232 * Gestures support
234 * The prototypes swipeWithEvent, beginGestureWithEvent, smartMagnifyWithEvent,
235 * rotateWithEvent and endGestureWithEvent were obtained from the following
236 * links:
237 * https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Classes/NSResponder_Class/Reference/Reference.html
238 * https://developer.apple.com/library/mac/#releasenotes/Cocoa/AppKit.html
240 - (void)swipeWithEvent:(NSEvent*)anEvent;
241 - (void)beginGestureWithEvent:(NSEvent*)anEvent;
242 - (void)magnifyWithEvent:(NSEvent*)anEvent;
243 - (void)smartMagnifyWithEvent:(NSEvent*)anEvent;
244 - (void)rotateWithEvent:(NSEvent*)anEvent;
245 - (void)endGestureWithEvent:(NSEvent*)anEvent;
247 - (void)scrollWheel:(NSEvent*)anEvent;
249 - (void)setUsingOMTCompositor:(BOOL)aUseOMTC;
251 - (NSEvent*)lastKeyDownEvent;
253 + (uint32_t)sUniqueKeyEventId;
255 + (NSMutableDictionary*)sNativeKeyEventsMap;
256 @end
258 class ChildViewMouseTracker {
259 public:
260 static void MouseMoved(NSEvent* aEvent);
261 static void MouseScrolled(NSEvent* aEvent);
262 static void OnDestroyView(ChildView* aView);
263 static void OnDestroyWindow(NSWindow* aWindow);
264 static BOOL WindowAcceptsEvent(NSWindow* aWindow, NSEvent* aEvent, ChildView* aView,
265 BOOL isClickThrough = NO);
266 static void MouseExitedWindow(NSEvent* aEvent);
267 static void MouseEnteredWindow(NSEvent* aEvent);
268 static void NativeMenuOpened();
269 static void NativeMenuClosed();
270 static void ReEvaluateMouseEnterState(NSEvent* aEvent = nil, ChildView* aOldView = nil);
271 static void ResendLastMouseMoveEvent();
272 static ChildView* ViewForEvent(NSEvent* aEvent);
274 static ChildView* sLastMouseEventView;
275 static NSEvent* sLastMouseMoveEvent;
276 static NSWindow* sWindowUnderMouse;
277 static NSPoint sLastScrollEventScreenLocation;
280 //-------------------------------------------------------------------------
282 // nsChildView
284 //-------------------------------------------------------------------------
286 class nsChildView final : public nsBaseWidget {
287 private:
288 typedef nsBaseWidget Inherited;
289 typedef mozilla::layers::IAPZCTreeManager IAPZCTreeManager;
291 public:
292 nsChildView();
294 // nsIWidget interface
295 [[nodiscard]] virtual nsresult Create(nsIWidget* aParent, nsNativeWidget aNativeParent,
296 const LayoutDeviceIntRect& aRect,
297 InitData* = nullptr) override;
299 virtual void Destroy() override;
301 virtual void Show(bool aState) override;
302 virtual bool IsVisible() const override;
304 virtual void SetParent(nsIWidget* aNewParent) override;
305 virtual nsIWidget* GetParent(void) override;
306 virtual float GetDPI() override;
308 virtual void Move(double aX, double aY) override;
309 virtual void Resize(double aWidth, double aHeight, bool aRepaint) override;
310 virtual void Resize(double aX, double aY, double aWidth, double aHeight, bool aRepaint) override;
312 virtual void Enable(bool aState) override;
313 virtual bool IsEnabled() const override;
315 virtual nsSizeMode SizeMode() override { return mSizeMode; }
316 virtual void SetSizeMode(nsSizeMode aMode) override { mSizeMode = aMode; }
318 virtual void SetFocus(Raise, mozilla::dom::CallerType aCallerType) override;
319 virtual LayoutDeviceIntRect GetBounds() override;
320 virtual LayoutDeviceIntRect GetClientBounds() override;
321 virtual LayoutDeviceIntRect GetScreenBounds() override;
323 // Refresh mBounds with up-to-date values from [mView frame].
324 // Only called if this nsChildView is the popup content view of a popup window.
325 // For popup windows, the nsIWidget interface to Gecko is provided by
326 // nsCocoaWindow, not by nsChildView. So nsCocoaWindow manages resize requests
327 // from Gecko, fires resize events, and resizes the native NSWindow and NSView.
328 void UpdateBoundsFromView();
330 // Returns the "backing scale factor" of the view's window, which is the
331 // ratio of pixels in the window's backing store to Cocoa points. Prior to
332 // HiDPI support in OS X 10.7, this was always 1.0, but in HiDPI mode it
333 // will be 2.0 (and might potentially other values as screen resolutions
334 // evolve). This gives the relationship between what Gecko calls "device
335 // pixels" and the Cocoa "points" coordinate system.
336 CGFloat BackingScaleFactor() const;
338 mozilla::DesktopToLayoutDeviceScale GetDesktopToDeviceScale() final {
339 return mozilla::DesktopToLayoutDeviceScale(BackingScaleFactor());
342 // Call if the window's backing scale factor changes - i.e., it is moved
343 // between HiDPI and non-HiDPI screens
344 void BackingScaleFactorChanged();
346 virtual double GetDefaultScaleInternal() override;
348 virtual int32_t RoundsWidgetCoordinatesTo() override;
350 virtual void Invalidate(const LayoutDeviceIntRect& aRect) override;
351 void EnsureContentLayerForMainThreadPainting();
353 virtual void* GetNativeData(uint32_t aDataType) override;
354 virtual LayoutDeviceIntPoint WidgetToScreenOffset() override;
355 virtual bool ShowsResizeIndicator(LayoutDeviceIntRect* aResizerRect) override { return false; }
357 virtual nsresult DispatchEvent(mozilla::WidgetGUIEvent* aEvent, nsEventStatus& aStatus) override;
359 virtual bool WidgetTypeSupportsAcceleration() override;
360 virtual bool ShouldUseOffMainThreadCompositing() override;
362 virtual void SetCursor(const Cursor&) override;
364 virtual nsresult SetTitle(const nsAString& title) override;
366 [[nodiscard]] virtual nsresult GetAttention(int32_t aCycleCount) override;
368 virtual bool HasPendingInputEvent() override;
370 bool SendEventToNativeMenuSystem(NSEvent* aEvent);
371 virtual void PostHandleKeyEvent(mozilla::WidgetKeyboardEvent* aEvent) override;
372 virtual nsresult ActivateNativeMenuItemAt(const nsAString& indexString) override;
373 virtual nsresult ForceUpdateNativeMenuAt(const nsAString& indexString) override;
374 [[nodiscard]] virtual nsresult GetSelectionAsPlaintext(nsAString& aResult) override;
376 virtual void SetInputContext(const InputContext& aContext,
377 const InputContextAction& aAction) override;
378 virtual InputContext GetInputContext() override;
379 virtual TextEventDispatcherListener* GetNativeTextEventDispatcherListener() override;
380 [[nodiscard]] virtual nsresult AttachNativeKeyEvent(
381 mozilla::WidgetKeyboardEvent& aEvent) override;
382 MOZ_CAN_RUN_SCRIPT virtual bool GetEditCommands(
383 mozilla::NativeKeyBindingsType aType, const mozilla::WidgetKeyboardEvent& aEvent,
384 nsTArray<mozilla::CommandInt>& aCommands) override;
386 virtual void SuppressAnimation(bool aSuppress) override;
388 virtual nsresult SynthesizeNativeKeyEvent(int32_t aNativeKeyboardLayout, int32_t aNativeKeyCode,
389 uint32_t aModifierFlags, const nsAString& aCharacters,
390 const nsAString& aUnmodifiedCharacters,
391 nsIObserver* aObserver) override;
393 virtual nsresult SynthesizeNativeMouseEvent(LayoutDeviceIntPoint aPoint,
394 NativeMouseMessage aNativeMessage,
395 mozilla::MouseButton aButton,
396 nsIWidget::Modifiers aModifierFlags,
397 nsIObserver* aObserver) override;
399 virtual nsresult SynthesizeNativeMouseMove(LayoutDeviceIntPoint aPoint,
400 nsIObserver* aObserver) override {
401 return SynthesizeNativeMouseEvent(aPoint, NativeMouseMessage::Move,
402 mozilla::MouseButton::eNotPressed,
403 nsIWidget::Modifiers::NO_MODIFIERS, aObserver);
405 virtual nsresult SynthesizeNativeMouseScrollEvent(LayoutDeviceIntPoint aPoint,
406 uint32_t aNativeMessage, double aDeltaX,
407 double aDeltaY, double aDeltaZ,
408 uint32_t aModifierFlags,
409 uint32_t aAdditionalFlags,
410 nsIObserver* aObserver) override;
411 virtual nsresult SynthesizeNativeTouchPoint(uint32_t aPointerId, TouchPointerState aPointerState,
412 LayoutDeviceIntPoint aPoint, double aPointerPressure,
413 uint32_t aPointerOrientation,
414 nsIObserver* aObserver) override;
416 virtual nsresult SynthesizeNativeTouchpadDoubleTap(LayoutDeviceIntPoint aPoint,
417 uint32_t aModifierFlags) override;
419 // Mac specific methods
420 void WillPaintWindow();
421 bool PaintWindow(LayoutDeviceIntRegion aRegion);
422 bool PaintWindowInDrawTarget(mozilla::gfx::DrawTarget* aDT, const LayoutDeviceIntRegion& aRegion,
423 const mozilla::gfx::IntSize& aSurfaceSize);
425 void PaintWindowInContentLayer();
426 void HandleMainThreadCATransaction();
428 #ifdef ACCESSIBILITY
429 already_AddRefed<mozilla::a11y::LocalAccessible> GetDocumentAccessible();
430 #endif
432 virtual void CreateCompositor() override;
434 virtual bool WidgetPaintsBackground() override { return true; }
436 virtual bool PreRender(mozilla::widget::WidgetRenderingContext* aContext) override;
437 virtual void PostRender(mozilla::widget::WidgetRenderingContext* aContext) override;
438 virtual RefPtr<mozilla::layers::NativeLayerRoot> GetNativeLayerRoot() override;
440 virtual void UpdateThemeGeometries(const nsTArray<ThemeGeometry>& aThemeGeometries) override;
442 virtual void UpdateWindowDraggingRegion(const LayoutDeviceIntRegion& aRegion) override;
443 LayoutDeviceIntRegion GetNonDraggableRegion() { return mNonDraggableRegion.Region(); }
445 virtual void LookUpDictionary(const nsAString& aText,
446 const nsTArray<mozilla::FontRange>& aFontRangeArray,
447 const bool aIsVertical,
448 const LayoutDeviceIntPoint& aPoint) override;
450 void ResetParent();
452 static bool DoHasPendingInputEvent();
453 static uint32_t GetCurrentInputEventCount();
454 static void UpdateCurrentInputEventCount();
456 NSView<mozView>* GetEditorView();
458 nsCocoaWindow* GetAppWindowWidget() const;
460 virtual void ReparentNativeWidget(nsIWidget* aNewParent) override;
462 mozilla::widget::TextInputHandler* GetTextInputHandler() { return mTextInputHandler; }
464 // unit conversion convenience functions
465 int32_t CocoaPointsToDevPixels(CGFloat aPts) const {
466 return nsCocoaUtils::CocoaPointsToDevPixels(aPts, BackingScaleFactor());
468 LayoutDeviceIntPoint CocoaPointsToDevPixels(const NSPoint& aPt) const {
469 return nsCocoaUtils::CocoaPointsToDevPixels(aPt, BackingScaleFactor());
471 LayoutDeviceIntPoint CocoaPointsToDevPixelsRoundDown(const NSPoint& aPt) const {
472 return nsCocoaUtils::CocoaPointsToDevPixelsRoundDown(aPt, BackingScaleFactor());
474 LayoutDeviceIntRect CocoaPointsToDevPixels(const NSRect& aRect) const {
475 return nsCocoaUtils::CocoaPointsToDevPixels(aRect, BackingScaleFactor());
477 CGFloat DevPixelsToCocoaPoints(int32_t aPixels) const {
478 return nsCocoaUtils::DevPixelsToCocoaPoints(aPixels, BackingScaleFactor());
480 NSRect DevPixelsToCocoaPoints(const LayoutDeviceIntRect& aRect) const {
481 return nsCocoaUtils::DevPixelsToCocoaPoints(aRect, BackingScaleFactor());
484 virtual LayoutDeviceIntPoint GetClientOffset() override;
486 void DispatchAPZWheelInputEvent(mozilla::InputData& aEvent);
487 nsEventStatus DispatchAPZInputEvent(mozilla::InputData& aEvent);
489 void DispatchDoubleTapGesture(mozilla::TimeStamp aEventTimeStamp,
490 LayoutDeviceIntPoint aScreenPosition,
491 mozilla::Modifiers aModifiers);
493 // Called when the main thread enters a phase during which visual changes
494 // are imminent and any layer updates on the compositor thread would interfere
495 // with visual atomicity.
496 // "Async" CATransactions are CATransactions which happen on a thread that's
497 // not the main thread.
498 void SuspendAsyncCATransactions();
500 // Called when we know that the current main thread paint will be completed once
501 // the main thread goes back to the event loop.
502 void MaybeScheduleUnsuspendAsyncCATransactions();
504 // Called from the runnable dispatched by MaybeScheduleUnsuspendAsyncCATransactions().
505 // At this point we know that the main thread is done handling the visual change
506 // (such as a window resize) and we can start modifying CALayers from the
507 // compositor thread again.
508 void UnsuspendAsyncCATransactions();
510 // Called by nsCocoaWindow when the window's fullscreen state changes.
511 void UpdateFullscreen(bool aFullscreen);
513 #ifdef DEBUG
514 // test only.
515 virtual nsresult SetHiDPIMode(bool aHiDPI) override;
516 virtual nsresult RestoreHiDPIMode() override;
517 #endif
519 protected:
520 virtual ~nsChildView();
522 void ReportMoveEvent();
523 void ReportSizeEvent();
525 void TearDownView();
527 virtual already_AddRefed<nsIWidget> AllocateChildPopupWidget() override {
528 return nsIWidget::CreateTopLevelWindow();
531 void ConfigureAPZCTreeManager() override;
532 void ConfigureAPZControllerThread() override;
534 void UpdateVibrancy(const nsTArray<ThemeGeometry>& aThemeGeometries);
535 mozilla::VibrancyManager& EnsureVibrancyManager();
537 nsIWidget* GetWidgetForListenerEvents();
539 protected:
540 ChildView* mView; // my parallel cocoa view, [STRONG]
541 RefPtr<mozilla::widget::TextInputHandler> mTextInputHandler;
542 InputContext mInputContext;
544 NSView* mParentView;
545 nsIWidget* mParentWidget;
547 #ifdef ACCESSIBILITY
548 // weak ref to this childview's associated mozAccessible for speed reasons
549 // (we get queried for it *a lot* but don't want to own it)
550 nsWeakPtr mAccessible;
551 #endif
553 // Held while the compositor (or WR renderer) thread is compositing.
554 // Protects from tearing down the view during compositing and from presenting
555 // half-composited layers to the screen.
556 mozilla::Mutex mCompositingLock MOZ_UNANNOTATED;
558 mozilla::ViewRegion mNonDraggableRegion;
560 // Cached value of [mView backingScaleFactor], to avoid sending two obj-c
561 // messages (respondsToSelector, backingScaleFactor) every time we need to
562 // use it.
563 // ** We'll need to reinitialize this if the backing resolution changes. **
564 mutable CGFloat mBackingScaleFactor;
566 bool mVisible;
567 nsSizeMode mSizeMode;
568 bool mDrawing;
569 bool mIsDispatchPaint; // Is a paint event being dispatched
571 RefPtr<mozilla::layers::NativeLayerRootCA> mNativeLayerRoot;
573 // In BasicLayers mode, this is the CoreAnimation layer that contains the
574 // rendering from Gecko. It is a sublayer of mNativeLayerRoot's underlying
575 // wrapper layer.
576 // Lazily created by EnsureContentLayerForMainThreadPainting().
577 RefPtr<mozilla::layers::NativeLayerCA> mContentLayer;
578 RefPtr<mozilla::layers::SurfacePoolHandle> mPoolHandle;
580 // In BasicLayers mode, this is the invalid region of mContentLayer.
581 LayoutDeviceIntRegion mContentLayerInvalidRegion;
583 mozilla::UniquePtr<mozilla::VibrancyManager> mVibrancyManager;
585 RefPtr<mozilla::CancelableRunnable> mUnsuspendAsyncCATransactionsRunnable;
587 static uint32_t sLastInputEventCount;
589 // This is used by SynthesizeNativeTouchPoint to maintain state between
590 // multiple synthesized points
591 mozilla::UniquePtr<mozilla::MultiTouchInput> mSynthesizedTouchInput;
594 #endif // nsChildView_h_