mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-11 22:41:02 +00:00
Bug 1133945 - Fix behavior of vertical-align with a specified length, relative to dominant centered baseline in vertical mode. r=smontagu
This commit is contained in:
parent
2fad07bfc9
commit
cbbd8efccc
@ -2173,7 +2173,14 @@ nsLineLayout::VerticalAlignFrames(PerSpanData* psd)
|
||||
// inverted relative to block direction.
|
||||
nscoord revisedBaselineBCoord = baselineBCoord - offset *
|
||||
lineWM.FlowRelativeToLineRelativeFactor();
|
||||
pfd->mBounds.BStart(lineWM) = revisedBaselineBCoord - pfd->mAscent;
|
||||
if (lineWM.IsVertical() && !lineWM.IsSideways()) {
|
||||
// If we're using a dominant center baseline, we align with the center
|
||||
// of the frame being placed (bug 1133945).
|
||||
pfd->mBounds.BStart(lineWM) =
|
||||
revisedBaselineBCoord - pfd->mBounds.BSize(lineWM)/2;
|
||||
} else {
|
||||
pfd->mBounds.BStart(lineWM) = revisedBaselineBCoord - pfd->mAscent;
|
||||
}
|
||||
pfd->mBlockDirAlign = VALIGN_OTHER;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user