Bug 471543, r=enndeakin, sr=roc,
authorOlli Pettay <Olli.Pettay@helsinki.fi>
Wed, 31 Dec 2008 11:29:22 +0200
changeset 23206 cf6fec646560305555a14755418b20bc190a39d6
parent 23205 219526c76f59e01a423952fcfab2a8a4003c76f1
child 23207 91a98e404def73572eeaf7d9bd2cef5381937d2f
push id4391
push useropettay@mozilla.com
push dateWed, 31 Dec 2008 09:29:40 +0000
treeherdermozilla-central@cf6fec646560 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersenndeakin, roc
bugs471543
milestone1.9.2a1pre
Bug 471543, r=enndeakin, sr=roc,
layout/xul/base/src/nsMenuPopupFrame.cpp
--- a/layout/xul/base/src/nsMenuPopupFrame.cpp
+++ b/layout/xul/base/src/nsMenuPopupFrame.cpp
@@ -79,16 +79,17 @@
 #include "nsIEventStateManager.h"
 #include "nsIBoxLayout.h"
 #include "nsIPopupBoxObject.h"
 #include "nsIReflowCallback.h"
 #include "nsBindingManager.h"
 #include "nsIDocShellTreeOwner.h"
 #include "nsIBaseWindow.h"
 #include "nsISound.h"
+#include "nsIRootBox.h"
 
 PRInt8 nsMenuPopupFrame::sDefaultLevelParent = -1;
 
 // NS_NewMenuPopupFrame
 //
 // Wrapper for creating a new menu popup container
 //
 nsIFrame*
@@ -1482,16 +1483,22 @@ nsMenuPopupFrame::MoveToAttributePositio
 
 void
 nsMenuPopupFrame::Destroy()
 {
   nsXULPopupManager* pm = nsXULPopupManager::GetInstance();
   if (pm)
     pm->PopupDestroyed(this);
 
+  nsIRootBox* rootBox =
+    nsIRootBox::GetRootBox(PresContext()->GetPresShell());
+  if (rootBox && rootBox->GetDefaultTooltip() == mContent) {
+    rootBox->SetDefaultTooltip(nsnull);
+  }
+
   nsBoxFrame::Destroy();
 }
 
 void
 nsMenuPopupFrame::MoveTo(PRInt32 aLeft, PRInt32 aTop)
 {
   // Set the 'left' and 'top' attributes
   nsAutoString left, top;