Bug 851641. Ignore move/resize notifications for popups whose widget is hidden because this likely means they are notifications about our own move/resize requests. r=mats
authorTimothy Nikkel <tnikkel@gmail.com>
Sun, 28 Apr 2013 15:27:25 -0500
changeset 141976 e116c3a3476406f91bff7b62c26a05e6829a7636
parent 141975 2fbb0094f6f4b69705bb29b2289bcc92ca50459d
child 141977 3b3d66182d26817017b922bb9d22a40f0cf04af2
push id350
push userbbajaj@mozilla.com
push dateMon, 29 Jul 2013 23:00:49 +0000
treeherdermozilla-release@064965b37dbd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmats
bugs851641
milestone23.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 851641. Ignore move/resize notifications for popups whose widget is hidden because this likely means they are notifications about our own move/resize requests. r=mats
layout/xul/base/src/nsXULPopupManager.cpp
--- a/layout/xul/base/src/nsXULPopupManager.cpp
+++ b/layout/xul/base/src/nsXULPopupManager.cpp
@@ -336,16 +336,20 @@ nsMenuPopupFrame* GetPopupToMoveOrResize
   nsMenuPopupFrame* menuPopupFrame = do_QueryFrame(aFrame);
   if (!menuPopupFrame)
     return nullptr;
 
   // no point moving or resizing hidden popups
   if (menuPopupFrame->PopupState() != ePopupOpenAndVisible)
     return nullptr;
 
+  nsIWidget* widget = menuPopupFrame->GetWidget();
+  if (widget && !widget->IsVisible())
+    return nullptr;
+
   return menuPopupFrame;
 }
 
 void
 nsXULPopupManager::PopupMoved(nsIFrame* aFrame, nsIntPoint aPnt)
 {
   nsMenuPopupFrame* menuPopupFrame = GetPopupToMoveOrResize(aFrame);
   if (!menuPopupFrame)