From 512e336be5ceebd4ac5ac1b816cd53aec70459ba Mon Sep 17 00:00:00 2001 From: Mats Palmgren Date: Wed, 14 Apr 2010 18:55:33 +0200 Subject: [PATCH] Bug 507775. r=bzbarsky sr=roc --- layout/base/nsCSSFrameConstructor.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/layout/base/nsCSSFrameConstructor.cpp b/layout/base/nsCSSFrameConstructor.cpp index 3f57bb8f3626..23ec7eca3260 100644 --- a/layout/base/nsCSSFrameConstructor.cpp +++ b/layout/base/nsCSSFrameConstructor.cpp @@ -8503,6 +8503,16 @@ nsCSSFrameConstructor::MaybeRecreateContainerForFrameRemoval(nsIFrame* aFrame, return PR_TRUE; } +#ifdef MOZ_XUL + if (aFrame->GetType() == nsGkAtoms::popupSetFrame) { + nsIRootBox* rootBox = nsIRootBox::GetRootBox(mPresShell); + if (rootBox && rootBox->GetPopupSetFrame() == aFrame) { + *aResult = ReconstructDocElementHierarchy(); + return PR_TRUE; + } + } +#endif + // We might still need to reconstruct things if the parent of inFlowFrame is // special, since in that case the removal of aFrame might affect the // splitting of its parent.