From 57048927ee52c7331626c954e4a4a0c696cf335b Mon Sep 17 00:00:00 2001 From: "karnaze%netscape.com" Date: Tue, 20 Mar 2001 15:53:29 +0000 Subject: [PATCH] bug 67864 - don't create anonymous ancestors of table inside caption. sr=attinasi. --- layout/base/nsCSSFrameConstructor.cpp | 3 ++- layout/html/style/src/nsCSSFrameConstructor.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/layout/base/nsCSSFrameConstructor.cpp b/layout/base/nsCSSFrameConstructor.cpp index a87acbb19736..b967f64ba976 100644 --- a/layout/base/nsCSSFrameConstructor.cpp +++ b/layout/base/nsCSSFrameConstructor.cpp @@ -2447,7 +2447,8 @@ nsCSSFrameConstructor::GetParentFrame(nsIPresShell* aPresShell, aIsPseudoParent = PR_FALSE; if (nsLayoutAtoms::tableOuterFrame == aChildFrameType) { // table child - if (IsTableRelated(parentFrameType.get(), PR_TRUE)) { // need pseudo cell parent + if (IsTableRelated(parentFrameType.get(), PR_TRUE) && + (nsLayoutAtoms::tableCaptionFrame != parentFrameType.get()) ) { // need pseudo cell parent rv = GetPseudoCellFrame(aPresShell, aPresContext, aTableCreator, aState, aParentFrameIn); if (NS_FAILED(rv)) return rv; pseudoParentFrame = pseudoFrames.mCellInner.mFrame; diff --git a/layout/html/style/src/nsCSSFrameConstructor.cpp b/layout/html/style/src/nsCSSFrameConstructor.cpp index a87acbb19736..b967f64ba976 100644 --- a/layout/html/style/src/nsCSSFrameConstructor.cpp +++ b/layout/html/style/src/nsCSSFrameConstructor.cpp @@ -2447,7 +2447,8 @@ nsCSSFrameConstructor::GetParentFrame(nsIPresShell* aPresShell, aIsPseudoParent = PR_FALSE; if (nsLayoutAtoms::tableOuterFrame == aChildFrameType) { // table child - if (IsTableRelated(parentFrameType.get(), PR_TRUE)) { // need pseudo cell parent + if (IsTableRelated(parentFrameType.get(), PR_TRUE) && + (nsLayoutAtoms::tableCaptionFrame != parentFrameType.get()) ) { // need pseudo cell parent rv = GetPseudoCellFrame(aPresShell, aPresContext, aTableCreator, aState, aParentFrameIn); if (NS_FAILED(rv)) return rv; pseudoParentFrame = pseudoFrames.mCellInner.mFrame;