From 3423003ece4f19c951ca982e3747027f9b22defb Mon Sep 17 00:00:00 2001 From: "troy%netscape.com" Date: Wed, 14 Jul 1999 15:11:37 +0000 Subject: [PATCH] Fix for bug #9733. Changed CantRenderReplacedElement() so it resets the primary frame mapping for the image --- layout/base/nsCSSFrameConstructor.cpp | 4 ++++ layout/html/style/src/nsCSSFrameConstructor.cpp | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/layout/base/nsCSSFrameConstructor.cpp b/layout/base/nsCSSFrameConstructor.cpp index 127546f56cab..90c06f61e62e 100644 --- a/layout/base/nsCSSFrameConstructor.cpp +++ b/layout/base/nsCSSFrameConstructor.cpp @@ -5441,6 +5441,10 @@ nsCSSFrameConstructor::CantRenderReplacedElement(nsIPresContext* aPresContext, if (NS_SUCCEEDED(rv)) { // Delete the current frame parentFrame->RemoveFrame(*aPresContext, *presShell, listName, aFrame); + + // Reset the primary frame mapping + presShell->SetPrimaryFrameFor(content, newFrame); + if (placeholderFrame) { // Remove the association between the old frame and its placeholder presShell->SetPlaceholderFrameFor(aFrame, nsnull); diff --git a/layout/html/style/src/nsCSSFrameConstructor.cpp b/layout/html/style/src/nsCSSFrameConstructor.cpp index 127546f56cab..90c06f61e62e 100644 --- a/layout/html/style/src/nsCSSFrameConstructor.cpp +++ b/layout/html/style/src/nsCSSFrameConstructor.cpp @@ -5441,6 +5441,10 @@ nsCSSFrameConstructor::CantRenderReplacedElement(nsIPresContext* aPresContext, if (NS_SUCCEEDED(rv)) { // Delete the current frame parentFrame->RemoveFrame(*aPresContext, *presShell, listName, aFrame); + + // Reset the primary frame mapping + presShell->SetPrimaryFrameFor(content, newFrame); + if (placeholderFrame) { // Remove the association between the old frame and its placeholder presShell->SetPlaceholderFrameFor(aFrame, nsnull);