From e94a16a6f9ba48f088022ade0a92067543146507 Mon Sep 17 00:00:00 2001 From: Jonathan Kew Date: Fri, 18 Sep 2009 09:20:01 +0100 Subject: [PATCH] Bug 517283: fix gfxCoreTextFontGroup and bidi reftests to resolve failures with the Core Text backend, r=roc --- gfx/thebes/src/gfxCoreTextFonts.cpp | 3 ++- layout/reftests/bidi/mixedChartype-02-j.html | 6 ++++-- layout/reftests/bidi/mixedChartype-02-ref.html | 6 ++++-- layout/reftests/bidi/mixedChartype-02.html | 6 ++++-- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/gfx/thebes/src/gfxCoreTextFonts.cpp b/gfx/thebes/src/gfxCoreTextFonts.cpp index 281e5d9a7d1c..39f6baf6dccc 100644 --- a/gfx/thebes/src/gfxCoreTextFonts.cpp +++ b/gfx/thebes/src/gfxCoreTextFonts.cpp @@ -1133,12 +1133,13 @@ gfxCoreTextFontGroup::SetGlyphsFromRun(gfxTextRun *aTextRun, } // Then we check if the clump falls outside our actual string range; if so, just go to the next. - if (baseCharIndex < aLayoutStart || baseCharIndex >= aLayoutStart + aLayoutLength) { + if (endCharIndex <= aLayoutStart || baseCharIndex >= aLayoutStart + aLayoutLength) { glyphStart = glyphEnd; charStart = charEnd; continue; } // Ensure we won't try to go beyond the valid length of the textRun's text + baseCharIndex = PR_MAX(baseCharIndex, aLayoutStart); endCharIndex = PR_MIN(endCharIndex, aLayoutStart + aLayoutLength); // for missing glyphs, we already recorded the info in the textRun diff --git a/layout/reftests/bidi/mixedChartype-02-j.html b/layout/reftests/bidi/mixedChartype-02-j.html index 92b4e046eb8d..d26fca251ec8 100644 --- a/layout/reftests/bidi/mixedChartype-02-j.html +++ b/layout/reftests/bidi/mixedChartype-02-j.html @@ -4,8 +4,10 @@ diff --git a/layout/reftests/bidi/mixedChartype-02.html b/layout/reftests/bidi/mixedChartype-02.html index de085566d6ab..1bbb1e6fc592 100644 --- a/layout/reftests/bidi/mixedChartype-02.html +++ b/layout/reftests/bidi/mixedChartype-02.html @@ -4,8 +4,10 @@