From 7713e7865be0596231fe9417472bc7263530566f Mon Sep 17 00:00:00 2001 From: "hyatt%netscape.com" Date: Thu, 27 Sep 2001 21:32:44 +0000 Subject: [PATCH] Fix for 101510, crash when clicking on font dropdown in prefs. r/sr=dbaron,waterson --- layout/base/nsCSSFrameConstructor.cpp | 8 ++++---- layout/html/style/src/nsCSSFrameConstructor.cpp | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/layout/base/nsCSSFrameConstructor.cpp b/layout/base/nsCSSFrameConstructor.cpp index 2abdbbd1f20b..026299fe36ea 100644 --- a/layout/base/nsCSSFrameConstructor.cpp +++ b/layout/base/nsCSSFrameConstructor.cpp @@ -9105,14 +9105,14 @@ nsCSSFrameConstructor::ContentRemoved(nsIPresContext* aPresContext, const nsStyleDisplay* display; childFrame->GetStyleData(eStyleStruct_Display, (const nsStyleStruct*&)display); - if (display->mDisplay == NS_STYLE_DISPLAY_POPUP) { + nsIFrame* placeholderFrame = nsnull; + if (display->mDisplay == NS_STYLE_DISPLAY_POPUP) // Get the placeholder frame - nsIFrame* placeholderFrame; frameManager->GetPlaceholderFrameFor(childFrame, &placeholderFrame); - + if (placeholderFrame) { // Remove the mapping from the frame to its placeholder frameManager->SetPlaceholderFrameFor(childFrame, nsnull); - + // Locate the root popup set and remove ourselves from the popup set's list // of popup frames. nsIFrame* rootFrame; diff --git a/layout/html/style/src/nsCSSFrameConstructor.cpp b/layout/html/style/src/nsCSSFrameConstructor.cpp index 2abdbbd1f20b..026299fe36ea 100644 --- a/layout/html/style/src/nsCSSFrameConstructor.cpp +++ b/layout/html/style/src/nsCSSFrameConstructor.cpp @@ -9105,14 +9105,14 @@ nsCSSFrameConstructor::ContentRemoved(nsIPresContext* aPresContext, const nsStyleDisplay* display; childFrame->GetStyleData(eStyleStruct_Display, (const nsStyleStruct*&)display); - if (display->mDisplay == NS_STYLE_DISPLAY_POPUP) { + nsIFrame* placeholderFrame = nsnull; + if (display->mDisplay == NS_STYLE_DISPLAY_POPUP) // Get the placeholder frame - nsIFrame* placeholderFrame; frameManager->GetPlaceholderFrameFor(childFrame, &placeholderFrame); - + if (placeholderFrame) { // Remove the mapping from the frame to its placeholder frameManager->SetPlaceholderFrameFor(childFrame, nsnull); - + // Locate the root popup set and remove ourselves from the popup set's list // of popup frames. nsIFrame* rootFrame;