Backed out changeset 2450366cf7ca (bug 1891629) for causing win msix mochitest failures
[gecko.git] / widget / cocoa / nsChildView.h
blob3dfc3af9d81f58788e49b0c7b1065a799c789141
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
137 // sure 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
186 // mVibrancyViewsContainer.
187 PixelHostingView* mPixelHostingView;
189 // The CALayer that wraps Gecko's rendered contents. It's a sublayer of
190 // mPixelHostingView's backing layer. Always non-null.
191 CALayer* mRootCALayer; // [STRONG]
193 // Last pressure stage by trackpad's force click
194 NSInteger mLastPressureStage;
197 // class initialization
198 + (void)initialize;
200 + (void)registerViewForDraggedTypes:(NSView*)aView;
202 // these are sent to the first responder when the window key status changes
203 - (void)viewsWindowDidBecomeKey;
204 - (void)viewsWindowDidResignKey;
206 // Stop NSView hierarchy being changed during [ChildView drawRect:]
207 - (void)delayedTearDown;
209 - (void)handleMouseMoved:(NSEvent*)aEvent;
211 - (void)sendMouseEnterOrExitEvent:(NSEvent*)aEvent
212 enter:(BOOL)aEnter
213 exitFrom:
214 (mozilla::WidgetMouseEvent::ExitFrom)aExitFrom;
216 // Call this during operations that will likely trigger a main thread
217 // CoreAnimation paint of the window, during which Gecko should do its own
218 // painting and present the results atomically with that main thread
219 // transaction. This method will suspend off-thread window updates so that the
220 // upcoming paint can be atomic, and mark the layer as needing display so that
221 // HandleMainThreadCATransaction gets called and Gecko gets a chance to paint.
222 - (void)ensureNextCompositeIsAtomicWithMainThreadPaint;
224 - (NSView*)vibrancyViewsContainer;
225 - (NSView*)nonDraggableViewsContainer;
226 - (NSView*)pixelHostingView;
228 - (BOOL)isCoveringTitlebar;
230 - (void)viewWillStartLiveResize;
231 - (void)viewDidEndLiveResize;
234 * Gestures support
236 * The prototypes swipeWithEvent, beginGestureWithEvent, smartMagnifyWithEvent,
237 * rotateWithEvent and endGestureWithEvent were obtained from the following
238 * links:
239 * https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Classes/NSResponder_Class/Reference/Reference.html
240 * https://developer.apple.com/library/mac/#releasenotes/Cocoa/AppKit.html
242 - (void)swipeWithEvent:(NSEvent*)anEvent;
243 - (void)beginGestureWithEvent:(NSEvent*)anEvent;
244 - (void)magnifyWithEvent:(NSEvent*)anEvent;
245 - (void)smartMagnifyWithEvent:(NSEvent*)anEvent;
246 - (void)rotateWithEvent:(NSEvent*)anEvent;
247 - (void)endGestureWithEvent:(NSEvent*)anEvent;
249 - (void)scrollWheel:(NSEvent*)anEvent;
251 - (void)setUsingOMTCompositor:(BOOL)aUseOMTC;
253 - (NSEvent*)lastKeyDownEvent;
255 + (uint32_t)sUniqueKeyEventId;
257 + (NSMutableDictionary*)sNativeKeyEventsMap;
258 @end
260 class ChildViewMouseTracker {
261 public:
262 static void MouseMoved(NSEvent* aEvent);
263 static void MouseScrolled(NSEvent* aEvent);
264 static void OnDestroyView(ChildView* aView);
265 static void OnDestroyWindow(NSWindow* aWindow);
266 static BOOL WindowAcceptsEvent(NSWindow* aWindow, NSEvent* aEvent,
267 ChildView* aView, BOOL isClickThrough = NO);
268 static void MouseExitedWindow(NSEvent* aEvent);
269 static void MouseEnteredWindow(NSEvent* aEvent);
270 static void NativeMenuOpened();
271 static void NativeMenuClosed();
272 static void ReEvaluateMouseEnterState(NSEvent* aEvent = nil,
273 ChildView* aOldView = nil);
274 static void ResendLastMouseMoveEvent();
275 static ChildView* ViewForEvent(NSEvent* aEvent);
277 static ChildView* sLastMouseEventView;
278 static NSEvent* sLastMouseMoveEvent;
279 static NSWindow* sWindowUnderMouse;
280 static NSPoint sLastScrollEventScreenLocation;
283 //-------------------------------------------------------------------------
285 // nsChildView
287 //-------------------------------------------------------------------------
289 class nsChildView final : public nsBaseWidget {
290 private:
291 typedef nsBaseWidget Inherited;
292 typedef mozilla::layers::IAPZCTreeManager IAPZCTreeManager;
294 public:
295 nsChildView();
297 // nsIWidget interface
298 [[nodiscard]] virtual nsresult Create(nsIWidget* aParent,
299 nsNativeWidget aNativeParent,
300 const LayoutDeviceIntRect& aRect,
301 InitData* = nullptr) override;
303 virtual void Destroy() override;
305 virtual void Show(bool aState) override;
306 virtual bool IsVisible() const override;
308 virtual void SetParent(nsIWidget* aNewParent) override;
309 virtual nsIWidget* GetParent(void) override;
310 virtual float GetDPI() override;
312 virtual void Move(double aX, double aY) override;
313 virtual void Resize(double aWidth, double aHeight, bool aRepaint) override;
314 virtual void Resize(double aX, double aY, double aWidth, double aHeight,
315 bool aRepaint) override;
317 virtual void Enable(bool aState) override;
318 virtual bool IsEnabled() const override;
320 virtual nsSizeMode SizeMode() override { return mSizeMode; }
321 virtual void SetSizeMode(nsSizeMode aMode) override { mSizeMode = aMode; }
323 virtual void SetFocus(Raise, mozilla::dom::CallerType aCallerType) override;
324 virtual LayoutDeviceIntRect GetBounds() override;
325 virtual LayoutDeviceIntRect GetClientBounds() override;
326 virtual LayoutDeviceIntRect GetScreenBounds() override;
328 // Refresh mBounds with up-to-date values from [mView frame].
329 // Only called if this nsChildView is the popup content view of a popup
330 // window. For popup windows, the nsIWidget interface to Gecko is provided by
331 // nsCocoaWindow, not by nsChildView. So nsCocoaWindow manages resize requests
332 // from Gecko, fires resize events, and resizes the native NSWindow and
333 // NSView.
334 void UpdateBoundsFromView();
336 // Returns the "backing scale factor" of the view's window, which is the
337 // ratio of pixels in the window's backing store to Cocoa points. Prior to
338 // HiDPI support in OS X 10.7, this was always 1.0, but in HiDPI mode it
339 // will be 2.0 (and might potentially other values as screen resolutions
340 // evolve). This gives the relationship between what Gecko calls "device
341 // pixels" and the Cocoa "points" coordinate system.
342 CGFloat BackingScaleFactor() const;
344 mozilla::DesktopToLayoutDeviceScale GetDesktopToDeviceScale() final {
345 return mozilla::DesktopToLayoutDeviceScale(BackingScaleFactor());
348 // Call if the window's backing scale factor changes - i.e., it is moved
349 // between HiDPI and non-HiDPI screens
350 void BackingScaleFactorChanged();
352 virtual double GetDefaultScaleInternal() override;
354 virtual int32_t RoundsWidgetCoordinatesTo() override;
356 virtual void Invalidate(const LayoutDeviceIntRect& aRect) override;
357 void EnsureContentLayerForMainThreadPainting();
359 virtual void* GetNativeData(uint32_t aDataType) override;
360 virtual LayoutDeviceIntPoint WidgetToScreenOffset() override;
361 virtual bool ShowsResizeIndicator(
362 LayoutDeviceIntRect* aResizerRect) override {
363 return false;
366 virtual nsresult DispatchEvent(mozilla::WidgetGUIEvent* aEvent,
367 nsEventStatus& aStatus) override;
369 virtual bool WidgetTypeSupportsAcceleration() override;
370 virtual bool ShouldUseOffMainThreadCompositing() override;
372 virtual void SetCursor(const Cursor&) override;
374 virtual nsresult SetTitle(const nsAString& title) override;
376 [[nodiscard]] virtual nsresult GetAttention(int32_t aCycleCount) override;
378 virtual bool HasPendingInputEvent() override;
380 bool SendEventToNativeMenuSystem(NSEvent* aEvent);
381 virtual void PostHandleKeyEvent(
382 mozilla::WidgetKeyboardEvent* aEvent) override;
383 virtual nsresult ActivateNativeMenuItemAt(
384 const nsAString& indexString) override;
385 virtual nsresult ForceUpdateNativeMenuAt(
386 const nsAString& indexString) override;
387 [[nodiscard]] virtual nsresult GetSelectionAsPlaintext(
388 nsAString& aResult) override;
390 virtual void SetInputContext(const InputContext& aContext,
391 const InputContextAction& aAction) override;
392 virtual InputContext GetInputContext() override;
393 virtual TextEventDispatcherListener* GetNativeTextEventDispatcherListener()
394 override;
395 [[nodiscard]] virtual nsresult AttachNativeKeyEvent(
396 mozilla::WidgetKeyboardEvent& aEvent) override;
397 MOZ_CAN_RUN_SCRIPT virtual bool GetEditCommands(
398 mozilla::NativeKeyBindingsType aType,
399 const mozilla::WidgetKeyboardEvent& aEvent,
400 nsTArray<mozilla::CommandInt>& aCommands) override;
402 virtual void SuppressAnimation(bool aSuppress) override;
404 virtual nsresult SynthesizeNativeKeyEvent(
405 int32_t aNativeKeyboardLayout, int32_t aNativeKeyCode,
406 uint32_t aModifierFlags, const nsAString& aCharacters,
407 const nsAString& aUnmodifiedCharacters, nsIObserver* aObserver) override;
409 virtual nsresult SynthesizeNativeMouseEvent(
410 LayoutDeviceIntPoint aPoint, NativeMouseMessage aNativeMessage,
411 mozilla::MouseButton aButton, nsIWidget::Modifiers aModifierFlags,
412 nsIObserver* aObserver) override;
414 virtual nsresult SynthesizeNativeMouseMove(LayoutDeviceIntPoint aPoint,
415 nsIObserver* aObserver) override {
416 return SynthesizeNativeMouseEvent(
417 aPoint, NativeMouseMessage::Move, mozilla::MouseButton::eNotPressed,
418 nsIWidget::Modifiers::NO_MODIFIERS, aObserver);
420 virtual nsresult SynthesizeNativeMouseScrollEvent(
421 LayoutDeviceIntPoint aPoint, uint32_t aNativeMessage, double aDeltaX,
422 double aDeltaY, double aDeltaZ, uint32_t aModifierFlags,
423 uint32_t aAdditionalFlags, nsIObserver* aObserver) override;
424 virtual nsresult SynthesizeNativeTouchPoint(uint32_t aPointerId,
425 TouchPointerState aPointerState,
426 LayoutDeviceIntPoint aPoint,
427 double aPointerPressure,
428 uint32_t aPointerOrientation,
429 nsIObserver* aObserver) override;
431 virtual nsresult SynthesizeNativeTouchpadDoubleTap(
432 LayoutDeviceIntPoint aPoint, uint32_t aModifierFlags) override;
434 // Mac specific methods
435 void WillPaintWindow();
436 bool PaintWindow(LayoutDeviceIntRegion aRegion);
437 bool PaintWindowInDrawTarget(mozilla::gfx::DrawTarget* aDT,
438 const LayoutDeviceIntRegion& aRegion,
439 const mozilla::gfx::IntSize& aSurfaceSize);
441 void PaintWindowInContentLayer();
442 void HandleMainThreadCATransaction();
444 #ifdef ACCESSIBILITY
445 already_AddRefed<mozilla::a11y::LocalAccessible> GetDocumentAccessible();
446 #endif
448 virtual void CreateCompositor() override;
450 virtual bool WidgetPaintsBackground() override { return true; }
452 virtual bool PreRender(
453 mozilla::widget::WidgetRenderingContext* aContext) override;
454 virtual void PostRender(
455 mozilla::widget::WidgetRenderingContext* aContext) override;
456 virtual RefPtr<mozilla::layers::NativeLayerRoot> GetNativeLayerRoot()
457 override;
459 virtual void UpdateThemeGeometries(
460 const nsTArray<ThemeGeometry>& aThemeGeometries) override;
462 virtual void UpdateWindowDraggingRegion(
463 const LayoutDeviceIntRegion& aRegion) override;
464 LayoutDeviceIntRegion GetNonDraggableRegion() {
465 return mNonDraggableRegion.Region();
468 virtual void LookUpDictionary(
469 const nsAString& aText,
470 const nsTArray<mozilla::FontRange>& aFontRangeArray,
471 const bool aIsVertical, const LayoutDeviceIntPoint& aPoint) override;
473 void ResetParent();
475 static bool DoHasPendingInputEvent();
476 static uint32_t GetCurrentInputEventCount();
477 static void UpdateCurrentInputEventCount();
479 NSView<mozView>* GetEditorView();
481 nsCocoaWindow* GetAppWindowWidget() const;
483 virtual void ReparentNativeWidget(nsIWidget* aNewParent) override;
485 mozilla::widget::TextInputHandler* GetTextInputHandler() {
486 return mTextInputHandler;
489 // unit conversion convenience functions
490 int32_t CocoaPointsToDevPixels(CGFloat aPts) const {
491 return nsCocoaUtils::CocoaPointsToDevPixels(aPts, BackingScaleFactor());
493 LayoutDeviceIntPoint CocoaPointsToDevPixels(const NSPoint& aPt) const {
494 return nsCocoaUtils::CocoaPointsToDevPixels(aPt, BackingScaleFactor());
496 LayoutDeviceIntPoint CocoaPointsToDevPixelsRoundDown(
497 const NSPoint& aPt) const {
498 return nsCocoaUtils::CocoaPointsToDevPixelsRoundDown(aPt,
499 BackingScaleFactor());
501 LayoutDeviceIntRect CocoaPointsToDevPixels(const NSRect& aRect) const {
502 return nsCocoaUtils::CocoaPointsToDevPixels(aRect, BackingScaleFactor());
504 CGFloat DevPixelsToCocoaPoints(int32_t aPixels) const {
505 return nsCocoaUtils::DevPixelsToCocoaPoints(aPixels, BackingScaleFactor());
507 NSRect DevPixelsToCocoaPoints(const LayoutDeviceIntRect& aRect) const {
508 return nsCocoaUtils::DevPixelsToCocoaPoints(aRect, BackingScaleFactor());
511 virtual LayoutDeviceIntPoint GetClientOffset() override;
513 void DispatchAPZWheelInputEvent(mozilla::InputData& aEvent);
514 nsEventStatus DispatchAPZInputEvent(mozilla::InputData& aEvent);
516 void DispatchDoubleTapGesture(mozilla::TimeStamp aEventTimeStamp,
517 LayoutDeviceIntPoint aScreenPosition,
518 mozilla::Modifiers aModifiers);
520 // Called when the main thread enters a phase during which visual changes
521 // are imminent and any layer updates on the compositor thread would interfere
522 // with visual atomicity.
523 // "Async" CATransactions are CATransactions which happen on a thread that's
524 // not the main thread.
525 void SuspendAsyncCATransactions();
527 // Called when we know that the current main thread paint will be completed
528 // once the main thread goes back to the event loop.
529 void MaybeScheduleUnsuspendAsyncCATransactions();
531 // Called from the runnable dispatched by
532 // MaybeScheduleUnsuspendAsyncCATransactions(). At this point we know that the
533 // main thread is done handling the visual change (such as a window resize)
534 // and we can start modifying CALayers from the compositor thread again.
535 void UnsuspendAsyncCATransactions();
537 // Called by nsCocoaWindow when the window's fullscreen state changes.
538 void UpdateFullscreen(bool aFullscreen);
540 #ifdef DEBUG
541 // test only.
542 virtual nsresult SetHiDPIMode(bool aHiDPI) override;
543 virtual nsresult RestoreHiDPIMode() override;
544 #endif
546 protected:
547 virtual ~nsChildView();
549 void ReportMoveEvent();
550 void ReportSizeEvent();
552 void TearDownView();
554 virtual already_AddRefed<nsIWidget> AllocateChildPopupWidget() override {
555 return nsIWidget::CreateTopLevelWindow();
558 void ConfigureAPZCTreeManager() override;
559 void ConfigureAPZControllerThread() override;
561 void UpdateVibrancy(const nsTArray<ThemeGeometry>& aThemeGeometries);
562 mozilla::VibrancyManager& EnsureVibrancyManager();
564 nsIWidget* GetWidgetForListenerEvents();
566 protected:
567 ChildView* mView; // my parallel cocoa view, [STRONG]
568 RefPtr<mozilla::widget::TextInputHandler> mTextInputHandler;
569 InputContext mInputContext;
571 NSView* mParentView;
572 nsIWidget* mParentWidget;
574 #ifdef ACCESSIBILITY
575 // weak ref to this childview's associated mozAccessible for speed reasons
576 // (we get queried for it *a lot* but don't want to own it)
577 nsWeakPtr mAccessible;
578 #endif
580 // Held while the compositor (or WR renderer) thread is compositing.
581 // Protects from tearing down the view during compositing and from presenting
582 // half-composited layers to the screen.
583 mozilla::Mutex mCompositingLock MOZ_UNANNOTATED;
585 mozilla::ViewRegion mNonDraggableRegion;
587 // Cached value of [mView backingScaleFactor], to avoid sending two obj-c
588 // messages (respondsToSelector, backingScaleFactor) every time we need to
589 // use it.
590 // ** We'll need to reinitialize this if the backing resolution changes. **
591 mutable CGFloat mBackingScaleFactor;
593 bool mVisible;
594 nsSizeMode mSizeMode;
595 bool mDrawing;
596 bool mIsDispatchPaint; // Is a paint event being dispatched
598 RefPtr<mozilla::layers::NativeLayerRootCA> mNativeLayerRoot;
600 // In BasicLayers mode, this is the CoreAnimation layer that contains the
601 // rendering from Gecko. It is a sublayer of mNativeLayerRoot's underlying
602 // wrapper layer.
603 // Lazily created by EnsureContentLayerForMainThreadPainting().
604 RefPtr<mozilla::layers::NativeLayerCA> mContentLayer;
605 RefPtr<mozilla::layers::SurfacePoolHandle> mPoolHandle;
607 // In BasicLayers mode, this is the invalid region of mContentLayer.
608 LayoutDeviceIntRegion mContentLayerInvalidRegion;
610 mozilla::UniquePtr<mozilla::VibrancyManager> mVibrancyManager;
612 RefPtr<mozilla::CancelableRunnable> mUnsuspendAsyncCATransactionsRunnable;
614 static uint32_t sLastInputEventCount;
616 // This is used by SynthesizeNativeTouchPoint to maintain state between
617 // multiple synthesized points
618 mozilla::UniquePtr<mozilla::MultiTouchInput> mSynthesizedTouchInput;
621 #endif // nsChildView_h_