From be734f9e8f1ea0e6b3ccd6051b4d20bec3214fac Mon Sep 17 00:00:00 2001 From: "alex%croczilla.com" Date: Fri, 8 Oct 2004 14:58:00 +0000 Subject: [PATCH] Use GetGeometricParent() to determine geometric parent of XTF frames - see bug #253225, comment#30. r+sr=bzbarsky. Affects XTF-enabled builds only. --- layout/base/nsCSSFrameConstructor.cpp | 8 ++------ layout/html/style/src/nsCSSFrameConstructor.cpp | 8 ++------ 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/layout/base/nsCSSFrameConstructor.cpp b/layout/base/nsCSSFrameConstructor.cpp index d5f3ce1d0dd..d607f5eb047 100644 --- a/layout/base/nsCSSFrameConstructor.cpp +++ b/layout/base/nsCSSFrameConstructor.cpp @@ -6866,13 +6866,9 @@ nsCSSFrameConstructor::ConstructXTFFrame(nsIPresShell* aPresShell, // If we succeeded in creating a frame then initialize it, process its // children (if requested), and set the initial child list if (NS_SUCCEEDED(rv) && newFrame != nsnull) { - - nsIFrame* geometricParent = isAbsolutelyPositioned - ? aState.mAbsoluteItems.containingBlock - : aParentFrame; - InitAndRestoreFrame(aPresContext, aState, aContent, - geometricParent, aStyleContext, nsnull, newFrame); + aState.GetGeometricParent(disp, aParentFrame), + aStyleContext, nsnull, newFrame); nsHTMLContainerFrame::CreateViewForFrame(newFrame, aParentFrame, forceView); diff --git a/layout/html/style/src/nsCSSFrameConstructor.cpp b/layout/html/style/src/nsCSSFrameConstructor.cpp index d5f3ce1d0dd..d607f5eb047 100644 --- a/layout/html/style/src/nsCSSFrameConstructor.cpp +++ b/layout/html/style/src/nsCSSFrameConstructor.cpp @@ -6866,13 +6866,9 @@ nsCSSFrameConstructor::ConstructXTFFrame(nsIPresShell* aPresShell, // If we succeeded in creating a frame then initialize it, process its // children (if requested), and set the initial child list if (NS_SUCCEEDED(rv) && newFrame != nsnull) { - - nsIFrame* geometricParent = isAbsolutelyPositioned - ? aState.mAbsoluteItems.containingBlock - : aParentFrame; - InitAndRestoreFrame(aPresContext, aState, aContent, - geometricParent, aStyleContext, nsnull, newFrame); + aState.GetGeometricParent(disp, aParentFrame), + aStyleContext, nsnull, newFrame); nsHTMLContainerFrame::CreateViewForFrame(newFrame, aParentFrame, forceView);