bug 30692 - skip inner table cell's block as percentage base and use cell instead. r=troy

This commit is contained in:
karnaze%netscape.com 2000-05-03 14:36:04 +00:00
Родитель f98c49b79b
Коммит 87beb13dc1
2 изменённых файлов: 16 добавлений и 0 удалений

Просмотреть файл

@ -191,6 +191,14 @@ nsHTMLReflowState::GetContainingBlockReflowState(const nsHTMLReflowState* aParen
// reflow state...
nsresult rv = aParentRS->frame->IsPercentageBase(isContainingBlock);
if (NS_SUCCEEDED(rv) && isContainingBlock) {
// a block inside a table cell needs to use the table cell
if (aParentRS->parentReflowState) {
nsCOMPtr<nsIAtom> fType;
aParentRS->parentReflowState->frame->GetFrameType(getter_AddRefs(fType));
if (nsLayoutAtoms::tableCellFrame == fType.get()) {
aParentRS = aParentRS->parentReflowState;
}
}
return aParentRS;
}
}

Просмотреть файл

@ -191,6 +191,14 @@ nsHTMLReflowState::GetContainingBlockReflowState(const nsHTMLReflowState* aParen
// reflow state...
nsresult rv = aParentRS->frame->IsPercentageBase(isContainingBlock);
if (NS_SUCCEEDED(rv) && isContainingBlock) {
// a block inside a table cell needs to use the table cell
if (aParentRS->parentReflowState) {
nsCOMPtr<nsIAtom> fType;
aParentRS->parentReflowState->frame->GetFrameType(getter_AddRefs(fType));
if (nsLayoutAtoms::tableCellFrame == fType.get()) {
aParentRS = aParentRS->parentReflowState;
}
}
return aParentRS;
}
}