зеркало из https://github.com/mozilla/gecko-dev.git
Bug 294934. Absolute positioning should be relative to the padding edge, so we need to set the absolute containing block size to the size of the padding-box of any wrapper frame. r+sr=dbaron,a=bsmedberg
This commit is contained in:
Родитель
802e2cda75
Коммит
94a5d4ca9d
|
@ -605,13 +605,17 @@ CalculateContainingBlockSizeForAbsolutes(const nsHTMLReflowState& aReflowState,
|
|||
aLastRS = aLastRS->parentReflowState;
|
||||
}
|
||||
if (aLastRS != &aReflowState) {
|
||||
// The wrapper frame should be block-level. If it isn't, how the
|
||||
// heck did it end up wrapping this block frame?
|
||||
NS_ASSERTION(aLastRS->frame->GetStyleDisplay()->IsBlockLevel(),
|
||||
"Wrapping frame should be block-level");
|
||||
// We found a reflow state for the outermost wrapping frame, so use
|
||||
// its computed metrics if available
|
||||
if (aLastRS->mComputedWidth != NS_UNCONSTRAINEDSIZE) {
|
||||
cbSize.width = aLastRS->mComputedWidth;
|
||||
cbSize.width = aLastRS->mComputedWidth + aLastRS->mComputedPadding.LeftRight();
|
||||
}
|
||||
if (aLastRS->mComputedHeight != NS_UNCONSTRAINEDSIZE) {
|
||||
cbSize.height = aLastRS->mComputedHeight;
|
||||
cbSize.height = aLastRS->mComputedHeight + aLastRS->mComputedPadding.TopBottom();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче