Bug 1097499 part 12 - Handle spacing sensibly for text-combine-upright. r=jfkthame

MozReview-Commit-ID: DSBMUcccfNi

--HG--
extra : source : f03b556d12d5c28f7d8e3af3d7977470784eea76
This commit is contained in:
Xidorn Quan 2016-04-22 09:18:41 +10:00
Родитель d2e9e4f2b9
Коммит 5f02c3cba1
1 изменённых файлов: 14 добавлений и 0 удалений

Просмотреть файл

@ -3077,6 +3077,16 @@ static void FindClusterEnd(gfxTextRun* aTextRun, int32_t aOriginalEnd,
void
PropertyProvider::ComputeJustification(Range aRange)
{
// Horizontal-in-vertical frame is orthogonal to the line, so it
// doesn't actually include any justification opportunity inside.
// Note: although the spec says such frame should be treated as a
// U+FFFC, which indicates it is justifiable on its sides, we don't
// do that because it is difficult to implement, and doesn't make
// any difference in common use cases.
if (mFrame->StyleContext()->IsTextCombined()) {
return;
}
bool isCJ = IsChineseOrJapanese(mFrame);
nsSkipCharsRunIterator run(
mStart, nsSkipCharsRunIterator::LENGTH_INCLUDES_SKIPPED, aRange.Length());
@ -3170,6 +3180,10 @@ PropertyProvider::GetSpacingInternal(Range aRange, Spacing* aSpacing,
aSpacing[index].mAfter = 0.0;
}
if (mFrame->StyleContext()->IsTextCombined()) {
return;
}
// Find our offset into the original+transformed string
gfxSkipCharsIterator start(mStart);
start.SetSkippedOffset(aRange.start);