b=455647 garbage Indic characters on parts of some English webpages. r=pavlov a1.9.0.6=dveditz
git-svn-id: svn://10.0.0.236/trunk@255484 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1947,6 +1947,12 @@ gfxTextRun::SortGlyphRuns()
|
||||
// be skipped; the last GlyphRun will cover its character range.
|
||||
if (i == 0 || runs[i].mFont != runs[i - 1].mFont) {
|
||||
mGlyphRuns.AppendElement(runs[i]);
|
||||
// If two fonts have the same character offset, Sort() will have
|
||||
// randomized the order.
|
||||
NS_ASSERTION(i == 0 ||
|
||||
runs[i].mCharacterOffset !=
|
||||
runs[i - 1].mCharacterOffset,
|
||||
"Two fonts for the same run, glyph indices may not match the font");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1658,7 +1658,7 @@ gfxPangoFontGroup::CreateGlyphRunsItemizing(gfxTextRun *aTextRun,
|
||||
nsRefPtr<gfxPangoFont> font =
|
||||
gfxPangoFont::GetOrMakeFont(item->analysis.font);
|
||||
|
||||
nsresult rv = aTextRun->AddGlyphRun(font, utf16Offset, PR_TRUE);
|
||||
nsresult rv = aTextRun->AddGlyphRun(font, utf16Offset);
|
||||
if (NS_FAILED(rv)) {
|
||||
NS_ERROR("AddGlyphRun Failed");
|
||||
goto out;
|
||||
@@ -1690,8 +1690,6 @@ gfxPangoFontGroup::CreateGlyphRunsItemizing(gfxTextRun *aTextRun,
|
||||
}
|
||||
}
|
||||
|
||||
aTextRun->SortGlyphRuns();
|
||||
|
||||
out:
|
||||
if (glyphString)
|
||||
pango_glyph_string_free(glyphString);
|
||||
|
||||
19
mozilla/layout/reftests/text/fallback-01-ref.xhtml
Normal file
19
mozilla/layout/reftests/text/fallback-01-ref.xhtml
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
|
||||
[<!ENTITY first "!"><!ENTITY fallback "æ">]>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<!-- U+00E6 is expected to be found in Arial and DejaVu Sans, but not
|
||||
Devanagari MT, FrankRuehl, nor Standard Symbols L.
|
||||
"!" is chosen as it is expected to be found in the first font found. -->
|
||||
<head>
|
||||
<style>
|
||||
p { font-size: 16.6px;
|
||||
font-family: Devanagari MT, FrankRuehl, Standard Symbols L, Arial, DejaVu Sans; serif }
|
||||
.fallback { font-family: Arial, DejaVu Sans, serif; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p><span class="fallback">&fallback;&fallback;</span>&first;<span class="fallback">&fallback;</span>&first;<span class="fallback">&fallback;</span>&first;<span class="fallback">&fallback;</span></p>
|
||||
</body>
|
||||
</html>
|
||||
19
mozilla/layout/reftests/text/fallback-01.xhtml
Normal file
19
mozilla/layout/reftests/text/fallback-01.xhtml
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
|
||||
[<!ENTITY first "!"><!ENTITY fallback "æ">]>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<!-- U+00E6 is expected to be found in Arial and DejaVu Sans, but not
|
||||
Devanagari MT, FrankRuehl, nor Standard Symbols L.
|
||||
"!" is chosen as it is expected to be found in the first font found. -->
|
||||
<head>
|
||||
<style>
|
||||
p { font-size: 16.6px;
|
||||
font-family: Devanagari MT, FrankRuehl, Standard Symbols L, Arial, DejaVu Sans; serif }
|
||||
.fallback { font-family: Arial, DejaVu Sans, serif; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p>&fallback;&fallback;&first;&fallback;&first;&fallback;&first;<span class="fallback">&fallback;</span></p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,3 +1,4 @@
|
||||
== fallback-01.xhtml fallback-01-ref.xhtml
|
||||
== long-1.html long-ref.html
|
||||
random == soft-hyphens-1a.html soft-hyphens-1-ref.html # bug 406299
|
||||
random == soft-hyphens-1b.html soft-hyphens-1-ref.html # bug 406299
|
||||
|
||||
Reference in New Issue
Block a user