Bug 296626 - handle SVG glyph frames being constructed in invalid

context.  r=dbaron, sr=roc, a=brendan.
This commit is contained in:
tor%cs.brown.edu 2005-07-01 06:11:07 +00:00
Родитель ead709b608
Коммит b393f00121
2 изменённых файлов: 8 добавлений и 2 удалений

Просмотреть файл

@ -5199,8 +5199,13 @@ nsCSSFrameConstructor::ConstructTextFrame(nsFrameConstructorState& aState,
// XXX kipp: temporary // XXX kipp: temporary
newFrame->AddStateBits(NS_FRAME_REPLACED_ELEMENT); newFrame->AddStateBits(NS_FRAME_REPLACED_ELEMENT);
InitAndRestoreFrame(aState, aContent, aParentFrame, aStyleContext, nsnull, rv = InitAndRestoreFrame(aState, aContent, aParentFrame, aStyleContext,
newFrame); nsnull, newFrame);
if (NS_FAILED(rv)) {
newFrame->Destroy(aState.mPresContext);
return rv;
}
// We never need to create a view for a text frame. // We never need to create a view for a text frame.

Просмотреть файл

@ -280,6 +280,7 @@ nsSVGGlyphFrame::Init(nsPresContext* aPresContext,
nsISVGOuterSVGFrame* outerSVGFrame = GetOuterSVGFrame(); nsISVGOuterSVGFrame* outerSVGFrame = GetOuterSVGFrame();
if (!outerSVGFrame) { if (!outerSVGFrame) {
NS_ERROR("No outerSVGFrame"); NS_ERROR("No outerSVGFrame");
SetStyleContext(aPresContext, aContext);
return NS_ERROR_FAILURE; return NS_ERROR_FAILURE;
} }
nsCOMPtr<nsISVGRenderer> renderer; nsCOMPtr<nsISVGRenderer> renderer;