mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
bug 30692 - Have children of cell block use the computed width of the cell. sr=attinasi, r=alexsavulov
This commit is contained in:
parent
8798c93d1e
commit
59485c067e
@ -1620,19 +1620,28 @@ nsHTMLReflowState::InitConstraints(nsIPresContext* aPresContext,
|
||||
// See if the containing block height is based on the size of its
|
||||
// content
|
||||
if (NS_AUTOHEIGHT == aContainingBlockHeight) {
|
||||
// See if the containing block is a scrolled frame, i.e. its
|
||||
// See if the containing block is (1) a scrolled frame, i.e. its
|
||||
// parent is a scroll frame. The presence of the intervening
|
||||
// frame (that the scroll frame scrolls) needs to be hidden from
|
||||
// the containingBlockHeight calcuation.
|
||||
// the containingBlockHeight calcuation, or (2) a cell frame which needs
|
||||
// to use the mComputedHeight of the cell instead of what the cell block passed in.
|
||||
nsCOMPtr<nsIAtom> fType;
|
||||
if (cbrs->parentReflowState) {
|
||||
nsIFrame* f = cbrs->parentReflowState->frame;
|
||||
nsCOMPtr<nsIAtom> fType;
|
||||
f->GetFrameType(getter_AddRefs(fType));
|
||||
if (nsLayoutAtoms::scrollFrame == fType.get()) {
|
||||
// Use the scroll frame's computed height instead
|
||||
aContainingBlockHeight =
|
||||
((nsHTMLReflowState*)cbrs->parentReflowState)->mComputedHeight;
|
||||
}
|
||||
else {
|
||||
cbrs->frame->GetFrameType(getter_AddRefs(fType));
|
||||
if (nsLayoutAtoms::tableCellFrame == fType.get()) {
|
||||
// use the cell's computed height
|
||||
aContainingBlockHeight =
|
||||
((nsHTMLReflowState*)cbrs)->mComputedHeight;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1620,19 +1620,28 @@ nsHTMLReflowState::InitConstraints(nsIPresContext* aPresContext,
|
||||
// See if the containing block height is based on the size of its
|
||||
// content
|
||||
if (NS_AUTOHEIGHT == aContainingBlockHeight) {
|
||||
// See if the containing block is a scrolled frame, i.e. its
|
||||
// See if the containing block is (1) a scrolled frame, i.e. its
|
||||
// parent is a scroll frame. The presence of the intervening
|
||||
// frame (that the scroll frame scrolls) needs to be hidden from
|
||||
// the containingBlockHeight calcuation.
|
||||
// the containingBlockHeight calcuation, or (2) a cell frame which needs
|
||||
// to use the mComputedHeight of the cell instead of what the cell block passed in.
|
||||
nsCOMPtr<nsIAtom> fType;
|
||||
if (cbrs->parentReflowState) {
|
||||
nsIFrame* f = cbrs->parentReflowState->frame;
|
||||
nsCOMPtr<nsIAtom> fType;
|
||||
f->GetFrameType(getter_AddRefs(fType));
|
||||
if (nsLayoutAtoms::scrollFrame == fType.get()) {
|
||||
// Use the scroll frame's computed height instead
|
||||
aContainingBlockHeight =
|
||||
((nsHTMLReflowState*)cbrs->parentReflowState)->mComputedHeight;
|
||||
}
|
||||
else {
|
||||
cbrs->frame->GetFrameType(getter_AddRefs(fType));
|
||||
if (nsLayoutAtoms::tableCellFrame == fType.get()) {
|
||||
// use the cell's computed height
|
||||
aContainingBlockHeight =
|
||||
((nsHTMLReflowState*)cbrs)->mComputedHeight;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user