зеркало из https://github.com/mozilla/gecko-dev.git
b=15388,15408 r=peterl@netscape.com
Made it so that for absolutely positioned frames we pass in the containing block width/height to the HTML reflow state, rather than have it compute it. This means we get a bottom up size rather than a top down size. That fixes a problem where for containing blocks with a specified 'height' of 'auto' we weren't correctly calculating the containing block height
This commit is contained in:
Родитель
70d79a10be
Коммит
eccee5177e
|
@ -218,11 +218,13 @@ CalculateContainingBlock(const nsHTMLReflowState& aReflowState,
|
|||
aContainingBlockWidth = -1; // have reflow state calculate
|
||||
aContainingBlockHeight = -1; // have reflow state calculate
|
||||
|
||||
// We should probably do this for all frames, but for the time being just
|
||||
// do this for relatively positioned block frames. The issue there is that
|
||||
// for a 'height' of 'auto' the reflow state code won't know how to calculate
|
||||
// the containing block height
|
||||
if (NS_STYLE_POSITION_RELATIVE == aReflowState.mStylePosition->mPosition) {
|
||||
// The issue there is that for a 'height' of 'auto' the reflow state code
|
||||
// won't know how to calculate the containing block height because it's
|
||||
// calculated bottom up. We don't really want to do this for the initial
|
||||
// containing block so that's why we have the check for if the element
|
||||
// is absolutely or relatively positioned
|
||||
if (aReflowState.mStylePosition->IsAbsolutelyPositioned() ||
|
||||
(NS_STYLE_POSITION_RELATIVE == aReflowState.mStylePosition->mPosition)) {
|
||||
aContainingBlockWidth = aFrameWidth;
|
||||
aContainingBlockHeight = aFrameHeight;
|
||||
|
||||
|
|
|
@ -218,11 +218,13 @@ CalculateContainingBlock(const nsHTMLReflowState& aReflowState,
|
|||
aContainingBlockWidth = -1; // have reflow state calculate
|
||||
aContainingBlockHeight = -1; // have reflow state calculate
|
||||
|
||||
// We should probably do this for all frames, but for the time being just
|
||||
// do this for relatively positioned block frames. The issue there is that
|
||||
// for a 'height' of 'auto' the reflow state code won't know how to calculate
|
||||
// the containing block height
|
||||
if (NS_STYLE_POSITION_RELATIVE == aReflowState.mStylePosition->mPosition) {
|
||||
// The issue there is that for a 'height' of 'auto' the reflow state code
|
||||
// won't know how to calculate the containing block height because it's
|
||||
// calculated bottom up. We don't really want to do this for the initial
|
||||
// containing block so that's why we have the check for if the element
|
||||
// is absolutely or relatively positioned
|
||||
if (aReflowState.mStylePosition->IsAbsolutelyPositioned() ||
|
||||
(NS_STYLE_POSITION_RELATIVE == aReflowState.mStylePosition->mPosition)) {
|
||||
aContainingBlockWidth = aFrameWidth;
|
||||
aContainingBlockHeight = aFrameHeight;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче