mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-15 06:15:43 +00:00
Calculate the relative offsets after we've done whatever corrections we need to
do to the CB height (eg in quirks mode). Bug 226954, r+sr=dbaron
This commit is contained in:
parent
9f9860b620
commit
bd6e613fb1
@ -1627,14 +1627,6 @@ nsHTMLReflowState::InitConstraints(nsIPresContext* aPresContext,
|
||||
aContainingBlockHeight);
|
||||
}
|
||||
|
||||
// See if the element is relatively positioned
|
||||
if (NS_STYLE_POSITION_RELATIVE == mStyleDisplay->mPosition) {
|
||||
ComputeRelativeOffsets(cbrs, aContainingBlockWidth, aContainingBlockHeight);
|
||||
} else {
|
||||
// Initialize offsets to 0
|
||||
mComputedOffsets.SizeTo(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
#if 0
|
||||
nsFrame::ListTag(stdout, frame); printf(": cb=");
|
||||
nsFrame::ListTag(stdout, cbrs->frame); printf(" size=%d,%d\n", aContainingBlockWidth, aContainingBlockHeight);
|
||||
@ -1746,6 +1738,16 @@ nsHTMLReflowState::InitConstraints(nsIPresContext* aPresContext,
|
||||
}
|
||||
}
|
||||
|
||||
// Compute our offsets if the element is relatively positioned. We need
|
||||
// the correct containing block width and height here, which is why we need
|
||||
// to do it after all the quirks-n-such above.
|
||||
if (NS_STYLE_POSITION_RELATIVE == mStyleDisplay->mPosition) {
|
||||
ComputeRelativeOffsets(cbrs, aContainingBlockWidth, aContainingBlockHeight);
|
||||
} else {
|
||||
// Initialize offsets to 0
|
||||
mComputedOffsets.SizeTo(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
// Calculate the computed values for min and max properties
|
||||
ComputeMinMaxValues(aContainingBlockWidth, aContainingBlockHeight, cbrs);
|
||||
|
||||
|
@ -1627,14 +1627,6 @@ nsHTMLReflowState::InitConstraints(nsIPresContext* aPresContext,
|
||||
aContainingBlockHeight);
|
||||
}
|
||||
|
||||
// See if the element is relatively positioned
|
||||
if (NS_STYLE_POSITION_RELATIVE == mStyleDisplay->mPosition) {
|
||||
ComputeRelativeOffsets(cbrs, aContainingBlockWidth, aContainingBlockHeight);
|
||||
} else {
|
||||
// Initialize offsets to 0
|
||||
mComputedOffsets.SizeTo(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
#if 0
|
||||
nsFrame::ListTag(stdout, frame); printf(": cb=");
|
||||
nsFrame::ListTag(stdout, cbrs->frame); printf(" size=%d,%d\n", aContainingBlockWidth, aContainingBlockHeight);
|
||||
@ -1746,6 +1738,16 @@ nsHTMLReflowState::InitConstraints(nsIPresContext* aPresContext,
|
||||
}
|
||||
}
|
||||
|
||||
// Compute our offsets if the element is relatively positioned. We need
|
||||
// the correct containing block width and height here, which is why we need
|
||||
// to do it after all the quirks-n-such above.
|
||||
if (NS_STYLE_POSITION_RELATIVE == mStyleDisplay->mPosition) {
|
||||
ComputeRelativeOffsets(cbrs, aContainingBlockWidth, aContainingBlockHeight);
|
||||
} else {
|
||||
// Initialize offsets to 0
|
||||
mComputedOffsets.SizeTo(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
// Calculate the computed values for min and max properties
|
||||
ComputeMinMaxValues(aContainingBlockWidth, aContainingBlockHeight, cbrs);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user