mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 13:55:43 +00:00
Bug 1106665 - Fix text-align:justify for vertical writing modes. r=smontagu
This commit is contained in:
parent
4eaf476a52
commit
18b2531efe
@ -3382,13 +3382,16 @@ PropertyProvider::SetupJustificationSpacing(bool aPostReflow)
|
||||
return;
|
||||
}
|
||||
|
||||
// Remember that textrun measurements are in the run's orientation,
|
||||
// so its advance "width" is actually a height in vertical writing modes,
|
||||
// corresponding to the inline-direction of the frame.
|
||||
gfxFloat naturalWidth =
|
||||
mTextRun->GetAdvanceWidth(mStart.GetSkippedOffset(),
|
||||
GetSkippedDistance(mStart, realEnd), this);
|
||||
if (mFrame->GetStateBits() & TEXT_HYPHEN_BREAK) {
|
||||
naturalWidth += GetHyphenWidth();
|
||||
}
|
||||
mJustificationSpacing = mFrame->GetSize().width - naturalWidth;
|
||||
mJustificationSpacing = mFrame->ISize() - naturalWidth;
|
||||
if (mJustificationSpacing <= 0) {
|
||||
// No space available
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user