Bug 506103 - Remove mDeferredPositioner and related code. r=roc
authorJim Mathies <jmathies@mozilla.com>
Mon, 27 Jul 2009 12:27:35 -0500
changeset 30750 514cd67d6357
parent 30749 d59c29ccfb18
child 30751 5b230fec6a4a
push id8217
push userjmathies@mozilla.com
push dateMon, 27 Jul 2009 17:29:54 +0000
treeherdermozilla-central@5b230fec6a4a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs506103
milestone1.9.2a1pre
Bug 506103 - Remove mDeferredPositioner and related code. r=roc
widget/public/nsIWidget.h
widget/src/beos/nsWindow.cpp
widget/src/beos/nsWindow.h
widget/src/cocoa/nsChildView.h
widget/src/cocoa/nsChildView.mm
widget/src/cocoa/nsCocoaWindow.h
widget/src/gtk2/nsWindow.cpp
widget/src/gtk2/nsWindow.h
widget/src/os2/nsWindow.cpp
widget/src/os2/nsWindow.h
widget/src/photon/nsWidget.h
widget/src/qt/nsWindow.cpp
widget/src/qt/nsWindow.h
widget/src/windows/nsWindow.cpp
widget/src/windows/nsWindow.h
--- a/widget/public/nsIWidget.h
+++ b/widget/public/nsIWidget.h
@@ -97,19 +97,20 @@ typedef nsEventStatus (* EVENT_CALLBACK)
 #define NS_NATIVE_PLUGIN_PORT_CG    101
 #endif
 #ifdef XP_WIN
 #define NS_NATIVE_TSF_THREAD_MGR       100
 #define NS_NATIVE_TSF_CATEGORY_MGR     101
 #define NS_NATIVE_TSF_DISPLAY_ATTR_MGR 102
 #endif
 
+// {5F8D1A5E-C380-4c60-978A-030335BE1D6A}
 #define NS_IWIDGET_IID \
-  { 0x9b8d70bd, 0x068e, 0x4465, \
-    { 0x8a, 0xd2, 0x4c, 0xf7, 0x96, 0x67, 0xe4, 0xfc } }
+  { 0x5f8d1a5e, 0xc380, 0x4c60, \
+    { 0x97, 0x8a, 0x03, 0x03, 0x35, 0xbe, 0x1d, 0x6a } }
 
 /*
  * Window shadow styles
  * Also used for the -moz-window-shadow CSS property
  */
 
 #define NS_STYLE_WINDOW_SHADOW_NONE             0
 #define NS_STYLE_WINDOW_SHADOW_DEFAULT          1
@@ -777,34 +778,16 @@ class nsIWidget : public nsISupports {
      * Return this widget's origin in screen coordinates.
      *
      * @return screen coordinates stored in the x,y members
      */
 
     virtual nsIntPoint WidgetToScreenOffset() = 0;
 
     /**
-     * When adjustments are to made to a whole set of child widgets, call this
-     * before resizing/positioning the child windows to minimize repaints. Must
-     * be followed by EndResizingChildren() after child windows have been
-     * adjusted.
-     *
-     */
-
-    NS_IMETHOD BeginResizingChildren(void) = 0;
-
-    /**
-     * Call this when finished adjusting child windows. Must be preceded by
-     * BeginResizingChildren().
-     *
-     */
-
-    NS_IMETHOD EndResizingChildren(void) = 0;
-
-    /**
      * Dispatches an event to the widget
      *
      */
     NS_IMETHOD DispatchEvent(nsGUIEvent* event, nsEventStatus & aStatus) = 0;
 
     /**
      * Enables the dropping of files to a widget (XXX this is temporary)
      *
--- a/widget/src/beos/nsWindow.cpp
+++ b/widget/src/beos/nsWindow.cpp
@@ -324,30 +324,16 @@ nsWindow::~nsWindow()
 	// window still exists, and we need to destroy it
 	if (NULL != mView) 
 	{
 		Destroy();
 	}
 	NS_IF_RELEASE(mFontMetrics);
 }
 
-NS_METHOD nsWindow::BeginResizingChildren(void)
-{
-	// HideKids(PR_TRUE) may be used here
-	NS_NOTYETIMPLEMENTED("BeginResizingChildren not yet implemented"); // to be implemented
-	return NS_OK;
-}
-
-NS_METHOD nsWindow::EndResizingChildren(void)
-{
-	// HideKids(PR_FALSE) may be used here
-	NS_NOTYETIMPLEMENTED("EndResizingChildren not yet implemented"); // to be implemented
-	return NS_OK;
-}
-
 NS_METHOD nsWindow::WidgetToScreen(const nsRect& aOldRect, nsRect& aNewRect)
 {
 	BPoint	point;
 	point.x = aOldRect.x;
 	point.y = aOldRect.y;
 	if (mView && mView->LockLooper())
 	{
 		mView->ConvertToScreen(&point);
@@ -1624,18 +1610,16 @@ NS_METHOD nsWindow::SetColorMap(nsColorM
 //
 //-------------------------------------------------------------------------
 NS_METHOD nsWindow::Scroll(PRInt32 aDx, PRInt32 aDy, nsRect *aClipRect)
 {
 	// Switching trigger on
 	mIsScrolling = PR_TRUE;
 	//Preventing main view invalidation loop-chain  when children are moving
 	//by by hiding children nsWidgets.
-	//Maybe this method must be used wider, in move and resize chains
-	// and implemented in BeginResizingChildren or in Reset*Visibility() methods
 	//Children will be unhidden in ::Update() when called by other than gkview::Scroll() method.
 	HideKids(PR_TRUE);
 	if (mView && mView->LockLooper())
 	{
 		// Kill any attempt to invalidate until scroll is finished
 		mView->SetVisible(false);
 		
 		BRect src;
--- a/widget/src/beos/nsWindow.h
+++ b/widget/src/beos/nsWindow.h
@@ -160,18 +160,16 @@ public:
 	virtual void*           GetNativeData(PRUint32 aDataType);
 	NS_IMETHOD              SetColorMap(nsColorMap *aColorMap);
 	NS_IMETHOD              Scroll(PRInt32 aDx, PRInt32 aDy, nsRect *aClipRect);
 	NS_IMETHOD              SetTitle(const nsAString& aTitle);
 	NS_IMETHOD              SetMenuBar(void * aMenuBar) { return NS_ERROR_FAILURE; }
 	NS_IMETHOD              ShowMenuBar(PRBool aShow) { return NS_ERROR_FAILURE; }
 	NS_IMETHOD              WidgetToScreen(const nsRect& aOldRect, nsRect& aNewRect);
 	NS_IMETHOD              ScreenToWidget(const nsRect& aOldRect, nsRect& aNewRect);
-	NS_IMETHOD              BeginResizingChildren(void);
-	NS_IMETHOD              EndResizingChildren(void);
 	NS_IMETHOD              DispatchEvent(nsGUIEvent* event, nsEventStatus & aStatus);
 	NS_IMETHOD              HideWindowChrome(PRBool aShouldHide);
 
 	virtual void            ConvertToDeviceCoordinates(nscoord	&aX,nscoord	&aY) {}
 
 
 	// nsSwitchToUIThread interface
 	virtual bool            CallMethod(MethodInfo *info);
--- a/widget/src/cocoa/nsChildView.h
+++ b/widget/src/cocoa/nsChildView.h
@@ -349,18 +349,16 @@ public:
   NS_IMETHOD              Validate();
 
   virtual void*           GetNativeData(PRUint32 aDataType);
   virtual nsresult        ConfigureChildren(const nsTArray<Configuration>& aConfigurations);
   virtual void            Scroll(const nsIntPoint& aDelta,
                                  const nsIntRect& aSource,
                                  const nsTArray<Configuration>& aConfigurations);
   virtual nsIntPoint      WidgetToScreenOffset();
-  NS_IMETHOD              BeginResizingChildren(void);
-  NS_IMETHOD              EndResizingChildren(void);
   virtual PRBool          ShowsResizeIndicator(nsIntRect* aResizerRect);
 
   static  PRBool          ConvertStatus(nsEventStatus aStatus)
                           { return aStatus == nsEventStatus_eConsumeNoDefault; }
   NS_IMETHOD              DispatchEvent(nsGUIEvent* event, nsEventStatus & aStatus);
 
   NS_IMETHOD              Update();
 
--- a/widget/src/cocoa/nsChildView.mm
+++ b/widget/src/cocoa/nsChildView.mm
@@ -1181,27 +1181,16 @@ NS_IMETHODIMP nsChildView::Resize(PRInt3
   if (isResizing)
     ReportSizeEvent();
 
   return NS_OK;
 
   NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT;
 }
 
-NS_IMETHODIMP nsChildView::BeginResizingChildren(void)
-{
-  return NS_OK;
-}
-
-
-NS_IMETHODIMP nsChildView::EndResizingChildren(void)
-{
-  return NS_OK;
-}
-
 static const PRInt32 resizeIndicatorWidth = 15;
 static const PRInt32 resizeIndicatorHeight = 15;
 PRBool nsChildView::ShowsResizeIndicator(nsIntRect* aResizerRect)
 {
   NSView *topLevelView = mView, *superView = nil;
   while ((superView = [topLevelView superview]))
     topLevelView = superView;
 
--- a/widget/src/cocoa/nsCocoaWindow.h
+++ b/widget/src/cocoa/nsCocoaWindow.h
@@ -225,18 +225,16 @@ public:
     NS_IMETHOD              SetTitle(const nsAString& aTitle);
 
     NS_IMETHOD Invalidate(const nsIntRect &aRect, PRBool aIsSynchronous);
     NS_IMETHOD Invalidate(PRBool aIsSynchronous);
     NS_IMETHOD Update();
     virtual nsresult ConfigureChildren(const nsTArray<Configuration>& aConfigurations);
     virtual void Scroll(const nsIntPoint& aDelta, const nsIntRect& aSource,
                         const nsTArray<Configuration>& aConfigurations);
-    NS_IMETHOD BeginResizingChildren(void) { return NS_OK; }
-    NS_IMETHOD EndResizingChildren(void) { return NS_OK; }
     NS_IMETHOD DispatchEvent(nsGUIEvent* event, nsEventStatus & aStatus) ;
     NS_IMETHOD CaptureRollupEvents(nsIRollupListener * aListener, PRBool aDoCapture, PRBool aConsumeRollupEvent);
     NS_IMETHOD GetAttention(PRInt32 aCycleCount);
     virtual PRBool HasPendingInputEvent();
     virtual nsTransparencyMode GetTransparencyMode();
     virtual void SetTransparencyMode(nsTransparencyMode aMode);
     NS_IMETHOD SetWindowShadowStyle(PRInt32 aStyle);
     NS_IMETHOD SetWindowTitlebarColor(nscolor aColor, PRBool aActive);
--- a/widget/src/gtk2/nsWindow.cpp
+++ b/widget/src/gtk2/nsWindow.cpp
@@ -1902,28 +1902,16 @@ nsWindow::WidgetToScreenOffset()
         gdk_window_get_origin(mGdkWindow, &x, &y);
         LOG(("WidgetToScreenOffset (drawing) %d %d\n", x, y));
     }
 
     return nsIntPoint(x, y);
 }
 
 NS_IMETHODIMP
-nsWindow::BeginResizingChildren(void)
-{
-    return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-NS_IMETHODIMP
-nsWindow::EndResizingChildren(void)
-{
-    return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-NS_IMETHODIMP
 nsWindow::EnableDragDrop(PRBool aEnable)
 {
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsWindow::PreCreateWidget(nsWidgetInitData *aWidgetInitData)
 {
--- a/widget/src/gtk2/nsWindow.h
+++ b/widget/src/gtk2/nsWindow.h
@@ -189,18 +189,16 @@ public:
     virtual void       Scroll(const nsIntPoint& aDelta, const nsIntRect& aSource,
                               const nsTArray<Configuration>& aReconfigureChildren);
     virtual void*      GetNativeData(PRUint32 aDataType);
     NS_IMETHOD         SetBorderStyle(nsBorderStyle aBorderStyle);
     NS_IMETHOD         SetTitle(const nsAString& aTitle);
     NS_IMETHOD         SetIcon(const nsAString& aIconSpec);
     NS_IMETHOD         SetWindowClass(const nsAString& xulWinType);
     virtual nsIntPoint WidgetToScreenOffset();
-    NS_IMETHOD         BeginResizingChildren(void);
-    NS_IMETHOD         EndResizingChildren(void);
     NS_IMETHOD         EnableDragDrop(PRBool aEnable);
     NS_IMETHOD         PreCreateWidget(nsWidgetInitData *aWidgetInitData);
     NS_IMETHOD         CaptureMouse(PRBool aCapture);
     NS_IMETHOD         CaptureRollupEvents(nsIRollupListener *aListener,
                                            PRBool aDoCapture,
                                            PRBool aConsumeRollupEvent);
     NS_IMETHOD         GetAttention(PRInt32 aCycleCount);
 
--- a/widget/src/os2/nsWindow.cpp
+++ b/widget/src/os2/nsWindow.cpp
@@ -308,69 +308,16 @@ NS_METHOD nsWindow::CaptureMouse(PRBool 
   if (PR_TRUE == aCapture) { 
     WinSetCapture( HWND_DESKTOP, mWnd);
   } else {
     WinSetCapture( HWND_DESKTOP, NULLHANDLE);
   }
   return NS_OK;
 }
 
-
-//-------------------------------------------------------------------------
-//
-// Deferred Window positioning
-//
-//-------------------------------------------------------------------------
-
-NS_METHOD nsWindow::BeginResizingChildren(void)
-{
-   if( !mSWPs)
-   {
-      mlHave = 10;
-      mlUsed = 0;
-      mSWPs = (PSWP) malloc( 10 * sizeof( SWP));
-   }
-   return NS_OK;
-}
-
-void nsWindow::DeferPosition( HWND hwnd, HWND hwndInsertBehind,
-                              long x, long y, long cx, long cy, ULONG flags)
-{
-   if( mSWPs)
-   {
-      if( mlHave == mlUsed) // need more swps
-      {
-         mlHave += 10;
-         mSWPs = (PSWP) realloc( mSWPs, mlHave * sizeof( SWP));
-      }
-      mSWPs[ mlUsed].hwnd = hwnd;
-      mSWPs[ mlUsed].hwndInsertBehind = hwndInsertBehind;
-      mSWPs[ mlUsed].x = x;
-      mSWPs[ mlUsed].y = y;
-      mSWPs[ mlUsed].cx = cx;
-      mSWPs[ mlUsed].cy = cy;
-      mSWPs[ mlUsed].fl = flags;
-      mSWPs[ mlUsed].ulReserved1 = 0;
-      mSWPs[ mlUsed].ulReserved2 = 0;
-      mlUsed++;
-   }
-}
-
-NS_METHOD nsWindow::EndResizingChildren(void)
-{
-   if( nsnull != mSWPs)
-   {
-      WinSetMultWindowPos( 0/*hab*/, mSWPs, mlUsed);
-      free( mSWPs);
-      mSWPs = nsnull;
-      mlUsed = mlHave = 0;
-   }
-   return NS_OK;
-}
-
 nsIntPoint nsWindow::WidgetToScreenOffset()
 {
   POINTL point = { 0, 0 };
   NS2PM( point);
 
   WinMapWindowPoints( mWnd, HWND_DESKTOP, &point, 1);
 
   return nsIntPoint(point.x,
--- a/widget/src/os2/nsWindow.h
+++ b/widget/src/os2/nsWindow.h
@@ -149,18 +149,16 @@ class nsWindow : public nsBaseWidget,
    NS_IMETHOD GetBounds(nsIntRect &aRect);
    NS_IMETHOD IsVisible( PRBool &aState);
    NS_IMETHOD PlaceBehind(nsTopLevelWidgetZPlacement aPlacement,
                           nsIWidget *aWidget, PRBool aActivate);
    NS_IMETHOD SetZIndex(PRInt32 aZIndex);
 
    NS_IMETHOD CaptureMouse(PRBool aCapture);
 
-   NS_IMETHOD BeginResizingChildren();
-   NS_IMETHOD EndResizingChildren();
    virtual nsIntPoint WidgetToScreenOffset();
    NS_IMETHOD DispatchEvent( struct nsGUIEvent *event, nsEventStatus &aStatus);
    NS_IMETHOD CaptureRollupEvents(nsIRollupListener * aListener, PRBool aDoCapture, PRBool aConsumeRollupEvent);
 
    virtual PRBool          HasPendingInputEvent();
 
    // Widget appearance
    NS_IMETHOD              SetCursor( nsCursor aCursor);
--- a/widget/src/photon/nsWidget.h
+++ b/widget/src/photon/nsWidget.h
@@ -152,28 +152,16 @@ public:
 
   inline NS_IMETHOD SetColorMap(nsColorMap *aColorMap) { return NS_OK; }
 
   inline void* GetNativeData(PRUint32 aDataType) { return (void *)mWidget; }
 
   NS_IMETHOD WidgetToScreen(const nsRect &aOldRect, nsRect &aNewRect);
   NS_IMETHOD ScreenToWidget(const nsRect &aOldRect, nsRect &aNewRect);
 
-  inline NS_IMETHOD BeginResizingChildren(void)
-		{
-		PtHold();
-		return NS_OK;
-		}
-
-  inline NS_IMETHOD EndResizingChildren(void)
-		{
-		PtRelease();
-		return NS_OK;
-		}
-
   // Use this to set the name of a widget for normal widgets.. not the same as the nsWindow version
   inline NS_IMETHOD SetTitle(const nsAString& aTitle) { return NS_OK; }
 
   inline void ConvertToDeviceCoordinates(nscoord &aX, nscoord &aY) { }
 
   // the following are nsWindow specific, and just stubbed here
   inline NS_IMETHOD Scroll(PRInt32 aDx, PRInt32 aDy, nsRect *aClipRect) { return NS_OK; }
   inline NS_IMETHOD ScrollWidgets(PRInt32 aDx, PRInt32 aDy) { return NS_OK; }
--- a/widget/src/qt/nsWindow.cpp
+++ b/widget/src/qt/nsWindow.cpp
@@ -795,28 +795,16 @@ nsWindow::WidgetToScreenOffset()
 
     QPoint origin(0, 0);
     origin = mWidget->mapToGlobal(origin);
 
     return nsIntPoint(origin.x(), origin.y());
 }
  
 NS_IMETHODIMP
-nsWindow::BeginResizingChildren(void)
-{
-    return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-NS_IMETHODIMP
-nsWindow::EndResizingChildren(void)
-{
-    return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-NS_IMETHODIMP
 nsWindow::EnableDragDrop(PRBool aEnable)
 {
     mWidget->setAcceptDrops(aEnable);
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsWindow::PreCreateWidget(nsWidgetInitData *aWidgetInitData)
--- a/widget/src/qt/nsWindow.h
+++ b/widget/src/qt/nsWindow.h
@@ -174,18 +174,16 @@ public:
 
     NS_IMETHOD         PreCreateWidget(nsWidgetInitData *aWidgetInitData);
 
     virtual void*      GetNativeData(PRUint32 aDataType);
     NS_IMETHOD         SetBorderStyle(nsBorderStyle aBorderStyle);
     NS_IMETHOD         SetTitle(const nsAString& aTitle);
     NS_IMETHOD         SetIcon(const nsAString& aIconSpec);
     virtual nsIntPoint WidgetToScreenOffset();
-    NS_IMETHOD         BeginResizingChildren(void);
-    NS_IMETHOD         EndResizingChildren(void);
     NS_IMETHOD         DispatchEvent(nsGUIEvent *aEvent, nsEventStatus &aStatus);
 
     NS_IMETHOD         EnableDragDrop(PRBool aEnable);
     NS_IMETHOD         CaptureMouse(PRBool aCapture);
     NS_IMETHOD         CaptureRollupEvents(nsIRollupListener *aListener,
                                            PRBool aDoCapture,
                                            PRBool aConsumeRollupEvent);
 
--- a/widget/src/windows/nsWindow.cpp
+++ b/widget/src/windows/nsWindow.cpp
@@ -313,17 +313,16 @@ nsWindow::nsWindow() : nsBaseWidget()
 #ifdef PR_LOGGING
   if (!gWindowsLog)
     gWindowsLog = PR_NewLogModule("nsWindowsWidgets");
 #endif
 
   mWnd                  = nsnull;
   mPaintDC              = nsnull;
   mPrevWndProc          = nsnull;
-  mDeferredPositioner   = nsnull;
   mOldIMC               = nsnull;
   mNativeDragTarget     = nsnull;
   mInDtor               = PR_FALSE;
   mIsVisible            = PR_FALSE;
   mHas3DBorder          = PR_FALSE;
   mIsInMouseCapture     = PR_FALSE;
   mIsPluginWindow       = PR_FALSE;
   mIsTopWidgetWindow    = PR_FALSE;
@@ -1266,35 +1265,20 @@ NS_METHOD nsWindow::Move(PRInt32 aX, PRI
           // no annoying assertions. just mention the issue.
           if (aX < 0 || aX >= workArea.right || aY < 0 || aY >= workArea.bottom)
             printf("window moved to offscreen position\n");
         }
       ::ReleaseDC(mWnd, dc);
       }
     }
 #endif
-
-    nsIWidget *par = GetParent();
-    HDWP      deferrer = NULL;
-
-    if (nsnull != par) {
-      deferrer = ((nsWindow *)par)->mDeferredPositioner;
-    }
-
-    if (NULL != deferrer) {
-      VERIFY(((nsWindow *)par)->mDeferredPositioner = ::DeferWindowPos(deferrer,
-                            mWnd, NULL, aX, aY, 0, 0,
-                            SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOSIZE));
-    }
-    else {
-      ClearThemeRegion();
-      VERIFY(::SetWindowPos(mWnd, NULL, aX, aY, 0, 0,
-                            SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOSIZE));
-      SetThemeRegion();
-    }
+    ClearThemeRegion();
+    VERIFY(::SetWindowPos(mWnd, NULL, aX, aY, 0, 0,
+                          SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOSIZE));
+    SetThemeRegion();
   }
   return NS_OK;
 }
 
 // Resize this component
 NS_METHOD nsWindow::Resize(PRInt32 aWidth, PRInt32 aHeight, PRBool aRepaint)
 {
   NS_ASSERTION((aWidth >=0 ) , "Negative width passed to nsWindow::Resize");
@@ -1305,39 +1289,27 @@ NS_METHOD nsWindow::Resize(PRInt32 aWidt
     ResizeTranslucentWindow(aWidth, aHeight);
 #endif
 
   // Set cached value for lightweight and printing
   mBounds.width  = aWidth;
   mBounds.height = aHeight;
 
   if (mWnd) {
-    nsIWidget *par = GetParent();
-    HDWP      deferrer = NULL;
-
-    if (nsnull != par) {
-      deferrer = ((nsWindow *)par)->mDeferredPositioner;
-    }
-
     UINT  flags = SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOMOVE;
+
 #ifndef WINCE
     if (!aRepaint) {
       flags |= SWP_NOREDRAW;
     }
 #endif
 
-    if (NULL != deferrer) {
-      VERIFY(((nsWindow *)par)->mDeferredPositioner = ::DeferWindowPos(deferrer,
-                            mWnd, NULL, 0, 0, aWidth, GetHeight(aHeight), flags));
-    }
-    else {
-      ClearThemeRegion();
-      VERIFY(::SetWindowPos(mWnd, NULL, 0, 0, aWidth, GetHeight(aHeight), flags));
-      SetThemeRegion();
-    }
+    ClearThemeRegion();
+    VERIFY(::SetWindowPos(mWnd, NULL, 0, 0, aWidth, GetHeight(aHeight), flags));
+    SetThemeRegion();
   }
 
   if (aRepaint)
     Invalidate(PR_FALSE);
 
   return NS_OK;
 }
 
@@ -1354,39 +1326,26 @@ NS_METHOD nsWindow::Resize(PRInt32 aX, P
 
   // Set cached value for lightweight and printing
   mBounds.x      = aX;
   mBounds.y      = aY;
   mBounds.width  = aWidth;
   mBounds.height = aHeight;
 
   if (mWnd) {
-    nsIWidget *par = GetParent();
-    HDWP      deferrer = NULL;
-
-    if (nsnull != par) {
-      deferrer = ((nsWindow *)par)->mDeferredPositioner;
-    }
-
     UINT  flags = SWP_NOZORDER | SWP_NOACTIVATE;
 #ifndef WINCE
     if (!aRepaint) {
       flags |= SWP_NOREDRAW;
     }
 #endif
 
-    if (NULL != deferrer) {
-      VERIFY(((nsWindow *)par)->mDeferredPositioner = ::DeferWindowPos(deferrer,
-                            mWnd, NULL, aX, aY, aWidth, GetHeight(aHeight), flags));
-    }
-    else {
-      ClearThemeRegion();
-      VERIFY(::SetWindowPos(mWnd, NULL, aX, aY, aWidth, GetHeight(aHeight), flags));
-      SetThemeRegion();
-    }
+    ClearThemeRegion();
+    VERIFY(::SetWindowPos(mWnd, NULL, aX, aY, aWidth, GetHeight(aHeight), flags));
+    SetThemeRegion();
   }
 
   if (aRepaint)
     Invalidate(PR_FALSE);
 
   return NS_OK;
 }
 
@@ -2539,61 +2498,16 @@ nsIntPoint nsWindow::WidgetToScreenOffse
   point.x = 0;
   point.y = 0;
   ::ClientToScreen(mWnd, &point);
   return nsIntPoint(point.x, point.y);
 }
 
 /**************************************************************
  *
- * SECTION: Deferred window positioning.
- *
- * nsIWidget::BeginResizingChildren,
- * nsIWidget::EndResizingChildren
- *
- * Filters child paint events during a resize operation.
- *
- **************************************************************/
-
-NS_METHOD nsWindow::BeginResizingChildren(void)
-{
-  if (NULL == mDeferredPositioner)
-    mDeferredPositioner = ::BeginDeferWindowPos(1);
-  return NS_OK;
-}
-
-NS_METHOD nsWindow::EndResizingChildren(void)
-{
-  if (NULL != mDeferredPositioner) {
-    ::EndDeferWindowPos(mDeferredPositioner);
-    mDeferredPositioner = NULL;
-  }
-  return NS_OK;
-}
-
-LPARAM nsWindow::lParamToScreen(LPARAM lParam)
-{
-  POINT pt;
-  pt.x = GET_X_LPARAM(lParam);
-  pt.y = GET_Y_LPARAM(lParam);
-  ::ClientToScreen(mWnd, &pt);
-  return MAKELPARAM(pt.x, pt.y);
-}
-
-LPARAM nsWindow::lParamToClient(LPARAM lParam)
-{
-  POINT pt;
-  pt.x = GET_X_LPARAM(lParam);
-  pt.y = GET_Y_LPARAM(lParam);
-  ::ScreenToClient(mWnd, &pt);
-  return MAKELPARAM(pt.x, pt.y);
-}
-
-/**************************************************************
- *
  * SECTION: nsIWidget::EnableDragDrop
  *
  * Enables/Disables drag and drop of files on this widget.
  *
  **************************************************************/
 
 #if !defined(WINCE) // implemented in nsWindowCE.cpp
 NS_METHOD nsWindow::EnableDragDrop(PRBool aEnable)
@@ -5693,23 +5607,16 @@ void nsWindow::OnDestroy()
   if (mtrailer) {
     if (mtrailer->GetMouseTrailerWindow() == mWnd)
       mtrailer->DestroyTimer();
 
     if (mtrailer->GetCaptureWindow() == mWnd)
       mtrailer->SetCaptureWindow(nsnull);
   }
 
-  // If we were in the middle of deferred window positioning then free the memory for the
-  // multiple-window position structure.
-  if (mDeferredPositioner) {
-    VERIFY(::EndDeferWindowPos(mDeferredPositioner));
-    mDeferredPositioner = NULL;
-  }
-
   // Free GDI window class objects
   if (mBrush) {
     VERIFY(::DeleteObject(mBrush));
     mBrush = NULL;
   }
 
   // Free app icon resources.
   HICON icon;
@@ -6632,16 +6539,34 @@ PRBool nsWindow::CanTakeFocus()
     GetWindowThreadProcessId(fgWnd, &pid);
     if (pid == GetCurrentProcessId()) {
       return PR_TRUE;
     }
   }
   return PR_FALSE;
 }
 
+LPARAM nsWindow::lParamToScreen(LPARAM lParam)
+{
+  POINT pt;
+  pt.x = GET_X_LPARAM(lParam);
+  pt.y = GET_Y_LPARAM(lParam);
+  ::ClientToScreen(mWnd, &pt);
+  return MAKELPARAM(pt.x, pt.y);
+}
+
+LPARAM nsWindow::lParamToClient(LPARAM lParam)
+{
+  POINT pt;
+  pt.x = GET_X_LPARAM(lParam);
+  pt.y = GET_Y_LPARAM(lParam);
+  ::ScreenToClient(mWnd, &pt);
+  return MAKELPARAM(pt.x, pt.y);
+}
+
 /**************************************************************
  **************************************************************
  **
  ** BLOCK: ChildWindow impl.
  **
  ** Child window overrides.
  **
  **************************************************************
@@ -6683,9 +6608,9 @@ PRBool ChildWindow::DispatchMouseEvent(P
 // return the style for a child nsWindow
 DWORD ChildWindow::WindowStyle()
 {
   DWORD style = WS_CLIPCHILDREN | nsWindow::WindowStyle();
   if (!(style & WS_POPUP))
     style |= WS_CHILD; // WS_POPUP and WS_CHILD are mutually exclusive.
   VERIFY_WINDOW_STYLE(style);
   return style;
-}
+}
\ No newline at end of file
--- a/widget/src/windows/nsWindow.h
+++ b/widget/src/windows/nsWindow.h
@@ -149,18 +149,16 @@ public:
   NS_IMETHOD              Update();
   virtual void            Scroll(const nsIntPoint& aDelta, const nsIntRect& aSource,
                                  const nsTArray<Configuration>& aReconfigureChildren);
   virtual void*           GetNativeData(PRUint32 aDataType);
   virtual void            FreeNativeData(void * data, PRUint32 aDataType);
   NS_IMETHOD              SetTitle(const nsAString& aTitle);
   NS_IMETHOD              SetIcon(const nsAString& aIconSpec);
   virtual nsIntPoint      WidgetToScreenOffset();
-  NS_IMETHOD              BeginResizingChildren(void);
-  NS_IMETHOD              EndResizingChildren(void);
   NS_IMETHOD              DispatchEvent(nsGUIEvent* event, nsEventStatus & aStatus);
   NS_IMETHOD              EnableDragDrop(PRBool aEnable);
   NS_IMETHOD              CaptureMouse(PRBool aCapture);
   NS_IMETHOD              CaptureRollupEvents(nsIRollupListener * aListener, PRBool aDoCapture, PRBool aConsumeRollupEvent);
   NS_IMETHOD              GetAttention(PRInt32 aCycleCount);
   virtual PRBool          HasPendingInputEvent();
   gfxASurface             *GetThebesSurface();
   NS_IMETHOD              OnDefaultButtonLoaded(const nsIntRect &aButtonRect);
@@ -427,17 +425,16 @@ protected:
   PRPackedBool          mInWheelProcessing;
   PRPackedBool          mUnicodeWidget;
   PRPackedBool          mIsPluginWindow;
   PRPackedBool          mPainting;
   char                  mLeadByte;
   PRUint32              mBlurSuppressLevel;
   nsContentType         mContentType;
   PRInt32               mMenuCmdId;
-  HDWP                  mDeferredPositioner;
   DWORD_PTR             mOldStyle;
   DWORD_PTR             mOldExStyle;
   HIMC                  mOldIMC;
   PRUint32              mIMEEnabled;
   nsNativeDragTarget*   mNativeDragTarget;
   HKL                   mLastKeyboardLayout;
   nsPopupType           mPopupType;