nsIFrame* firstChild; aFrame->FirstChild(aPresContext, nsnull, &firstChild);
nsIFrame* firstChild = aFrame->GetFirstChild(nsnull);
IsCanvasFrame(nsIPresContext* aPresContext, nsIFrame *aFrame){  nsIAtom* frameType = aFrame->GetType();  if (frameType == nsLayoutAtoms::canvasFrame ||      frameType == nsLayoutAtoms::rootFrame ||      frameType == nsLayoutAtoms::pageFrame) {    return aFrame;  } else if (frameType == nsLayoutAtoms::viewportFrame) {    nsIFrame* firstChild;    aFrame->FirstChild(aPresContext, nsnull, &firstChild);    if (firstChild) {      return firstChild;    }  }    return nsnull;}