pseudo rowgroups might be wrapped in a scrollframe, bug 331679 r/sr=bzbarsky a=roc

git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_8_BRANCH@200231 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bmlk%gmx.de
2006-06-18 06:37:28 +00:00
parent 1d7913440a
commit c6f03c2db7

View File

@@ -2490,6 +2490,25 @@ ProcessPseudoFrame(nsPresContext* aPresContext,
return rv;
}
static nsresult
ProcessPseudoRowGroupFrame(nsPresContext* aPresContext,
nsPseudoFrameData& aPseudoData,
nsIFrame*& aParent)
{
nsresult rv = NS_OK;
if (!aPresContext) return rv;
aParent = aPseudoData.mFrame;
nsTableRowGroupFrame* rgFrame = nsTableFrame::GetRowGroupFrame(aParent);
nsFrameItems* items = &aPseudoData.mChildList;
if (items && items->childList) {
rv = rgFrame->SetInitialChildList(aPresContext, nsnull, items->childList);
if (NS_FAILED(rv)) return rv;
}
aPseudoData.Reset();
return rv;
}
static nsresult
ProcessPseudoTableFrame(nsPresContext* aPresContext,
nsPseudoFrames& aPseudoFrames,
@@ -2580,12 +2599,12 @@ ProcessPseudoFrames(nsFrameConstructorState& aState,
if (nsLayoutAtoms::tableRowFrame == aHighestType) return rv;
}
if (pseudoFrames.mRowGroup.mFrame) {
rv = ProcessPseudoFrame(presContext, pseudoFrames.mRowGroup, aHighestFrame);
rv = ProcessPseudoRowGroupFrame(presContext, pseudoFrames.mRowGroup, aHighestFrame);
if (nsLayoutAtoms::tableRowGroupFrame == aHighestType) return rv;
}
}
else if (nsLayoutAtoms::tableRowGroupFrame == pseudoFrames.mLowestType) {
rv = ProcessPseudoFrame(presContext, pseudoFrames.mRowGroup, aHighestFrame);
rv = ProcessPseudoRowGroupFrame(presContext, pseudoFrames.mRowGroup, aHighestFrame);
if (nsLayoutAtoms::tableRowGroupFrame == aHighestType) return rv;
if (pseudoFrames.mTableOuter.mFrame) {
@@ -2606,7 +2625,7 @@ ProcessPseudoFrames(nsFrameConstructorState& aState,
if (nsLayoutAtoms::tableRowFrame == aHighestType) return rv;
if (pseudoFrames.mRowGroup.mFrame) {
rv = ProcessPseudoFrame(presContext, pseudoFrames.mRowGroup, aHighestFrame);
rv = ProcessPseudoRowGroupFrame(presContext, pseudoFrames.mRowGroup, aHighestFrame);
if (nsLayoutAtoms::tableRowGroupFrame == aHighestType) return rv;
}
if (pseudoFrames.mTableOuter.mFrame) {
@@ -2627,7 +2646,7 @@ ProcessPseudoFrames(nsFrameConstructorState& aState,
if (nsLayoutAtoms::tableRowFrame == aHighestType) return rv;
}
if (pseudoFrames.mRowGroup.mFrame) {
rv = ProcessPseudoFrame(presContext, pseudoFrames.mRowGroup, aHighestFrame);
rv = ProcessPseudoRowGroupFrame(presContext, pseudoFrames.mRowGroup, aHighestFrame);
if (nsLayoutAtoms::tableRowGroupFrame == aHighestType) return rv;
}
if (pseudoFrames.mTableOuter.mFrame) {
@@ -2864,8 +2883,10 @@ nsCSSFrameConstructor::CreatePseudoRowFrame(nsTableCreator& aTableCreat
{
nsresult rv = NS_OK;
nsIFrame* parentFrame = (aState.mPseudoFrames.mRowGroup.mFrame)
? aState.mPseudoFrames.mRowGroup.mFrame : aParentFrameIn;
nsIFrame* parentFrame = aParentFrameIn;
if (aState.mPseudoFrames.mRowGroup.mFrame) {
parentFrame = (nsIFrame*) nsTableFrame::GetRowGroupFrame(aState.mPseudoFrames.mRowGroup.mFrame);
}
if (!parentFrame) return rv;
nsStyleContext *parentStyle;