mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 541277: correct boundary handling in character/glyph clump processing. r=roc
This commit is contained in:
parent
03a690bc2e
commit
35b54beeb5
@ -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;
|
||||
}
|
||||
|
5
layout/generic/crashtests/541277-1.html
Normal file
5
layout/generic/crashtests/541277-1.html
Normal file
@ -0,0 +1,5 @@
|
||||
<html>
|
||||
<body>
|
||||
<span>ﯤ</span><span>וֹ</span><span>ﯦ</span>
|
||||
</body>
|
||||
</html>
|
5
layout/generic/crashtests/541277-2.html
Normal file
5
layout/generic/crashtests/541277-2.html
Normal file
@ -0,0 +1,5 @@
|
||||
<html>
|
||||
<body>
|
||||
‮X‍ 嵠
|
||||
</body>
|
||||
</html>
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user