Bug 973322 - Crash [@ nsMathMLChar::PaintForeground]. r=karlt

This commit is contained in:
Frédéric Wang 2014-02-20 08:43:56 -05:00
parent 5e770826c4
commit 67f0c0ca2e
3 changed files with 15 additions and 3 deletions

View File

@ -0,0 +1,8 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<body onload="document.getElementById('f').setAttribute('class', 'e');">
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mfenced id="f"/>
</math>
<p style="overflow: scroll; position: sticky;"></p>
</body>
</html>

View File

@ -58,3 +58,4 @@ load 654928-1.html
load 655451-1.xhtml
load 713606-1.html
load 716349-1.html
asserts(1) load 973322-1.xhtml

View File

@ -1851,9 +1851,12 @@ nsMathMLChar::PaintForeground(nsPresContext* aPresContext,
case DRAW_NORMAL:
case DRAW_VARIANT:
// draw a single glyph (base size or size variant)
mGlyphs[0]->Draw(thebesContext, gfxPoint(0.0, mUnscaledAscent),
DrawMode::GLYPH_FILL, 0, mGlyphs[0]->GetLength(),
nullptr, nullptr, nullptr);
// XXXfredw verify if mGlyphs[0] is non-null to workaround bug 973322.
if (mGlyphs[0]) {
mGlyphs[0]->Draw(thebesContext, gfxPoint(0.0, mUnscaledAscent),
DrawMode::GLYPH_FILL, 0, mGlyphs[0]->GetLength(),
nullptr, nullptr, nullptr);
}
break;
case DRAW_PARTS: {
// paint by parts