if (!IsInDoc()) return NS_ERROR_FAILURE; nsIPresShell *presShell = GetOwnerDoc()->GetShellAt(0);
nsIDocument* doc = GetCurrentDoc(); if (!doc) return NS_ERROR_FAILURE; nsIPresShell *presShell = doc->GetShellAt(0);
nsSVGSVGElement::UnsuspendRedrawAll(){  mRedrawSuspendCount = 0;    if (!IsInDoc()) return NS_ERROR_FAILURE;  nsIPresShell *presShell = GetOwnerDoc()->GetShellAt(0);  NS_ASSERTION(presShell, "need presShell to unsuspend redraw");  if (!presShell) return NS_ERROR_FAILURE;  nsIFrame* frame;  presShell->GetPrimaryFrameFor(NS_STATIC_CAST(nsIStyledContent*, this), &frame);#ifdef DEBUG  NS_ASSERTION(frame, "unsuspending redraw w/o frame");#endif  if (frame) {    nsISVGSVGFrame* svgframe;    CallQueryInterface(frame, &svgframe);    NS_ASSERTION(svgframe, "wrong frame type");    if (svgframe) {      svgframe->UnsuspendRedraw();    }  }    return NS_OK;}