revert caption parent frame lookup logic as tags with display: table-caption are not allways just below a table tag bug 284575 r/sr=bzbarsky

git-svn-id: svn://10.0.0.236/trunk@170569 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bmlk%gmx.de 2005-03-11 19:21:23 +00:00
parent a477d12723
commit a8c743d86b

View File

@ -2257,12 +2257,12 @@ IsTableRelated(nsIAtom* aParentType,
}
static nsIFrame*
GetOuterTableFrame(nsIFrame* aParentFrame)
AdjustCaptionParentFrame(nsIFrame* aParentFrame)
{
if (nsLayoutAtoms::tableOuterFrame == aParentFrame->GetType()) {
return aParentFrame;
if (nsLayoutAtoms::tableFrame == aParentFrame->GetType()) {
return aParentFrame->GetParent();;
}
return aParentFrame->GetParent();
return aParentFrame;
}
static nsresult
@ -3727,7 +3727,7 @@ nsCSSFrameConstructor::TableProcessChild(nsFrameConstructorState& aState,
case NS_STYLE_DISPLAY_TABLE_CAPTION:
if (!aCaption) { // only allow one caption
nsIFrame* parentFrame = GetOuterTableFrame(aParentFrame);
nsIFrame* parentFrame = AdjustCaptionParentFrame(aParentFrame);
rv = ConstructTableCaptionFrame(aState, aChildContent, parentFrame,
childStyleContext, aTableCreator,
aChildItems, aCaption, isPseudoParent);