Bug 726483 - remove unnecessary DispatchResized() parameters. r=roc, a=lizzard
authorKarl Tomlinson <karlt+@karlt.net>
Tue, 10 Nov 2015 15:09:52 +1300
changeset 296744 6ceeb10435a8
parent 296743 f6fa2e5fb632
child 296745 c134a04010a0
push id5316
push userkwierso@gmail.com
push date2015-11-16 20:42 +0000
treeherdermozilla-beta@c66289e84c50 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc, lizzard
bugs726483
milestone43.0
Bug 726483 - remove unnecessary DispatchResized() parameters. r=roc, a=lizzard
widget/gtk/nsWindow.cpp
widget/gtk/nsWindow.h
--- a/widget/gtk/nsWindow.cpp
+++ b/widget/gtk/nsWindow.cpp
@@ -509,23 +509,24 @@ nsWindow::DispatchDeactivateEvent(void)
       mWidgetListener->WindowDeactivated();
 
 #ifdef ACCESSIBILITY
     DispatchDeactivateEventAccessible();
 #endif //ACCESSIBILITY
 }
 
 void
-nsWindow::DispatchResized(int32_t aWidth, int32_t aHeight)
+nsWindow::DispatchResized()
 {
     if (mWidgetListener) {
-        mWidgetListener->WindowResized(this, aWidth, aHeight);
+        mWidgetListener->WindowResized(this, mBounds.width, mBounds.height);
     }
     if (mAttachedWidgetListener) {
-        mAttachedWidgetListener->WindowResized(this, aWidth, aHeight);
+        mAttachedWidgetListener->WindowResized(this,
+                                               mBounds.width, mBounds.height);
     }
 }
 
 nsresult
 nsWindow::DispatchEvent(WidgetGUIEvent* aEvent, nsEventStatus& aStatus)
 {
 #ifdef DEBUG
     debug_DumpEvent(stdout, aEvent->widget, aEvent,
@@ -1067,17 +1068,17 @@ nsWindow::Resize(double aWidth, double a
 
     NativeResize();
 
     NotifyRollupGeometryChange();
     ResizePluginSocketWidget();
 
     // send a resize notification if this is a toplevel
     if (mIsTopLevel || mListenForResizes) {
-        DispatchResized(width, height);
+        DispatchResized();
     }
 
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsWindow::Resize(double aX, double aY, double aWidth, double aHeight,
                  bool aRepaint)
@@ -1098,17 +1099,17 @@ nsWindow::Resize(double aX, double aY, d
         return NS_OK;
 
     NativeMoveResize();
 
     NotifyRollupGeometryChange();
     ResizePluginSocketWidget();
 
     if (mIsTopLevel || mListenForResizes) {
-        DispatchResized(width, height);
+        DispatchResized();
     }
 
     return NS_OK;
 }
 
 void
 nsWindow::ResizePluginSocketWidget()
 {
@@ -2399,17 +2400,17 @@ nsWindow::OnSizeAllocate(GtkAllocation *
         gdk_window_invalidate_rect(mGdkWindow, &rect, FALSE);
     }
 
     mBounds.SizeTo(size);
 
     if (!mGdkWindow)
         return;
 
-    DispatchResized(size.width, size.height);
+    DispatchResized();
 }
 
 void
 nsWindow::OnDeleteEvent()
 {
     if (mWidgetListener)
         mWidgetListener->RequestWindowClose(this);
 }
--- a/widget/gtk/nsWindow.h
+++ b/widget/gtk/nsWindow.h
@@ -327,17 +327,17 @@ public:
                                                       nsIObserver* aObserver) override;
 
 protected:
     virtual ~nsWindow();
 
     // event handling code
     void DispatchActivateEvent(void);
     void DispatchDeactivateEvent(void);
-    void DispatchResized(int32_t aWidth, int32_t aHeight);
+    void DispatchResized();
 
     // Helper for SetParent and ReparentNativeWidget.
     void ReparentNativeWidgetInternal(nsIWidget* aNewParent,
                                       GtkWidget* aNewContainer,
                                       GdkWindow* aNewParentWindow,
                                       GtkWidget* aOldContainer);
 
     virtual nsresult NotifyIMEInternal(