diff --git a/layout/generic/nsTextFrame.cpp b/layout/generic/nsTextFrame.cpp index cca4410a5653..2e2aa6793443 100644 --- a/layout/generic/nsTextFrame.cpp +++ b/layout/generic/nsTextFrame.cpp @@ -3643,7 +3643,9 @@ PropertyProvider::GetHyphenationBreaks(Range aRange, HyphenType* aBreakBefore) c uint32_t currentFragOffset = mStart.GetOriginalOffset(); for (uint32_t i = 0; i < aRange.Length(); ++i) { if (IS_HYPHEN(mFrag->CharAt(currentFragOffset + i))) { - aBreakBefore[i] = HyphenType::Explicit; + if (i < aRange.Length() - 1) { + aBreakBefore[i + 1] = HyphenType::Explicit; + } continue; } diff --git a/layout/reftests/text/reftest.list b/layout/reftests/text/reftest.list index 4683bafb643c..e50cd4c4536e 100644 --- a/layout/reftests/text/reftest.list +++ b/layout/reftests/text/reftest.list @@ -321,7 +321,7 @@ pref(gfx.font_rendering.graphite.enabled,true) == glyph-decomposition-graphite.h == hyphenation-control-2.html hyphenation-control-2-ref.html == hyphenation-control-3.html hyphenation-control-3-ref.html == hyphenation-control-4.html hyphenation-control-4-ref.html -fails == hyphenation-control-5.html hyphenation-control-5-ref.html # bug 1478574 +fuzzy-if(winWidget,47,6) == hyphenation-control-5.html hyphenation-control-5-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