From 15618cb256286b14edf8004ec3aea735d57f0180 Mon Sep 17 00:00:00 2001 From: "bzbarsky%mit.edu" Date: Tue, 5 Oct 2004 04:20:32 +0000 Subject: [PATCH] Fix absolute positioning of tables. Bug 262898, r+sr=roc git-svn-id: svn://10.0.0.236/trunk@163224 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/base/nsCSSFrameConstructor.cpp | 18 +++++++----------- .../html/style/src/nsCSSFrameConstructor.cpp | 18 +++++++----------- 2 files changed, 14 insertions(+), 22 deletions(-) diff --git a/mozilla/layout/base/nsCSSFrameConstructor.cpp b/mozilla/layout/base/nsCSSFrameConstructor.cpp index 39bee0354b6..be288ee04d9 100644 --- a/mozilla/layout/base/nsCSSFrameConstructor.cpp +++ b/mozilla/layout/base/nsCSSFrameConstructor.cpp @@ -6076,6 +6076,13 @@ nsCSSFrameConstructor::ConstructFrameByDisplayType(nsIPresShell* aPre aDisplay->IsBlockLevel(), "Style system did not apply CSS2.1 section 9.7 fixups"); + // See if it's absolute positioned or fixed positioned. + if (NS_STYLE_POSITION_ABSOLUTE == aDisplay->mPosition) { + isAbsolutelyPositioned = PR_TRUE; + } else if (NS_STYLE_POSITION_FIXED == aDisplay->mPosition) { + isFixedPositioned = PR_TRUE; + } + nsIFrame* adjParentFrame = aParentFrame; // if the new frame is not table related and the parent is a table, row group, or row, // then we need to get or create the pseudo table cell frame and use it as the parent. @@ -6127,12 +6134,6 @@ nsCSSFrameConstructor::ConstructFrameByDisplayType(nsIPresShell* aPre if (!pseudoParent && !aState.mPseudoFrames.IsEmpty()) { // process pending pseudo frames ProcessPseudoFrames(aPresContext, aState.mPseudoFrames, aFrameItems); } - // See if it's absolute positioned or fixed positioned - if (NS_STYLE_POSITION_ABSOLUTE == aDisplay->mPosition) { - isAbsolutelyPositioned = PR_TRUE; - } else if (NS_STYLE_POSITION_FIXED == aDisplay->mPosition) { - isFixedPositioned = PR_TRUE; - } // Initialize it nsIFrame* scrolledFrame = nsnull; @@ -6202,11 +6203,6 @@ nsCSSFrameConstructor::ConstructFrameByDisplayType(nsIPresShell* aPre if (!pseudoParent && !aState.mPseudoFrames.IsEmpty()) { // process pending pseudo frames ProcessPseudoFrames(aPresContext, aState.mPseudoFrames, aFrameItems); } - if (NS_STYLE_POSITION_ABSOLUTE == aDisplay->mPosition) { - isAbsolutelyPositioned = PR_TRUE; - } else { - isFixedPositioned = PR_TRUE; - } // Create a frame to wrap up the absolute positioned item NS_NewAbsoluteItemWrapperFrame(aPresShell, &newFrame); diff --git a/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp b/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp index 39bee0354b6..be288ee04d9 100644 --- a/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp +++ b/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp @@ -6076,6 +6076,13 @@ nsCSSFrameConstructor::ConstructFrameByDisplayType(nsIPresShell* aPre aDisplay->IsBlockLevel(), "Style system did not apply CSS2.1 section 9.7 fixups"); + // See if it's absolute positioned or fixed positioned. + if (NS_STYLE_POSITION_ABSOLUTE == aDisplay->mPosition) { + isAbsolutelyPositioned = PR_TRUE; + } else if (NS_STYLE_POSITION_FIXED == aDisplay->mPosition) { + isFixedPositioned = PR_TRUE; + } + nsIFrame* adjParentFrame = aParentFrame; // if the new frame is not table related and the parent is a table, row group, or row, // then we need to get or create the pseudo table cell frame and use it as the parent. @@ -6127,12 +6134,6 @@ nsCSSFrameConstructor::ConstructFrameByDisplayType(nsIPresShell* aPre if (!pseudoParent && !aState.mPseudoFrames.IsEmpty()) { // process pending pseudo frames ProcessPseudoFrames(aPresContext, aState.mPseudoFrames, aFrameItems); } - // See if it's absolute positioned or fixed positioned - if (NS_STYLE_POSITION_ABSOLUTE == aDisplay->mPosition) { - isAbsolutelyPositioned = PR_TRUE; - } else if (NS_STYLE_POSITION_FIXED == aDisplay->mPosition) { - isFixedPositioned = PR_TRUE; - } // Initialize it nsIFrame* scrolledFrame = nsnull; @@ -6202,11 +6203,6 @@ nsCSSFrameConstructor::ConstructFrameByDisplayType(nsIPresShell* aPre if (!pseudoParent && !aState.mPseudoFrames.IsEmpty()) { // process pending pseudo frames ProcessPseudoFrames(aPresContext, aState.mPseudoFrames, aFrameItems); } - if (NS_STYLE_POSITION_ABSOLUTE == aDisplay->mPosition) { - isAbsolutelyPositioned = PR_TRUE; - } else { - isFixedPositioned = PR_TRUE; - } // Create a frame to wrap up the absolute positioned item NS_NewAbsoluteItemWrapperFrame(aPresShell, &newFrame);