Bug 1228125 (part 2) - Remove nsIWidget::GetScreenBoundsUntyped(). r=botond.
authorNicholas Nethercote <nnethercote@mozilla.com>
Wed, 25 Nov 2015 20:55:34 -0800
changeset 308954 71bf6683f1013c62aed6653228cf1260e9574a26
parent 308953 0cc1efabc37f8879530fe19aeed25b6cebaef5f2
child 308955 ae9f5883e654131f73236505da292faff9fc06be
push id5513
push userraliiev@mozilla.com
push dateMon, 25 Jan 2016 13:55:34 +0000
treeherdermozilla-beta@5ee97dd05b5c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbotond
bugs1228125
milestone45.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 1228125 (part 2) - Remove nsIWidget::GetScreenBoundsUntyped(). r=botond.
layout/xul/PopupBoxObject.cpp
widget/gtk/nsWindow.cpp
widget/nsIWidget.h
--- a/layout/xul/PopupBoxObject.cpp
+++ b/layout/xul/PopupBoxObject.cpp
@@ -278,21 +278,21 @@ PopupBoxObject::GetOuterScreenRect()
   if (!menuPopupFrame || !menuPopupFrame->IsOpen()) {
     return rect.forget();
   }
 
   nsView* view = menuPopupFrame->GetView();
   if (view) {
     nsIWidget* widget = view->GetWidget();
     if (widget) {
-      nsIntRect screenRect;
-      widget->GetScreenBoundsUntyped(screenRect);
+      LayoutDeviceIntRect screenRect;
+      widget->GetScreenBounds(screenRect);
 
       int32_t pp = menuPopupFrame->PresContext()->AppUnitsPerDevPixel();
-      rect->SetLayoutRect(ToAppUnits(screenRect, pp));
+      rect->SetLayoutRect(LayoutDeviceIntRect::ToAppUnits(screenRect, pp));
     }
   }
   return rect.forget();
 }
 
 void
 PopupBoxObject::GetAlignmentPosition(nsString& positionStr)
 {
--- a/widget/gtk/nsWindow.cpp
+++ b/widget/gtk/nsWindow.cpp
@@ -2372,18 +2372,18 @@ nsWindow::OnConfigureEvent(GtkWidget *aW
     //   the client window.
     //
     //   Override-redirect windows are children of the root window so parent
     //   coordinates are root coordinates.
 
     LOG(("configure event [%p] %d %d %d %d\n", (void *)this,
          aEvent->x, aEvent->y, aEvent->width, aEvent->height));
 
-    nsIntRect screenBounds;
-    GetScreenBoundsUntyped(screenBounds);
+    LayoutDeviceIntRect screenBounds;
+    GetScreenBounds(screenBounds);
 
     if (mWindowType == eWindowType_toplevel || mWindowType == eWindowType_dialog) {
         // This check avoids unwanted rollup on spurious configure events from
         // Cygwin/X (bug 672103).
         if (mBounds.x != screenBounds.x ||
             mBounds.y != screenBounds.y) {
             CheckForRollup(0, 0, false, true);
         }
@@ -2405,17 +2405,17 @@ nsWindow::OnConfigureEvent(GtkWidget *aW
         //
         // Skipping the WindowMoved call saves context menus from an infinite
         // loop when nsXULPopupManager::PopupMoved moves the window to the new
         // position and nsMenuPopupFrame::SetPopupPosition adds
         // offsetForContextMenu on each iteration.
         return FALSE;
     }
 
-    mBounds.MoveTo(screenBounds.TopLeft());
+    mBounds.MoveTo(screenBounds.TopLeft().ToUnknownPoint());
 
     // XXX mozilla will invalidate the entire window after this move
     // complete.  wtf?
     NotifyWindowMoved(mBounds.x, mBounds.y);
 
     return FALSE;
 }
 
--- a/widget/nsIWidget.h
+++ b/widget/nsIWidget.h
@@ -820,29 +820,20 @@ class nsIWidget : public nsISupports {
      *                this widget.
      */
     NS_IMETHOD GetBounds(LayoutDeviceIntRect& aRect) = 0;
 
     /**
      * Get this widget's outside dimensions in global coordinates. This
      * includes any title bar on the window.
      *
-     * The untyped version exists temporarily to ease conversion to typed
-     * coordinates.
-     *
      * @param aRect   On return it holds the  x, y, width and height of
      *                this widget.
      */
     NS_IMETHOD GetScreenBounds(LayoutDeviceIntRect& aRect) = 0;
-    NS_IMETHOD GetScreenBoundsUntyped(nsIntRect& aRect) {
-      LayoutDeviceIntRect tmp;
-      nsresult rv = GetScreenBounds(tmp);
-      aRect = tmp.ToUnknownRect();
-      return rv;
-    }
 
     /**
      * Similar to GetScreenBounds except that this function will always
      * get the size when the widget is in the nsSizeMode_Normal size mode
      * even if the current size mode is not nsSizeMode_Normal.
      * This method will fail if the size mode is not nsSizeMode_Normal and
      * the platform doesn't have the ability.
      * This method will always succeed if the current size mode is