diff --git a/mozilla/layout/xul/base/src/nsMenuFrame.cpp b/mozilla/layout/xul/base/src/nsMenuFrame.cpp index 41feefd9905..0dc1d833c19 100644 --- a/mozilla/layout/xul/base/src/nsMenuFrame.cpp +++ b/mozilla/layout/xul/base/src/nsMenuFrame.cpp @@ -1154,6 +1154,7 @@ nsMenuFrame::RemoveFrame(nsIAtom* aListName, // Go ahead and remove this frame. mPopupFrame->Destroy(); mPopupFrame = nsnull; + mLastPref.SizeTo(-1, -1); PresContext()->PresShell()-> FrameNeedsReflow(this, nsIPresShell::eTreeChange, NS_FRAME_HAS_DIRTY_CHILDREN); @@ -1174,6 +1175,7 @@ nsMenuFrame::InsertFrames(nsIAtom* aListName, if (!mPopupFrame && aFrameList->GetType() == nsGkAtoms::menuPopupFrame) { mPopupFrame = static_cast(aFrameList); + mLastPref.SizeTo(-1, -1); #ifdef DEBUG_LAYOUT nsBoxLayoutState state(PresContext()); @@ -1201,6 +1203,7 @@ nsMenuFrame::AppendFrames(nsIAtom* aListName, if (!mPopupFrame && aFrameList->GetType() == nsGkAtoms::menuPopupFrame) { mPopupFrame = static_cast(aFrameList); + mLastPref.SizeTo(-1, -1); #ifdef DEBUG_LAYOUT nsBoxLayoutState state(PresContext()); diff --git a/mozilla/toolkit/content/tests/widgets/Makefile.in b/mozilla/toolkit/content/tests/widgets/Makefile.in index 309052fc0a3..935552ed0b1 100644 --- a/mozilla/toolkit/content/tests/widgets/Makefile.in +++ b/mozilla/toolkit/content/tests/widgets/Makefile.in @@ -49,6 +49,7 @@ _TEST_FILES = test_bug360220.xul \ test_bug365773.xul \ test_colorpicker_popup.xul \ test_popup_coords.xul \ + test_popup_recreate.xul \ $(NULL) libs:: $(_TEST_FILES) diff --git a/mozilla/toolkit/content/tests/widgets/test_popup_recreate.xul b/mozilla/toolkit/content/tests/widgets/test_popup_recreate.xul new file mode 100644 index 00000000000..0078d81c082 --- /dev/null +++ b/mozilla/toolkit/content/tests/widgets/test_popup_recreate.xul @@ -0,0 +1,81 @@ + + + + + + + Popup Recreate Test + + + + + + + + + + + + + + + + + +

+

+ +
+
+ + +