Bug 541277: correct boundary handling in character/glyph clump processing. r=roc

This commit is contained in:
Jonathan Kew 2010-01-27 07:46:31 +00:00
parent 03a690bc2e
commit 35b54beeb5
4 changed files with 15 additions and 5 deletions

View File

@ -449,9 +449,9 @@ gfxCoreTextFont::InitTextRun(gfxTextRun *aTextRun,
// If there's a possibility of any bidi, we wrap the text with direction overrides
// to ensure neutrals or characters that were bidi-overridden in HTML behave properly.
const UniChar beginLTR[] = { 0x202d };
const UniChar beginRTL[] = { 0x202e };
const UniChar endBidiWrap[] = { 0x202c };
const UniChar beginLTR[] = { 0x202d, 0x20 };
const UniChar beginRTL[] = { 0x202e, 0x20 };
const UniChar endBidiWrap[] = { 0x20, 0x202c };
PRUint32 startOffset;
CFStringRef stringObj;
@ -638,8 +638,6 @@ gfxCoreTextFont::SetGlyphsFromRun(gfxTextRun *aTextRun,
charToGlyph[offset] = NO_GLYPH;
for (PRInt32 g = 0; g < numGlyphs; ++g) {
PRInt32 loc = glyphToChar[g] - stringRange.location;
if (loc == 0 && !isLTR)
++loc; // avoid seeing initial surrogate char as "ligated" with direction override
if (loc >= 0 && loc < stringRange.length) {
charToGlyph[loc] = g;
}

View File

@ -0,0 +1,5 @@
<html>
<body>
<span>&#xFBE4;</span><span>&#xFB4B;</span><span>&#xFBE6;</span>
</body>
</html>

View File

@ -0,0 +1,5 @@
<html>
<body>
&#x202E;X&#x200D; &#x5D60;
</body>
</html>

View File

@ -285,3 +285,5 @@ load 517968.html
load 520340.html
load 533379-1.html
load 533379-2.html
load 541277-1.html
load 541277-2.html