Bug 1476437 - Correct original-text indexing when checking for explicit hyphens in text where auto-hyphenation is enabled. r=dbaron

This commit is contained in:
Jonathan Kew 2018-07-28 09:23:36 +01:00
Родитель ab90d74d3e
Коммит 5a78d19b4f
2 изменённых файлов: 5 добавлений и 4 удалений

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

@ -3640,9 +3640,10 @@ PropertyProvider::GetHyphenationBreaks(Range aRange, HyphenType* aBreakBefore) c
}
if (mTextStyle->mHyphens == StyleHyphens::Auto) {
uint32_t currentFragOffset = mStart.GetOriginalOffset();
gfxSkipCharsIterator skipIter(mStart);
for (uint32_t i = 0; i < aRange.Length(); ++i) {
if (IS_HYPHEN(mFrag->CharAt(currentFragOffset + i))) {
if (IS_HYPHEN(mFrag->
CharAt(skipIter.ConvertSkippedToOriginal(aRange.start + i)))) {
if (i < aRange.Length() - 1) {
aBreakBefore[i + 1] = HyphenType::Explicit;
}

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

@ -322,8 +322,8 @@ pref(gfx.font_rendering.graphite.enabled,true) == glyph-decomposition-graphite.h
== hyphenation-control-3.html hyphenation-control-3-ref.html
== hyphenation-control-4.html hyphenation-control-4-ref.html
== hyphenation-control-5.html hyphenation-control-5-ref.html
fails == hyphenation-control-6.html hyphenation-control-6-ref.html # bug 1476437
fails == hyphenation-control-7.html hyphenation-control-7-ref.html # bug 1476437
== hyphenation-control-6.html hyphenation-control-6-ref.html
== hyphenation-control-7.html hyphenation-control-7-ref.html
# osx-font-smoothing - with and without subpixel AA, only under OSX
fails-if(!cocoaWidget) != osx-font-smoothing.html osx-font-smoothing-ref.html