Bug 1296993 (part 3) - Streamline nsIWidget::ConstrainPosition. r=mstange.
authorNicholas Nethercote <nnethercote@mozilla.com>
Thu, 25 Aug 2016 13:43:27 +1000
changeset 353088 b349f99120ab97864c79a5b0a68ff1d490f5775e
parent 353087 6d772aecca501b8b1c083bf242c4a31c0cf3f768
child 353089 83bc87a0beaf6ce2faa0c5091921ff4ec158728a
push id6570
push userraliiev@mozilla.com
push dateMon, 14 Nov 2016 12:26:13 +0000
treeherdermozilla-beta@f455459b2ae5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmstange
bugs1296993
milestone51.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1296993 (part 3) - Streamline nsIWidget::ConstrainPosition. r=mstange. This patch does the following. - Removes the return value, because none of the call sites check it. - Puts an empty implementation into nsBaseWidget. - Removes the empty implementations from several nsIWidget instances, because they can use the nsBaseWidget one.
gfx/tests/gtest/TestCompositor.cpp
widget/PuppetWidget.h
widget/android/nsWindow.cpp
widget/android/nsWindow.h
widget/cocoa/nsChildView.h
widget/cocoa/nsChildView.mm
widget/cocoa/nsCocoaWindow.h
widget/cocoa/nsCocoaWindow.mm
widget/gonk/nsWindow.cpp
widget/gonk/nsWindow.h
widget/gtk/nsWindow.cpp
widget/gtk/nsWindow.h
widget/nsBaseWidget.h
widget/nsIWidget.h
widget/uikit/nsWindow.h
widget/uikit/nsWindow.mm
widget/windows/nsWindow.cpp
widget/windows/nsWindow.h
--- a/gfx/tests/gtest/TestCompositor.cpp
+++ b/gfx/tests/gtest/TestCompositor.cpp
@@ -63,18 +63,16 @@ public:
                                  const LayoutDeviceIntRect& aRect,
                                  nsWidgetInitData* aInitData = nullptr) override { return NS_OK; }
   virtual nsresult        Create(nsIWidget* aParent,
                                  nsNativeWidget aNativeParent,
                                  const DesktopIntRect& aRect,
                                  nsWidgetInitData* aInitData = nullptr) override { return NS_OK; }
   NS_IMETHOD              Show(bool aState) override { return NS_OK; }
   virtual bool            IsVisible() const override { return true; }
-  NS_IMETHOD              ConstrainPosition(bool aAllowSlop,
-                                            int32_t *aX, int32_t *aY) override { return NS_OK; }
   NS_IMETHOD              Move(double aX, double aY) override { return NS_OK; }
   NS_IMETHOD              Resize(double aWidth, double aHeight, bool aRepaint) override { return NS_OK; }
   NS_IMETHOD              Resize(double aX, double aY,
                                  double aWidth, double aHeight, bool aRepaint) override { return NS_OK; }
 
   NS_IMETHOD              Enable(bool aState) override { return NS_OK; }
   virtual bool            IsEnabled() const override { return true; }
   NS_IMETHOD              SetFocus(bool aRaise) override { return NS_OK; }
--- a/widget/PuppetWidget.h
+++ b/widget/PuppetWidget.h
@@ -78,20 +78,20 @@ public:
 
   virtual void Destroy() override;
 
   NS_IMETHOD Show(bool aState) override;
 
   virtual bool IsVisible() const override
   { return mVisible; }
 
-  NS_IMETHOD ConstrainPosition(bool     /*ignored aAllowSlop*/,
-                               int32_t* aX,
-                               int32_t* aY) override
-  { *aX = kMaxDimension;  *aY = kMaxDimension;  return NS_OK; }
+  virtual void ConstrainPosition(bool     /*ignored aAllowSlop*/,
+                                 int32_t* aX,
+                                 int32_t* aY) override
+  { *aX = kMaxDimension; *aY = kMaxDimension; }
 
   // Widget position is controlled by the parent process via TabChild.
   NS_IMETHOD Move(double aX, double aY) override
   { return NS_OK; }
 
   NS_IMETHOD Resize(double aWidth,
                     double aHeight,
                     bool   aRepaint) override;
--- a/widget/android/nsWindow.cpp
+++ b/widget/android/nsWindow.cpp
@@ -1737,30 +1737,28 @@ nsWindow::Show(bool aState)
 }
 
 bool
 nsWindow::IsVisible() const
 {
     return mIsVisible;
 }
 
-NS_IMETHODIMP
+void
 nsWindow::ConstrainPosition(bool aAllowSlop,
                             int32_t *aX,
                             int32_t *aY)
 {
     ALOG("nsWindow[%p]::ConstrainPosition %d [%d %d]", (void*)this, aAllowSlop, *aX, *aY);
 
     // constrain toplevel windows; children we don't care about
     if (IsTopLevel()) {
         *aX = 0;
         *aY = 0;
     }
-
-    return NS_OK;
 }
 
 NS_IMETHODIMP
 nsWindow::Move(double aX,
                double aY)
 {
     if (IsTopLevel())
         return NS_OK;
--- a/widget/android/nsWindow.h
+++ b/widget/android/nsWindow.h
@@ -136,19 +136,19 @@ public:
     virtual void Destroy() override;
     NS_IMETHOD ConfigureChildren(const nsTArray<nsIWidget::Configuration>&) override;
     NS_IMETHOD SetParent(nsIWidget* aNewParent) override;
     virtual nsIWidget *GetParent(void) override;
     virtual float GetDPI() override;
     virtual double GetDefaultScaleInternal() override;
     NS_IMETHOD Show(bool aState) override;
     virtual bool IsVisible() const override;
-    NS_IMETHOD ConstrainPosition(bool aAllowSlop,
-                                 int32_t *aX,
-                                 int32_t *aY) override;
+    virtual void ConstrainPosition(bool aAllowSlop,
+                                   int32_t *aX,
+                                   int32_t *aY) override;
     NS_IMETHOD Move(double aX,
                     double aY) override;
     NS_IMETHOD Resize(double aWidth,
                       double aHeight,
                       bool   aRepaint) override;
     NS_IMETHOD Resize(double aX,
                       double aY,
                       double aWidth,
--- a/widget/cocoa/nsChildView.h
+++ b/widget/cocoa/nsChildView.h
@@ -307,18 +307,16 @@ public:
 
   NS_IMETHOD              Show(bool aState) override;
   virtual bool            IsVisible() const override;
 
   NS_IMETHOD              SetParent(nsIWidget* aNewParent) override;
   virtual nsIWidget*      GetParent(void) override;
   virtual float           GetDPI() override;
 
-  NS_IMETHOD              ConstrainPosition(bool aAllowSlop,
-                                            int32_t *aX, int32_t *aY) override;
   NS_IMETHOD              Move(double aX, double aY) override;
   NS_IMETHOD              Resize(double aWidth, double aHeight, bool aRepaint) override;
   NS_IMETHOD              Resize(double aX, double aY,
                                  double aWidth, double aHeight, bool aRepaint) override;
 
   NS_IMETHOD              Enable(bool aState) override;
   virtual bool            IsEnabled() const override;
   NS_IMETHOD              SetFocus(bool aRaise) override;
--- a/widget/cocoa/nsChildView.mm
+++ b/widget/cocoa/nsChildView.mm
@@ -943,22 +943,16 @@ int32_t
 nsChildView::RoundsWidgetCoordinatesTo()
 {
   if (BackingScaleFactor() == 2.0) {
     return 2;
   }
   return 1;
 }
 
-NS_IMETHODIMP nsChildView::ConstrainPosition(bool aAllowSlop,
-                                             int32_t *aX, int32_t *aY)
-{
-  return NS_OK;
-}
-
 // Move this component, aX and aY are in the parent widget coordinate system
 NS_IMETHODIMP nsChildView::Move(double aX, double aY)
 {
   NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT;
 
   int32_t x = NSToIntRound(aX);
   int32_t y = NSToIntRound(aY);
 
--- a/widget/cocoa/nsCocoaWindow.h
+++ b/widget/cocoa/nsCocoaWindow.h
@@ -247,17 +247,17 @@ public:
     NS_IMETHOD              SetFocus(bool aState=false) override;
     virtual LayoutDeviceIntPoint WidgetToScreenOffset() override;
     virtual LayoutDeviceIntPoint GetClientOffset() override;
     virtual LayoutDeviceIntSize
     ClientToWindowSize(const LayoutDeviceIntSize& aClientSize) override;
 
     virtual void* GetNativeData(uint32_t aDataType) override;
 
-    NS_IMETHOD              ConstrainPosition(bool aAllowSlop,
+    virtual void            ConstrainPosition(bool aAllowSlop,
                                               int32_t *aX, int32_t *aY) override;
     virtual void            SetSizeConstraints(const SizeConstraints& aConstraints) override;
     NS_IMETHOD              Move(double aX, double aY) override;
     NS_IMETHOD              PlaceBehind(nsTopLevelWidgetZPlacement aPlacement,
                                         nsIWidget *aWidget, bool aActivate) override;
     virtual void            SetSizeMode(nsSizeMode aMode) override;
     NS_IMETHOD              HideWindowChrome(bool aShouldHide) override;
 
--- a/widget/cocoa/nsCocoaWindow.mm
+++ b/widget/cocoa/nsCocoaWindow.mm
@@ -1107,21 +1107,23 @@ NS_IMETHODIMP nsCocoaWindow::Enable(bool
 
 bool nsCocoaWindow::IsEnabled() const
 {
   return true;
 }
 
 #define kWindowPositionSlop 20
 
-NS_IMETHODIMP nsCocoaWindow::ConstrainPosition(bool aAllowSlop,
-                                               int32_t *aX, int32_t *aY)
+void
+nsCocoaWindow::ConstrainPosition(bool aAllowSlop, int32_t *aX, int32_t *aY)
 {
+  NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
+
   if (!mWindow || ![mWindow screen]) {
-    return NS_OK;
+    return;
   }
 
   nsIntRect screenBounds;
 
   int32_t width, height;
 
   NSRect frame = [mWindow frame];
 
@@ -1161,17 +1163,17 @@ NS_IMETHODIMP nsCocoaWindow::ConstrainPo
 
     if (*aY < screenBounds.y) {
       *aY = screenBounds.y;
     } else if (*aY >= screenBounds.y + screenBounds.height - height) {
       *aY = screenBounds.y + screenBounds.height - height;
     }
   }
 
-  return NS_OK;
+  NS_OBJC_END_TRY_ABORT_BLOCK;
 }
 
 void nsCocoaWindow::SetSizeConstraints(const SizeConstraints& aConstraints)
 {
   NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
 
   // Popups can be smaller than (60, 60)
   NSRect rect =
--- a/widget/gonk/nsWindow.cpp
+++ b/widget/gonk/nsWindow.cpp
@@ -381,24 +381,16 @@ nsWindow::Show(bool aState)
 
 bool
 nsWindow::IsVisible() const
 {
     return mVisible;
 }
 
 NS_IMETHODIMP
-nsWindow::ConstrainPosition(bool aAllowSlop,
-                            int32_t *aX,
-                            int32_t *aY)
-{
-    return NS_OK;
-}
-
-NS_IMETHODIMP
 nsWindow::Move(double aX,
                double aY)
 {
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsWindow::Resize(double aWidth,
--- a/widget/gonk/nsWindow.h
+++ b/widget/gonk/nsWindow.h
@@ -51,19 +51,16 @@ public:
     virtual MOZ_MUST_USE nsresult Create(nsIWidget* aParent,
                                          void* aNativeParent,
                                          const LayoutDeviceIntRect& aRect,
                                          nsWidgetInitData* aInitData) override;
     virtual void Destroy();
 
     NS_IMETHOD Show(bool aState);
     virtual bool IsVisible() const;
-    NS_IMETHOD ConstrainPosition(bool aAllowSlop,
-                                 int32_t *aX,
-                                 int32_t *aY);
     NS_IMETHOD Move(double aX,
                     double aY);
     NS_IMETHOD Resize(double aWidth,
                       double aHeight,
                       bool  aRepaint);
     NS_IMETHOD Resize(double aX,
                       double aY,
                       double aWidth,
--- a/widget/gtk/nsWindow.cpp
+++ b/widget/gtk/nsWindow.cpp
@@ -963,21 +963,21 @@ void
 nsWindow::RegisterTouchWindow()
 {
 #if GTK_CHECK_VERSION(3,4,0)
     mHandleTouchEvent = true;
     mTouches.Clear();
 #endif
 }
 
-NS_IMETHODIMP
+void
 nsWindow::ConstrainPosition(bool aAllowSlop, int32_t *aX, int32_t *aY)
 {
     if (!mIsTopLevel || !mShell)
-      return NS_OK;
+      return;
 
     double dpiScale = GetDefaultScale().scale;
 
     // we need to use the window size in logical screen pixels
     int32_t logWidth = std::max(NSToIntRound(mBounds.width / dpiScale), 1);
     int32_t logHeight = std::max(NSToIntRound(mBounds.height / dpiScale), 1);
 
     /* get our playing field. use the current screen, or failing that
@@ -986,17 +986,17 @@ nsWindow::ConstrainPosition(bool aAllowS
     nsCOMPtr<nsIScreenManager> screenmgr = do_GetService("@mozilla.org/gfx/screenmanager;1");
     if (screenmgr) {
       screenmgr->ScreenForRect(*aX, *aY, logWidth, logHeight,
                                getter_AddRefs(screen));
     }
 
     // We don't have any screen so leave the coordinates as is
     if (!screen)
-      return NS_OK;
+      return;
 
     nsIntRect screenRect;
     if (mSizeMode != nsSizeMode_Fullscreen) {
       // For normalized windows, use the desktop work area.
       screen->GetAvailRectDisplayPix(&screenRect.x, &screenRect.y,
                                      &screenRect.width, &screenRect.height);
     } else {
       // For full screen windows, use the desktop.
@@ -1020,18 +1020,16 @@ nsWindow::ConstrainPosition(bool aAllowS
       else if (*aX >= screenRect.XMost() - logWidth)
           *aX = screenRect.XMost() - logWidth;
 
       if (*aY < screenRect.y)
           *aY = screenRect.y;
       else if (*aY >= screenRect.YMost() - logHeight)
           *aY = screenRect.YMost() - logHeight;
     }
-
-    return NS_OK;
 }
 
 void nsWindow::SetSizeConstraints(const SizeConstraints& aConstraints)
 {
     mSizeConstraints.mMinSize = GetSafeWindowSize(aConstraints.mMinSize);
     mSizeConstraints.mMaxSize = GetSafeWindowSize(aConstraints.mMaxSize);
 
     if (mShell) {
--- a/widget/gtk/nsWindow.h
+++ b/widget/gtk/nsWindow.h
@@ -104,17 +104,17 @@ public:
     // Under Gtk, we manage windows using device pixels so no scaling is needed:
     mozilla::DesktopToLayoutDeviceScale GetDesktopToDeviceScale() final
     {
         return mozilla::DesktopToLayoutDeviceScale(1.0);
     }
     virtual nsresult   SetParent(nsIWidget* aNewParent) override;
     virtual void       SetModal(bool aModal) override;
     virtual bool       IsVisible() const override;
-    NS_IMETHOD         ConstrainPosition(bool aAllowSlop,
+    virtual void       ConstrainPosition(bool aAllowSlop,
                                          int32_t *aX,
                                          int32_t *aY) override;
     virtual void       SetSizeConstraints(const SizeConstraints& aConstraints) override;
     NS_IMETHOD         Move(double aX,
                             double aY) override;
     NS_IMETHOD         Show             (bool aState) override;
     NS_IMETHOD         Resize           (double aWidth,
                                          double aHeight,
--- a/widget/nsBaseWidget.h
+++ b/widget/nsBaseWidget.h
@@ -209,16 +209,19 @@ public:
   bool                    BoundsUseDesktopPixels() const {
     return mWindowType <= eWindowType_popup;
   }
   // Default implementation, to be overridden by platforms where desktop coords
   // are virtualized and may not correspond to device pixels on the screen.
   mozilla::DesktopToLayoutDeviceScale GetDesktopToDeviceScale() override {
     return mozilla::DesktopToLayoutDeviceScale(1.0);
   }
+  virtual void            ConstrainPosition(bool aAllowSlop,
+                                            int32_t *aX,
+                                            int32_t *aY) override {}
   NS_IMETHOD              MoveClient(double aX, double aY) override;
   NS_IMETHOD              ResizeClient(double aWidth, double aHeight, bool aRepaint) override;
   NS_IMETHOD              ResizeClient(double aX, double aY, double aWidth, double aHeight, bool aRepaint) override;
   virtual LayoutDeviceIntRect GetBounds() override;
   virtual LayoutDeviceIntRect GetClientBounds() override;
   virtual LayoutDeviceIntRect GetScreenBounds() override;
   virtual MOZ_MUST_USE nsresult GetRestoredBounds(LayoutDeviceIntRect& aRect) override;
   NS_IMETHOD              SetNonClientMargins(LayoutDeviceIntMargin& aMargins) override;
--- a/widget/nsIWidget.h
+++ b/widget/nsIWidget.h
@@ -673,22 +673,21 @@ class nsIWidget : public nsISupports
      * @param aAllowSlop: if true, allow the window to slop offscreen;
      *                    the window should be partially visible. if false,
      *                    force the entire window onscreen (or at least
      *                    the upper-left corner, if it's too large).
      * @param aX in: an x position expressed in screen coordinates.
      *           out: the x position constrained to fit on the screen(s).
      * @param aY in: an y position expressed in screen coordinates.
      *           out: the y position constrained to fit on the screen(s).
-     * @return vapid success indication. but see also the parameters.
      *
      **/
-    NS_IMETHOD ConstrainPosition(bool aAllowSlop,
-                                 int32_t *aX,
-                                 int32_t *aY) = 0;
+    virtual void ConstrainPosition(bool aAllowSlop,
+                                   int32_t *aX,
+                                   int32_t *aY) = 0;
 
     /**
      * NOTE:
      *
      * For a top-level window widget, the "parent's coordinate system" is the
      * "global" display pixel coordinate space, *not* device pixels (which
      * may be inconsistent between multiple screens, at least in the Mac OS
      * case with mixed hi-dpi and lo-dpi displays). This applies to all the
--- a/widget/uikit/nsWindow.h
+++ b/widget/uikit/nsWindow.h
@@ -46,18 +46,16 @@ public:
         return mVisible;
     }
     NS_IMETHOD              SetFocus(bool aState=false) override;
     virtual LayoutDeviceIntPoint WidgetToScreenOffset() override;
 
     virtual void SetBackgroundColor(const nscolor &aColor) override;
     virtual void* GetNativeData(uint32_t aDataType) override;
 
-    NS_IMETHOD              ConstrainPosition(bool aAllowSlop,
-                                              int32_t *aX, int32_t *aY) override;
     NS_IMETHOD              Move(double aX, double aY) override;
     NS_IMETHOD              PlaceBehind(nsTopLevelWidgetZPlacement aPlacement,
                                         nsIWidget *aWidget, bool aActivate) override;
     virtual void            SetSizeMode(nsSizeMode aMode) override;
     void                    EnteredFullScreen(bool aFullScreen);
     NS_IMETHOD              Resize(double aWidth, double aHeight, bool aRepaint) override;
     NS_IMETHOD              Resize(double aX, double aY, double aWidth, double aHeight, bool aRepaint) override;
     virtual LayoutDeviceIntRect GetScreenBounds() override;
--- a/widget/uikit/nsWindow.mm
+++ b/widget/uikit/nsWindow.mm
@@ -578,24 +578,16 @@ nsWindow::Show(bool aState)
           [mNativeView setNeedsDisplay];
       }
       mVisible = aState;
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsWindow::ConstrainPosition(bool aAllowSlop,
-                            int32_t *aX,
-                            int32_t *aY)
-{
-  return NS_OK;
-}
-
-NS_IMETHODIMP
 nsWindow::Move(double aX, double aY)
 {
   if (!mNativeView || (mBounds.x == aX && mBounds.y == aY))
     return NS_OK;
 
   //XXX: handle this
   // The point we have is in Gecko coordinates (origin top-left). Convert
   // it to Cocoa ones (origin bottom-left).
--- a/widget/windows/nsWindow.cpp
+++ b/widget/windows/nsWindow.cpp
@@ -1903,53 +1903,53 @@ nsWindow::SetSizeMode(nsSizeMode aMode)
     if (mode == SW_MAXIMIZE || mode == SW_SHOW)
       DispatchFocusToTopLevelWindow(true);
   }
 }
 
 // Constrain a potential move to fit onscreen
 // Position (aX, aY) is specified in Windows screen (logical) pixels,
 // except when using per-monitor DPI, in which case it's device pixels.
-NS_IMETHODIMP nsWindow::ConstrainPosition(bool aAllowSlop,
-                                          int32_t *aX, int32_t *aY)
+void
+nsWindow::ConstrainPosition(bool aAllowSlop, int32_t *aX, int32_t *aY)
 {
   if (!mIsTopWidgetWindow) // only a problem for top-level windows
-    return NS_OK;
+    return;
 
   double dpiScale = GetDesktopToDeviceScale().scale;
 
   // We need to use the window size in the kind of pixels used for window-
   // manipulation APIs.
   int32_t logWidth = std::max<int32_t>(NSToIntRound(mBounds.width / dpiScale), 1);
   int32_t logHeight = std::max<int32_t>(NSToIntRound(mBounds.height / dpiScale), 1);
 
   /* get our playing field. use the current screen, or failing that
   for any reason, use device caps for the default screen. */
   RECT screenRect;
 
   nsCOMPtr<nsIScreenManager> screenmgr = do_GetService(sScreenManagerContractID);
   if (!screenmgr) {
-    return NS_ERROR_NOT_AVAILABLE;
+    return;
   }
   nsCOMPtr<nsIScreen> screen;
   int32_t left, top, width, height;
 
   screenmgr->ScreenForRect(*aX, *aY, logWidth, logHeight,
                            getter_AddRefs(screen));
   if (mSizeMode != nsSizeMode_Fullscreen) {
     // For normalized windows, use the desktop work area.
     nsresult rv = screen->GetAvailRectDisplayPix(&left, &top, &width, &height);
     if (NS_FAILED(rv)) {
-      return rv;
+      return;
     }
   } else {
     // For full screen windows, use the desktop.
     nsresult rv = screen->GetRectDisplayPix(&left, &top, &width, &height);
     if (NS_FAILED(rv)) {
-      return rv;
+      return;
     }
   }
   screenRect.left = left;
   screenRect.right = left + width;
   screenRect.top = top;
   screenRect.bottom = top + height;
 
   if (aAllowSlop) {
@@ -1970,18 +1970,16 @@ NS_IMETHODIMP nsWindow::ConstrainPositio
     else if (*aX >= screenRect.right - logWidth)
       *aX = screenRect.right - logWidth;
 
     if (*aY < screenRect.top)
       *aY = screenRect.top;
     else if (*aY >= screenRect.bottom - logHeight)
       *aY = screenRect.bottom - logHeight;
   }
-
-  return NS_OK;
 }
 
 /**************************************************************
  *
  * SECTION: nsIWidget::Enable, nsIWidget::IsEnabled
  *
  * Enabling and disabling the widget.
  *
--- a/widget/windows/nsWindow.h
+++ b/widget/windows/nsWindow.h
@@ -115,17 +115,17 @@ public:
       return mozilla::DesktopToLayoutDeviceScale(1.0);
     } else {
       return mozilla::DesktopToLayoutDeviceScale(GetDefaultScaleInternal());
     }
   }
 
   NS_IMETHOD              Show(bool bState) override;
   virtual bool            IsVisible() const override;
-  NS_IMETHOD              ConstrainPosition(bool aAllowSlop, int32_t *aX, int32_t *aY) override;
+  virtual void            ConstrainPosition(bool aAllowSlop, int32_t *aX, int32_t *aY) override;
   virtual void            SetSizeConstraints(const SizeConstraints& aConstraints) override;
   virtual const SizeConstraints GetSizeConstraints() override;
   NS_IMETHOD              Move(double aX, double aY) override;
   NS_IMETHOD              Resize(double aWidth, double aHeight, bool aRepaint) override;
   NS_IMETHOD              Resize(double aX, double aY, double aWidth, double aHeight, bool aRepaint) override;
   NS_IMETHOD              BeginResizeDrag(mozilla::WidgetGUIEvent* aEvent,
                                           int32_t aHorizontal,
                                           int32_t aVertical) override;