зеркало из https://github.com/mozilla/gecko-dev.git
Fix for bug 325283: Gradients on text causes crash
r=tor
This commit is contained in:
Родитель
58262b951b
Коммит
f04ed6f1e2
|
@ -539,7 +539,16 @@ nsSVGGradientFrame::GetGradientTransform(nsIDOMSVGMatrix **aGradientTransform,
|
|||
} else {
|
||||
nsIFrame *frame = nsnull;
|
||||
CallQueryInterface(aSource, &frame);
|
||||
mSourceContent = frame->GetContent();
|
||||
|
||||
// If this gradient is applied to text, our caller
|
||||
// will be the glyph, which is not a container, so we
|
||||
// need to get the parent
|
||||
nsIAtom *callerType = frame->GetType();
|
||||
if (callerType == nsLayoutAtoms::svgGlyphFrame)
|
||||
mSourceContent = frame->GetContent()->GetParent();
|
||||
else
|
||||
mSourceContent = frame->GetContent();
|
||||
NS_ASSERTION(mSourceContent, "Can't get content for gradient");
|
||||
}
|
||||
|
||||
if (!bboxTransform)
|
||||
|
|
Загрузка…
Ссылка в новой задаче