From f8a57076f669f69e21b5ba0390d004d02c6d02de Mon Sep 17 00:00:00 2001 From: "bmlk%gmx.de" Date: Sat, 8 Apr 2006 06:10:39 +0000 Subject: [PATCH] make sure that we process colgroup and rowgroup pseudos in parallel, otherwise we would lose one of them 325984 r/sr=bzbarsky --- layout/base/nsCSSFrameConstructor.cpp | 34 ++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/layout/base/nsCSSFrameConstructor.cpp b/layout/base/nsCSSFrameConstructor.cpp index 7086b99b4e2d..78963fb4b907 100644 --- a/layout/base/nsCSSFrameConstructor.cpp +++ b/layout/base/nsCSSFrameConstructor.cpp @@ -2715,8 +2715,17 @@ ProcessPseudoFrames(nsFrameConstructorState& aState, rv = ProcessPseudoFrame(presContext, pseudoFrames.mRowGroup, aHighestFrame); if (nsLayoutAtoms::tableRowGroupFrame == aHighestType) return rv; if (pseudoFrames.mColGroup.mFrame) { + nsIFrame* colGroupHigh; rv = ProcessPseudoFrame(presContext, pseudoFrames.mColGroup, - aHighestFrame); + colGroupHigh); + if (aHighestFrame) { + // table frames are special they can have two types of pseudo frames + // that need to be processed in one pass, we suffer here from having + // the colgroup and the rowgroup on the same childlist + // we sort this out inside nsTableFrame + colGroupHigh->SetNextSibling(aHighestFrame); + } + aHighestFrame = colGroupHigh; if (nsLayoutAtoms::tableColGroupFrame == aHighestType) return rv; } if (pseudoFrames.mTableOuter.mFrame) { @@ -2741,8 +2750,18 @@ ProcessPseudoFrames(nsFrameConstructorState& aState, if (nsLayoutAtoms::tableRowGroupFrame == aHighestType) return rv; } if (pseudoFrames.mColGroup.mFrame) { + nsIFrame* colGroupHigh; rv = ProcessPseudoFrame(presContext, pseudoFrames.mColGroup, - aHighestFrame); + colGroupHigh); + if (aHighestFrame && + nsLayoutAtoms::tableRowGroupFrame == aHighestFrame->GetType() ) { + // table frames are special they can have two types of pseudo frames + // that need to be processed in one pass, we suffer here from having + // the colgroup and the rowgroup on the same childlist + // we sort this out inside nsTableFrame + colGroupHigh->SetNextSibling(aHighestFrame); + } + aHighestFrame = colGroupHigh; if (nsLayoutAtoms::tableColGroupFrame == aHighestType) return rv; } if (pseudoFrames.mTableOuter.mFrame) { @@ -2767,8 +2786,17 @@ ProcessPseudoFrames(nsFrameConstructorState& aState, if (nsLayoutAtoms::tableRowGroupFrame == aHighestType) return rv; } if (pseudoFrames.mColGroup.mFrame) { + nsIFrame* colGroupHigh; rv = ProcessPseudoFrame(presContext, pseudoFrames.mColGroup, - aHighestFrame); + colGroupHigh); + if (aHighestFrame && nsLayoutAtoms::tableRowGroupFrame == aHighestFrame->GetType() ) { + // table frames are special they can have two types of pseudo frames + // that need to be processed in one pass, we suffer here from having + // the colgroup and the rowgroup on the same childlist + // we sort this out inside nsTableFrame + colGroupHigh->SetNextSibling(aHighestFrame); + } + aHighestFrame = colGroupHigh; if (nsLayoutAtoms::tableColGroupFrame == aHighestType) return rv; } if (pseudoFrames.mTableOuter.mFrame) {