From 116adff63159ba28dd07dc0a2c697defaaf02769 Mon Sep 17 00:00:00 2001 From: "bzbarsky%mit.edu" Date: Tue, 29 Mar 2005 22:36:06 +0000 Subject: [PATCH] Don't walk through placeholders to out-of-flows that are our descendants when we destroy a frame subtree. Bug 271151, r=rbs, sr=dbaron git-svn-id: svn://10.0.0.236/trunk@171342 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/base/nsCSSFrameConstructor.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/mozilla/layout/base/nsCSSFrameConstructor.cpp b/mozilla/layout/base/nsCSSFrameConstructor.cpp index ff00794e887..61807886a1a 100644 --- a/mozilla/layout/base/nsCSSFrameConstructor.cpp +++ b/mozilla/layout/base/nsCSSFrameConstructor.cpp @@ -9498,11 +9498,16 @@ DoDeletingFrameSubtree(nsPresContext* aPresContext, !nsLayoutUtils::IsProperAncestorFrame(aRemovedFrame, outOfFlowFrame)) { if (aDestroyQueue.IndexOf(outOfFlowFrame) < 0) aDestroyQueue.AppendElement(outOfFlowFrame); + + // We want to descend into the out-of-flow frame's subtree, + // not the placeholder frame's! + subtree = outOfFlowFrame; } - // We want to descend into the out-of-flow frame's subtree, - // not the placeholder frame's! - subtree = outOfFlowFrame; + // Note that if outOfFlowFrame is aRemovedFrame's descendant we don't + // need to explicitly recurse into outOfFlowFrame here, since we'll do + // it whenever we recurse into the appropriate child and into its + // appropriate child list. } // Recursively find and delete any of its out-of-flow frames,